[IGSTK-Users] Error in Release mode, not in Debug mode
Patrick Cheng
cheng at isis.georgetown.edu
Thu Oct 28 14:38:04 EDT 2010
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