|
Gentlemen,
Recently I got some comments from picky developers that the MICO library throws access violation exception on Win32 if you never initialize the ORB but you just load and unload the DLL. This problem happens only if you use the debug version of the MICO DLL and you set the debugger to catch unhandled access violation exceptions. If you are ignoring this exception you see only 2 lines in the MSDEV output window that unhandled access violation exception has been caught and could not see anything by running it in release mode.
I took the time today and tracked down this very simple problem.
In file setterm.cc:
Line 56:
SetHandlers::SetHandlers() { terminate_handler oldTHand = set_terminate(termfunction);
unexpected_handler oldXHand = set_unexpected(unexpectedfunction); }
should be:
SetHandlers::SetHandlers() { oldTHand = set_terminate(termfunction); oldXHand = set_unexpected(unexpectedfunction); }
Since the constructor was using local variables instead of its private members the destructor passed in uninitialized values:
SetHandlers::~SetHandlers() { set_terminate(oldTHand); set_unexpected(oldXHand); }
and it caused access violation. This class is used on WIN32 only.
Cheers:
Zoltan Bordas Software Engineer OpenSpirit Corporation +1 281.295.1426 direct +1 281.295.1401 fax
|
_______________________________________________ Mico-devel mailing list [email protected] http://www.mico.org/mailman/listinfo/mico-devel
