RE: [Quickfix-developers] unhandled exception
Brought to you by:
orenmnero
From: <or...@qu...> - 2005-02-12 11:09:18
|
<div>QF_STACK_CATCH shouldn´t prevent the application from crashing. In fact it should crash on an unhandled exception so you can get the stack trace. The solution is to make sure that the exception is handled appropriately in the quickfix library. I believe this particular problem has been fixed, but we will research it further.</div> <div> </div> <div>--oren</div> <BLOCKQUOTE style="PADDING-LEFT: 8px; MARGIN-LEFT: 8px; BORDER-LEFT: blue 2px solid"><BR>-------- Original Message --------<BR>Subject: [Quickfix-developers] unhandled exception<BR>From: "Sean Kirkpatrick" <Sea...@Pi...><BR>Date: Thu, February 10, 2005 12:54 pm<BR>To: qui...@li...<BR><BR> <META content="MS Exchange Server version 6.5.7226.0" name=Generator><!-- Converted from text/rtf format --> <div><FONT face=Arial size=2>Hello everyone,</FONT> </div> <div><FONT face=Arial size=2>We experienced a crash within quickfix this morning due to an unhandled std::exception.</FONT> <BR><FONT face=Arial size=2>We're currently running 1.7.0 in our production system and will be upgrading to 1.9.4 soon,</FONT> <BR><FONT face=Arial size=2>but after going through the exception handling, it seems like the potential for a crash is</FONT> <BR><FONT face=Arial size=2>still there. The code that appears to be problematic is in CallStack.h:</FONT> </div> <div><FONT face=Arial size=2>#define QF_STACK_CATCH \</FONT> <BR><FONT face=Arial size=2> } catch( ... ) { FIX::CallStack::output(); throw; }</FONT> </div> <div><FONT face=Arial size=2>The problem we had in 1.7.0 occurred when a reject was attempted in response to a logon</FONT> <BR><FONT face=Arial size=2>message after finding a tag out of order. The std::exception that was thrown bubbled all the</FONT> <BR><FONT face=Arial size=2>way up to Acceptor::startThread, where exceptions are handled by QF_STACK_POP and</FONT> <BR><FONT face=Arial size=2>QF_STACK_CATCH. I would have thought that because this is the entry point for the</FONT> <BR><FONT face=Arial size=2>acceptor thread, the buck should stop there. As you can see from the definition of</FONT> <BR><FONT face=Arial size=2>QF_STACK_CATCH, the exception was caught and re-thrown, resulting in the crash. The</FONT> <BR><FONT face=Arial size=2>code for QF_STACK_CATCH the same in 1.9.4, but if a reject is attempted when a session</FONT> <BR><FONT face=Arial size=2>is not logged in, a std::logic_error is thrown instead of a std::exception.</FONT> </div> <div><FONT face=Arial size=2>Should the throw be removed from the definition of QF_STACK_CATCH?</FONT> </div> <div><FONT face=Arial size=2>Regards,</FONT> </div> <div><FONT face=Arial size=2>Sean Kirkpatrick</FONT> </div></BLOCKQUOTE> |