Tracking Tools access violation exception
Posted: Thu Nov 01, 2012 10:24 am
Under certain circumstances, the Tracking Tools software appears to cause the application program to crash with a 0XC0000005 access violation exception. This occurs when Tracking Tools is linked to a dynamically loaded interface DLL (which handles calls to Tracking Tools on behalf of the main application program) and either [1] the OptiTrack cameras are not connected to the system or [2] both a TrackIR 5 camera and the OptiTrack cameras are connected to the system. The access violation occurs when the interface DLL is being terminated by the main application program (via a call to AfxFreeLibrary), specifically, just before the interface DLL returns from DLLMain.
The access violation does not occur when only OptiTrack cameras are connected to the system. When both TrackIR and OptiTrack cameras are connected via USB, the OptiTrack tracks normally, but causes an access violation exception upon termination. The TrackIR, however, does not track normally when the OptiTrack cameras are connected, further indicating there is some conflict going on between the devices.
Note that the access violation exception always occurs when the OptiTrack cameras are not connected to the system. A call to TT_Initialize() returns code 11 (invalid license), but otherwise there is no problem until termination. The access violation exception does not occur, however, if TT_Initialize() is not called, even if TT_FinalCleanup() is called before terminating.
Also note that the access violation exception usually (though not always) occurs when both TrackIR and OptiTrack cameras are connected.
I have isolated this behavior in a simple test program, which I can send to you upon request.
The access violation does not occur when only OptiTrack cameras are connected to the system. When both TrackIR and OptiTrack cameras are connected via USB, the OptiTrack tracks normally, but causes an access violation exception upon termination. The TrackIR, however, does not track normally when the OptiTrack cameras are connected, further indicating there is some conflict going on between the devices.
Note that the access violation exception always occurs when the OptiTrack cameras are not connected to the system. A call to TT_Initialize() returns code 11 (invalid license), but otherwise there is no problem until termination. The access violation exception does not occur, however, if TT_Initialize() is not called, even if TT_FinalCleanup() is called before terminating.
Also note that the access violation exception usually (though not always) occurs when both TrackIR and OptiTrack cameras are connected.
I have isolated this behavior in a simple test program, which I can send to you upon request.