Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
2:Invalid output parameter
03-03-2013, 12:26 PM
Post: #1
2:Invalid output parameter
Hi,

I got a Exception if i use the Async "GetPositionInfo" on the AvTransport1 (EndGetPositionInfo)

The Exception says: "2:Invalid output parameter"
:exclamation:IMPORTANT: This Exception is only thrown if i have got AVTransportUri set to a container or queue and any other Song from the container than the first one is beeing played. (DeviceSpy Invokes does not throw this error). That means, while i am playing the first song in list, i can invoke this method as often i want, but if the second or third or any other song in container is played, i get the exception!

I think this is a Bug in the ohNet Stack.

bye
Chris
Find all posts by this user
03-03-2013, 05:07 PM
Post: #2
RE: 2:Invalid output parameter
Do you have an example program that demonstrates this problem?
Find all posts by this user
03-03-2013, 06:29 PM
Post: #3
RE: 2:Invalid output parameter
(03-03-2013 05:07 PM)simonc Wrote:  Do you have an example program that demonstrates this problem?

A sample program.. no.
I've got the App im creating, but this needs a special media server for working...
Maybe i can create a sample but this of course will take some time...
Find all posts by this user
03-03-2013, 10:30 PM
Post: #4
RE: 2:Invalid output parameter
(03-03-2013 06:29 PM)ChriD Wrote:  
(03-03-2013 05:07 PM)simonc Wrote:  Do you have an example program that demonstrates this problem?

A sample program.. no.
I've got the App im creating, but this needs a special media server for working...
Maybe i can create a sample but this of course will take some time...

I can see one suspect bit of code... I'll look into it tomorrow and see fi I can make progress without sample code. Will let you know how it goes.
Find all posts by this user
04-03-2013, 01:57 PM
Post: #5
RE: 2:Invalid output parameter
I've fixed a bug that might have caused this error for device stack clients. Your previous posts have been about control point stack issues so I'm not sure whether the change will be relevant to you...

Are you using ohNet as a device as well as control point stack? If you are only using it as a control point stack, can you provide further info please?

Can you rebuild with the following patch applied and post the output that is generated immediately before the exception from GetProtocolInfo? It'd also be great if you could confirm which language bindings you're using. (I think it's C# but it can't hurt to confirm I'm examining the correct code!)

Code:
diff --git a/OpenHome/Net/Service.cpp b/OpenHome/Net/Service.cpp
index 6d23123..0e969ef 100644
--- a/OpenHome/Net/Service.cpp
+++ b/OpenHome/Net/Service.cpp
@@ -5,6 +5,7 @@
#include <OpenHome/Net/Private/Ssdp.h>
#include <OpenHome/Private/Env.h>
#include <OpenHome/Private/Thread.h>
+#include <OpenHome/Private/Printer.h>

using namespace OpenHome;
using namespace OpenHome::Net;
@@ -131,6 +132,10 @@ ParameterUint::~ParameterUint()
void ParameterUint::ValidateUint(TUint aValue) const
{
     if (aValue < iMinValue || aValue > iMaxValue || ((aValue-iMinValue)%iStep !
+        Log::Print("Parameter validation failure: Name=");
+        Log::Print(Name());
+        Log::Print(", Min=%u, Max=%u, Step=%u, Val=%u\n",
+                   iMinValue, iMaxValue, iStep, aValue);
         THROW(ParameterValidationError);
     }
}
Find all posts by this user
04-03-2013, 05:42 PM
Post: #6
RE: 2:Invalid output parameter
I'm using c# and only the control Point stack.
I will try to rebuild with given patch. May take a while because i never built ohNet before. I only used the binaries.

Tank You!
Find all posts by this user
04-03-2013, 06:23 PM
Post: #7
RE: 2:Invalid output parameter
(04-03-2013 05:42 PM)ChriD Wrote:  I'm using c# and only the control Point stack.
I will try to rebuild with given patch. May take a while because i never built ohNet before. I only used the binaries.

Building should hopefully be pretty simple. Assuming you're a Visual Studio user, launch a Visual Studio (x86) command prompt, cd to your ohNet directory then run make all.

That'll be all that's required for VS2010 or later. Earlier versions might require that you provide a stdint.h or edit ohNet's OhNetTypes.h to typedef the normal stdint content.
Find all posts by this user
05-03-2013, 06:10 PM
Post: #8
RE: 2:Invalid output parameter
Okay, i can build. The dll's i need are created. BUT i don't know how to apply this git patch file. I would change the code on the Serveice.cpp itself, but the code given above seems to be cutted in the "if" statement?
Find all posts by this user
05-03-2013, 06:16 PM
Post: #9
RE: 2:Invalid output parameter
(05-03-2013 06:10 PM)ChriD Wrote:  Okay, i can build. The dll's i need are created. BUT i don't know how to apply this git patch file. I would change the code on the Serveice.cpp itself, but the code given above seems to be cutted in the "if" statement?

The new lines are immediately below the if statement. You can leave that unchanged and just insert the lines that are prefixed with a single +
Find all posts by this user
06-03-2013, 07:37 AM
Post: #10
RE: 2:Invalid output parameter
I did the change but there was no output in the output window. Only "first Try Exception" So i deceided to comment the Exception throw. Then it worked and the values seemed to be ok. I'll try to output the Log in the evening and will post the results afterwards...

Thank you..
Find all posts by this user


Forum Jump: