forums.naturalpoint.com

Discussion and Support for the OptiTrack, SmartNav and TrackIR brands by NaturalPoint

cModuleSync runtime error in x64 library

by dbarker2 » Sun Nov 20, 2011 4:58 pm

Hello, I'm running into a runtime error in my application when dynamically allocating a cModuleSync object. Basically the program crashes and stops working once the line below is executed. Other CameraLibrary functions work fine: cameras are found and initialized.

cModuleSync * sync = new cModuleSync();

I compiled the FrameSynchronization sample project into a x64 application and linked with the x64 camera library (cameralibraryx64) to test this. It crashes in the same way. The sample project works fine for me in a 32 bit configuration with the same machine, IDE, and project file.

If I change to static object creation (ie: cModuleSync sync;) the x64 application runs correctly. It would really give me more flexibility in my application to be able to dynamically allocate the sync object.

Has anyone else observed this issue? Any ideas what might be going wrong?

Thanks for the insight,

Doug

I'm working on a system running Vista x64 and Visual Studio 2010
dbarker2
 
Posts: 2
Joined: Sun Nov 20, 2011 4:20 pm

by NaturalPoint - Mike » Mon Nov 21, 2011 3:52 pm

You should have a link in your email to a new build of the SDK that should account for this. Both DLL files will be included in future versions.
NaturalPoint - Mike
 
Posts: 1896
Joined: Tue Feb 01, 2011 8:41 am
Location: Corvallis, OR

by dbarker2 » Mon Nov 21, 2011 9:58 pm

Thanks Mike,

After searching the headers I found the solution was to add the pre-processor definition "WIN64" to my project. It looks like this determines the size of a buffer variable used in the modulesync.h, which might explain why it only crashes after a dynamic allocation.

#define WIN64 and all appears to be working fine.

Best,

Doug
dbarker2
 
Posts: 2
Joined: Sun Nov 20, 2011 4:20 pm


Return to Camera SDK