Re: [Quickfix-developers] BodyLength or CheckSum missing
Brought to you by:
orenmnero
From: Joerg T. <Joe...@ma...> - 2003-11-03 16:12:54
|
Oren Miller wrote: > Post you're fix to the developers list and someone > will check it in. It would be a good idea to update > the test case to reflect this problem. Do you have a > test case that will make the old code fail but is > succesfull with your code? Something like this will > allow us to get it into the codebase quicker. Thanks! I already thought of checking this in, but was lacking the test case. So if you have a test case, Brian, I could do the check-in. Cheers, Jörg > --- Brian Egge <Br...@ma...> wrote: > >>I think I have found the problem that is causing >>this error. The error only >>surfaces when the 8=Fix is received, but the >>9=length has not been. >> >>The problem is in Parser.cpp: >> >>bool Parser::extractLength( int& length, >>std::string::size_type& pos, >> const std::string& >>buffer ) >>throw( MessageParseError& ) >>{ QF_STACK_PUSH(Parser::extractLength) >> >> if( !buffer.size() ) return false; >> >> std::string::size_type startPos = buffer.find( >>"\0019=", 0 ); >> if( pos == std::string::npos ) return false; >>// This should be: >>// if( startPos == std::string::npos ) return >>false; >>// >> startPos += 3; >> std::string::size_type endPos = buffer.find( >>"\001", startPos ); >>// This should be: >>// if( endPos == std::string::npos ) return false; >>// >> pos = endPos + 1; >> >>What happens with the current code is strLength gets >>set to 'FIX.4.x'. This >>raises and exception and throws a MessageParseError. >> >>I'd like to get this fix checked in to CVS. I >>haven't used CVS before, and >>I don't know who is given access to check in >>changes. >> >>Brian >> >> >>-----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 > >> >> > ------------------------------------------------------- > >>This SF.net email is sponsored by: SF.net Giveback >>Program. >>Does SourceForge.net help you be more productive? >>Does it >>help you create better code? SHARE THE LOVE, and >>help us help >>YOU! Click Here: http://sourceforge.net/donate/ >>_______________________________________________ >>Quickfix-developers mailing list >>Qui...@li... >> > > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > > > __________________________________ > Do you Yahoo!? > Exclusive Video Premiere - Britney Spears > http://launch.yahoo.com/promos/britneyspears/ > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > -- Joerg Thoennes http://macd.com Tel.: +49 (0)241 44597-24 Macdonald Associates GmbH Fax : +49 (0)241 44597-10 Lothringer Str. 52, D-52070 Aachen |