cModuleSync runtime error in x64 library

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

cModuleSync runtime error in x64 library

Post 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,

Doug

I'm working on a system running Vista x64 and Visual Studio 2010
NaturalPoint - Mike
Posts: 1896
Joined: Tue Feb 01, 2011 8:41 am
Location: Corvallis, OR

Re: cModuleSync runtime error in x64 library

Post 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.
dbarker2
Posts: 2
Joined: Sun Nov 20, 2011 4:20 pm

Re: cModuleSync runtime error in x64 library

Post 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.

Best,

Doug
Simon Porter
Posts: 1
Joined: Fri Jun 30, 2023 5:59 am

Re: cModuleSync runtime error in x64 library

Post by Simon Porter »

thanks for your post, I couldn't even find such information in Google :)
Post Reply