Access violation with cModuleSync AddCamera

Post Reply
bteitler
Posts: 18
Joined: Thu Jun 12, 2014 12:57 am

Access violation with cModuleSync AddCamera

Post by bteitler »

I'm trying to build and run the FrameSynchronization example in the latest Camera SDK. I am using 16 Flex 13s. I can run the simple camera list function fine. When I run the FrameSynchronization program, I get an access violation at this line:

Code: Select all

sync->AddCamera(camera[i]);
I tried linking to 2010 libraries using Visual C++ 2010 and 2013 editions both with same result. I also added some code to print out some camera metadata before that line, and it seems like all the cameras are recognized correctly.

Do you have any suggestions on what might be wrong?
NaturalPoint-Dustin
Posts: 609
Joined: Tue Mar 19, 2013 5:03 pm

Re: Access violation with cModuleSync AddCamera

Post by NaturalPoint-Dustin »

Hello,

This is a known issue that came up in the last day or two and we're working on a fix. I will find out more information today and possibly have something you can use in the meantime.
Dustin
Technical Support Engineer
OptiTrack | TrackIR | SmartNav
bteitler
Posts: 18
Joined: Thu Jun 12, 2014 12:57 am

Re: Access violation with cModuleSync AddCamera

Post by bteitler »

Thank you for your response.. I look forward to hearing from you.
NaturalPoint-Dustin
Posts: 609
Joined: Tue Mar 19, 2013 5:03 pm

Re: Access violation with cModuleSync AddCamera

Post by NaturalPoint-Dustin »

Hey Ben,

You've found an issue with our recent release that was also reported the other day. We've been working on addressing this issue as quickly as possible. The problem is with instantiating the cModuleSync class, there is stack corruption. We've added factory classes into the Camera SDK as a solution. In this updated build, instead of having you instantiate it yourself you'll use the factory classes added. So instead of cModuleSync *sync = new cModuleSync(); you can just call the static function cModuleSync *sync = cModuleSync::Create(); and conversely instead of delete sync; you would do cModuleSync::Destroy( sync );

Unfortunately, these static methods aren't in the Camera SDK 1.7 Final. We will very likely be posting an updated Camera SDK to our site.

In the meantime, here is an updated Camera SDK installer with the factory methods added.

http://webservices.naturalpoint.com/ser ... build4.exe

Also, the frame synchonization sample and info in the /doc directory have not been updated to this new approach but they will be when we push an updated release.
Dustin
Technical Support Engineer
OptiTrack | TrackIR | SmartNav
bteitler
Posts: 18
Joined: Thu Jun 12, 2014 12:57 am

Re: Access violation with cModuleSync AddCamera

Post by bteitler »

It works now, thank you!
Post Reply