Details
Description
When connecting and disconnecting to a server and the sequence numbers get out of sync the SingleThreadedEventHandlingStrategy tries to log an event after the initiator has closed all of its sessions. This causes the quickfix.LogUtil.logThrowable(LogUtil.java:54) to throw a NPE as there is no session to get the log from.
This is an intermittent bug as there are a number of threads involved (QFJ Timer, SocketConnectorIoProcessor-6.0, and QFJ Message Processor). One iteration logs the following message:
quickfix.SessionException Logon state is not valid for message (MsgType=5)
another has the NPE and yet another has not issues at all.
The full stack trace is:
Exception in thread "QFJ Message Processor" java.lang.NullPointerException
at quickfix.LogUtil.logThrowable(LogUtil.java:54)
at quickfix.mina.SingleThreadedEventHandlingStrategy$SessionMessageEvent.processMessage(SingleThreadedEventHandlingStrategy.java:109)
at quickfix.mina.SingleThreadedEventHandlingStrategy.block(SingleThreadedEventHandlingStrategy.java:70)
at quickfix.mina.SingleThreadedEventHandlingStrategy$1.run(SingleThreadedEventHandlingStrategy.java:86)
at java.lang.Thread.run(Thread.java:619)