[IGSTK-Users] Error in Release mode, not in Debug mode
Tamas Ungi
ungi.tamas at gmail.com
Thu Oct 28 15:06:51 EDT 2010
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