GetDataDescriptions does not return anything in C++

NatNet, VRPN, TrackD, and Plugins
Post Reply
christoph
Posts: 3
Joined: Mon Sep 01, 2014 5:45 am

GetDataDescriptions does not return anything in C++

Post by christoph »

I try to get position updates for rigid bodies using NatNet. I managed to connect to the server, but the result of GetDataDescriptions is always 0. Same holds for the SampleClient provided with the NatNet SDK. However, the WinFormsSampleVS2010 is able to retrieve the information. Furthermore, my application also gets data updates, but I am not able to relate the trackers to their name.

What can I do?

Thanks in advance,
Christoph

PS: Who is the owner of the data returned by GetDataDescriptions? I pass a nullptr, do I need to release it later on? If not, how long is the data valid?
christoph
Posts: 3
Joined: Mon Sep 01, 2014 5:45 am

Re: GetDataDescriptions does not return anything in C++

Post by christoph »

I meantime got the thing working and wanted to leave a note about the reason for the problem: I originally placed the NatNetClient on the stack instead of the heap. That compiles and also works somehow, but has these weird effects. Since the object is on the heap, everything is working fine.

Perhaps, it would be useful if the SDK disallowed copy/move construction, assignment and move in order to prevent this code from compiling in the first place.
morgan
NaturalPoint Employee
NaturalPoint Employee
Posts: 199
Joined: Tue Jun 24, 2008 2:01 pm
Location: Corvallis, OR, USA
Contact:

Re: GetDataDescriptions does not return anything in C++

Post by morgan »

Thanks for the find. We'll work on getting some improved safeguards into the next release.

Morgan
Post Reply