RE: [Quickfix-developers] BodyLength or CheckSum missing
Brought to you by:
orenmnero
From: Brian E. <Br...@ma...> - 2003-10-27 19:16:12
|
Today I received some messages which raises a BodyLength/CheckSum error, and I have some additional logging. Here's a section of my log: 20031027-15:00:53 : BodyLength or CheckSum missing 20031027-15:00:53 : InvalidMessage caught in SocketConnection::read. BodyLength or CheckSum missing The message is: '' In SocketConnection::read I added this handler: catch ( InvalidMessage& e) { std::string errmsg("InvalidMessage caught in SocketConnection::read. "); errmsg += e.what(); errmsg += " The message is: '"; errmsg += msg; errmsg += "'"; m_pSession->getLog()->onEvent( errmsg ); std::cout << errmsg << std::endl; if ( !m_pSession->isLoggedOn() ) s.getMonitor().drop( m_socket ); } So, within SocketConnection::read, I am getting an empty message. I'm not quite sure where this is coming from, but my message store shows several areas of empty lines. One possible cause might be in 'SocketConnection::readMessage' try { return m_parser.readFixMessage( msg ); } catch ( MessageParseError& ) {} return true; It would seem to me that this should return 'false' if an error is handled. I seem to only get this error when there is high message volume occuring. I'm not sure if this is related to QuickFix or the venue that I'm connecting to. -----Original Message----- From: Miller, Oren [mailto:OM...@ri...] Sent: Tuesday, October 14, 2003 6:02 PM To: Br...@ma...; qui...@li... Subject: Re: [Quickfix-developers] BodyLength or CheckSum missing Do yo have an example of a message that causes this error? -------------------------- Sent from my BlackBerry Wireless Handheld -----Original Message----- From: Brian Egge <Br...@ma...> To: qui...@li... <qui...@li...> Sent: Tue Oct 14 10:10:55 2003 Subject: [Quickfix-developers] BodyLength or CheckSum missing I seem to be having a problem where I get an InvalidMessage("BodyLength or CheckSum missing") exception thrown from Message::validate(). When I look at my logs, or even re-parse the message, everything is in tact. I can't see any reason why this exception is being thrown. I only get this with one venue, and it only happens every couple of days or so. Has anyone else had this problem before? I've added some more logging to this area, and I think I will figure it out soon. The item that concerns me more is that this exception does not get handled, and the EH eventually calls terminate() or abort() and the program ends. I'm using version 1.6, and I have two suggestions. 1) "bool SocketConnection::read( SocketAcceptor& a, SocketServer& s )" has an exception handler, while bool "SocketConnection::read( SocketConnector& s )" does not. My exception occurs in the latter case. I copied the exception code from the one read to the other to make them consistent. 2) I added try {} catch(...) statement to the onStart() procedures, to trap any unhanded exceptions. I'd rather have the thread safely terminate than for my whole app to end. If these changes are worthwhile, I'll try to merge them in CVS. -Brian ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php _______________________________________________ Quickfix-developers mailing list Qui...@li... https://lists.sourceforge.net/lists/listinfo/quickfix-developers |