[IGSTK-Users] Error in Release mode, not in Debug mode
Tamas Ungi
ungi.tamas at gmail.com
Mon Nov 1 15:18:32 EDT 2010
Hi Patrick,
I turned off IGSTK_USE_SceneGraphVisualization in both IGSTK and
IGSTKSandbox, recompiled in Release mode along with my own code, and the
same problem appears to be happening. The program execution hangs at the
same line.
What should be the next step?
Thank you,
Tamas
-----Original Message-----
From: Patrick Cheng [mailto:cheng at isis.georgetown.edu]
Sent: Friday, October 29, 2010 4:31 PM
To: Tamas Ungi
Cc: igstk-users at public.kitware.com
Subject: Re: [IGSTK-Users] Error in Release mode, not in Debug mode
Hi Tamas,
Looks like the event: transformEvent is being observed by
igstkSceneGraphVisualization utilities.
Can you try to turn off the option in your cmake and give it another try?
IGSTK_USE_SceneGraphVisualization
Seems like we are narrowing down the problem now.
Thank you,
Patrick
On 10/29/2010 12:42 PM, Tamas Ungi wrote:
> Hi Patrick,
>
> This line hangs:
> (inputItr->second)->SetCalibratedTransform( toolCalibratedTransform );
> in function: void Tracker::UpdateStatusSuccessProcessing( void ) in
> file: igstkTracker.cxx It is around line 822;
>
> So I went into the SetCalibratedTransform( ... ) function, and found
> that the call:
> this->InvokeEvent( transformEvent );
> in file: igstTrackerTool.cxx
> around line: 502;
> Doesn't return. The program hangs there (or goes somewhere in VTK?).
>
> How should I proceed debugging?
> Thanks,
> Tamas
>
>
>
> -----Original Message-----
> From: Patrick Cheng [mailto:cheng at isis.georgetown.edu]
> Sent: Thursday, October 28, 2010 5:07 PM
> To: Tamas Ungi
> Cc: igstk-users at public.kitware.com
> Subject: Re: [IGSTK-Users] Error in Release mode, not in Debug mode
>
> Hi Tamas,
>
> I tried to reproduce the error with Windows 7 + Visual Studio 2008.
>
> I used the attached testing program, a pulse generator with a simple
> callback to print out pulse count. It works under both Release and
> Debug. So PulseGenerator is not the problem.
>
> My guess is there might be some problem with the pulse generator
> callback functions in AscensionTracker code.
>
> There are three place to check:
>
> 1. igstkTracker.cxx line 736
> void Tracker::AttemptToUpdateStatusProcessing( void )
>
> 2. igstkTracker.cxx line 775
> void Tracker::UpdateStatusSuccessProcessing( void )
>
> 3. igstkAscension3DGTracker line 300
> Ascension3DGTracker::ResultType
> Ascension3DGTracker::InternalUpdateStatus()
>
> Can you debug your code and check to see if whether the callback
> function get stuck in one of these places?
>
> Thank you,
>
> Patrick
>
> On 10/28/2010 3:06 PM, Tamas Ungi wrote:
>> Hi Patrick,
>>
>> Yes, the main function begins with
>> igstk::RealTimeClock::Initialize();
>> I have inserted text outputs in igstkPulseGenerator.cxx, and found
>> out that the line:
>> (t->cb)(t->arg);
>> around line 445 in igstkPulseGenerator.cxx doesn't return, but hangs.
>> The first time it is called.
>>
>> Thanks,
>> Tamas
>>
>>
>>
>> -----Original Message-----
>> From: Patrick Cheng [mailto:cheng at isis.georgetown.edu]
>> Sent: Thursday, October 28, 2010 2:38 PM
>> To: Tamas Ungi
>> Cc: igstk-users at public.kitware.com
>> Subject: Re: [IGSTK-Users] Error in Release mode, not in Debug mode
>>
>> Hi Tamas,
>>
>> Do you have the following line in the beginning of your code?
>>
>> igstk::RealTimeClock::Initialize();
>>
>> In release mode, all uninitialized memory are set to zeros. This
>> could be the potential reason of failing.
>>
>> Patrick
>>
>> On 10/28/2010 2:13 PM, Tamas Ungi wrote:
>>> Hi IGSTK Users,
>>>
>>> I have a strange problem.
>>>
>>> I have written a simple command line program using IGSTK, using just
>>> an Ascension3DGTrackerTool and a
>>> TrackerToolObserverToOpenIGTLinkRelay
>>> object. The main loop looks like this:
>>>
>>> try
>>>
>>> {
>>>
>>> while( 1 )
>>>
>>> {
>>>
>>> igstk::PulseGenerator::Sleep( unsigned int( 1000 / refreshRate ) );
>>>
>>> igstk::PulseGenerator::CheckTimeouts();
>>>
>>> }
>>>
>>> }
>>>
>>> catch( std::exception&e )
>>>
>>> {
>>>
>>> std::cerr<<e.what()<<"\n";
>>>
>>> return EXIT_FAILURE;
>>>
>>> }
>>>
>>> In Debug mode (Visual Studio 2008) the program works perfectly.
>>> However, in Release mode, the CheckTimeouts() function never
>>> returns, and the program is stuck at that line (line 6 in the above
>>> snippet)
>> forever.
>>>
>>> Anybody have any idea how can this be?
>>>
>>> I would appreciate any help.
>>>
>>> Thank you,
>>>
>>> Tamas
>>>
>>>
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-users
>>
>>
>>
>
>
>
More information about the IGSTK-Users
mailing list