Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
2:Invalid output parameter
06-03-2013, 06:56 PM
Post: #11
RE: 2:Invalid output parameter
Hmmm.. The Log output does not show up. I tried to Throw the Error Message, but this lead to a fatal crash Blush (my c++ skills got very rusty..)
I set the Library DebugLevel to ALL.
Find all posts by this user
06-03-2013, 10:56 PM (This post was last modified: 06-03-2013 11:01 PM by simonc.)
Post: #12
RE: 2:Invalid output parameter
(06-03-2013 06:56 PM)ChriD Wrote:  Hmmm.. The Log output does not show up. I tried to Throw the Error Message, but this lead to a fatal crash Blush (my c++ skills got very rusty..)
I set the Library DebugLevel to ALL.

The debug level shouldn't matter here - that just influences which LOG statements get output. Log::Print statements are always output.

If you add the code I suggested, the output should be logged to stdout. If that isn't visible, you can redirect the output using InitParams.LogOutput. Note that you must do this before calling new Library(...)

It'd also be worth double checking that you've added the code to ParameterUint::ValidateUint. (There is a very similarly named function for signed integer action arguments too.)
Find all posts by this user
07-03-2013, 07:58 PM
Post: #13
RE: 2:Invalid output parameter
LogOutput worked

If i play Track Nr 2
Parameter validation failure: Name=Track, Min=0, Max=1, Step=1, Val=2

If i play Track Nr 6
Parameter validation failure: Name=Track, Min=0, Max=1, Step=1, Val=6

So its clear why the Error is thrown. The Max value seems to be incorrect
I'm not sure where the problem is. The Max Value is defined in the Device XML

<stateVariable sendEvents="no">
<name>NumberOfTracks</name>
<dataType>ui4</dataType>
<allowedValueRange>
<minimum>0</minimum>
<maximum>1</maximum>
</allowedValueRange>
</stateVariable>

But of course 1 is not right! This value should be like this
<name>NumberOfTracks</name>
<dataType>ui4</dataType>
<allowedValueRange>
<minimum>0</minimum>
<maximum>4294967295</maximum>
</allowedValueRange>

So i was wrong! Its no Bug in OhNet. It seems to be a Bug in the MediaRenderer Dodgy
UPNP Spy doesn't seem to validate those data.

Thank you very much for your effort!
Find all posts by this user
07-03-2013, 09:30 PM (This post was last modified: 08-03-2013 08:52 AM by simonc.)
Post: #14
RE: 2:Invalid output parameter
I'm glad you're making progress with this. I'm slightly puzzled about the source of the error though; ohNet proxies set their allowed value ranges at compile time and don't check the detailed content of a device's service xml at runtime.

I think you're getting this exception because your proxy has been generated using the above incorrect allowedValueRange. How did you generate the proxy? If you use the one that came with ohNet, it should have a range near the ideal one you list.

If you've generated your proxy using the service xml from your target renderer, you have a few possible fixes
  • Edit the service xml to fix this error then regenerate your proxy
  • Use the service xml supplied with ohNet and regenerate your proxy. The xml came from the UPnP forum so should be perfectly safe to use with any media renderer.
  • Use the proxy supplied with ohNet instead. This should work with any UPnP media renderer
Find all posts by this user
12-03-2013, 01:59 PM
Post: #15
RE: 2:Invalid output parameter
i changed the allowed values in the generated cs proxy file. It works.

Thanks!
Find all posts by this user


Forum Jump: