Page 1 of 1

cModuleSync runtime error in x64 library

Posted: Sun Nov 20, 2011 4:58 pm
by dbarker2
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,


I'm working on a system running Vista x64 and Visual Studio 2010

Re: cModuleSync runtime error in x64 library

Posted: Mon Nov 21, 2011 3:52 pm
by NaturalPoint - Mike
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.

Re: cModuleSync runtime error in x64 library

Posted: Mon Nov 21, 2011 9:58 pm
by dbarker2
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.