[Ace-users] [ace-users] ~ACE_Reactor crashes under Win32
jtc at acorntoolworks.com
Thu Nov 15 08:11:21 CST 2007
"Vial, Florent" <fvial at arri.de> writes:
> Everything goes fine from the functionality point of view.
> When I close the application, the destructor of the client calls
> ACE_Reactor::notify() on the reactor, and wait().
> This goes fine, but when the destructor of ACE_Reactor is called, there
> is a crash happening with the very clear message "0xC0000005: Access
> violation reading location 0x04f9fad0".
> This corresponds to the line :
> ACE_Event_Handler::Reference_Counting_Policy::value (void) const
> return this->value_;
> The call stack is following :
> ACEd.dll: ACE_Event_Handler::Reference_Counting_Policy::value() Line
> 232 + 0x3 bytes
> Line 777 + 0xf bytes
> ACEd.dll: ACE_WFMO_Reactor_Handler_Repository::make_changes() Line 417
> ACEd.dll: ACE_WFMO_Reactor::~ACE_WFMO_Reactor() Line 1332 + 0x19 bytes
> ACEd.dll: ACE_WFMO_Reactor::`vector deleting destructor'() + 0x6c bytes
> ACEd.dll: ACE_Reactor::~ACE_Reactor() Line 123 + 0x39 bytes
> MyApp.exe: MyClass::MyClientTask::~MyClientTask() Line 50 + 0x15 bytes
> Anyone would have a clue of what might go wrong ?
> Thank you in advance,
In the future, please use the PROBLEM-REPORT-FORM in the ACE_wrappers
directory when asking questions. Without this info, we have to guess
what version/platform/compiler/options you are using, which is very
error prone and slows down our responsiveness.
It appears that your crash occurs when the reactor trys to access the
reference count of your event handler object. Since this happens in
destruction, my suspicion is that the event handler has already been
destructed even though it's still registered with the reactor. Take a
second look at the object lifecycle of your event handlers and your
reactor and see if anything jumps out.
More information about the Ace-users