I conducted further tests on the subject and I found the statement
Session::lookupSession(*i) returns a NULL pointer when the Session ID "*i"
contains partial or empty data.
In fact, logging "i->toString()", I sometimes get strings like
":->" or "FIX.4.2:->".
I think while executing the copy statement "SessionIDs connected =
m_connected;"
the mutex "m_mutex" should be locked. If not, a different thread might
concurrently execute the method Initiator::setDisconnected( const SessionID&
sessionID )
and destroy the SessionID object while it is being copied from one std::set
to the other.
Regards,
Pasquale d'Aloise
GATElab
Mail pas...@ga...
Web www.gatelab.com
( London Tel. +44(0)20 70605055 - 32 Sackville Street, Mayfair - W1S 3EA
London (UK)
( MilanTel. +39 02 86984604 -Via Maurizio Gonzaga, 7 - 20123 Milan (IT)
( IserniaTel. +39 0865 451890 - Viale dei Pentri, 161 - 86170 Isernia (IT)
________________________________________
Please consider the environment before printing this e-mail
----- Original Message -----
From: "Pasquale d'Aloise" <pas...@ga...>
To: <qui...@li...>
Sent: Tuesday, October 14, 2008 10:40 AM
Subject: Exception in Initiator::stop(bool force)
> Sometimes I get an exception in method void Initiator::stop( bool force ).
> This occurs when my session disconnects for a
> heartbeat timeout.
>
> Doing some tests, I noticed that sometimes the following code
> in the above mentioned method
> Session* pSession = Session::lookupSession(*i);
>
> returns a NULL pointer, so the next statement
> pSession->isEnabled()
>
> cause the exception raising.
>
> I think that a pointer nullity control should be added
> to the code.
>
> Regards,
> Pasquale d'Aloise
>
> GATElab
> Mail pas...@ga...
> Web www.gatelab.com
> ( London Tel. +44(0)20 70605055 - 32 Sackville Street, Mayfair - W1S 3EA
> London (UK)
> ( MilanTel. +39 02 86984604 -Via Maurizio Gonzaga, 7 - 20123 Milan (IT)
> ( IserniaTel. +39 0865 451890 - Viale dei Pentri, 161 - 86170 Isernia (IT)
> ________________________________________
> Please consider the environment before printing this e-mail
|