{{Quickfixn}} How to logoff? FileLog error: System.ObjectDisposedException
Grant Birchmeier
gbirchmeier at connamara.com
Thu Jan 9 09:47:02 PST 2014
Miguel,
Looks like we might have some kind of timing condition here. Every
instance of FileLog should only be disposed once. It's apparently
happening twice.
Does it always happen on the second time you call Stop()?
-Grant
On Mon, Jan 6, 2014 at 1:05 PM, Manuel Lopez <lopez.post at gmail.com> wrote:
> One thought is that perhaps I should be implementing the IDisposable
> interface in order to do a session close and logout. (Didn't see that
> in the sample app, which just does a logout().)
>
> On Mon, Jan 6, 2014 at 12:47 AM, Manuel Lopez <lopez.post at gmail.com>
> wrote:
> > If I'm not doing something wrong, I may have run into a bug with
> > quickfix 1.5. Almost any version of this code eventually (usually
> > after some delay) produces a disposed exception in filelog ("init" is
> > an instance of SocketInitiator):
> > if (init != null)
> > {
> > if (init.IsStopped == false)
> > {
> > init.Stop(); //this by itself gives an error
> eventually
> > //init.Stop(true) // and so does this.
> > }
> > // init.Dispose(); // this also gives the same
> error.
> > }
> >
> > Is there another way of closing down the connection (init.Stop() is in
> > the sample app)? Thanks.
> >
> > The error I get is:
> > An unhandled exception of type 'System.ObjectDisposedException'
> > occurred in QuickFix.dll
> > Cannot access a disposed object.
> > Object name: 'FileLog'.
> > at QuickFix.FileLog.DisposedCheck() in
> >
> c:\Archive\QuickFixN\quickfixn-v1.5.0\source\quickfixn-master\QuickFIXn\FileLog.cs:line
> > 68
> > at QuickFix.FileLog.OnEvent(String s) in
> >
> c:\Archive\QuickFixN\quickfixn-v1.5.0\source\quickfixn-master\QuickFIXn\FileLog.cs:line
> > 112
> > at
> QuickFix.Transport.SocketInitiator.SocketInitiatorThreadStart(Object
> > socketInitiatorThread) in
> >
> c:\Archive\QuickFixN\quickfixn-v1.5.0\source\quickfixn-master\QuickFIXn\Transport\SocketInitiator.cs:line
> > 77
> > at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
> > at System.Threading.ExecutionContext.RunInternal(ExecutionContext
> > executionContext, ContextCallback callback, Object state, Boolean
> > preserveSyncCtx)
> > at System.Threading.ExecutionContext.Run(ExecutionContext
> > executionContext, ContextCallback callback, Object state, Boolean
> > preserveSyncCtx)
> > at System.Threading.ExecutionContext.Run(ExecutionContext
> > executionContext, ContextCallback callback, Object state)
> > at System.Threading.ThreadHelper.ThreadStart(Object obj)
> _______________________________________________
> Quickfixn mailing list
> Quickfixn at lists.quickfixn.com
> http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com
>
--
Grant Birchmeier
*Connamara Systems, LLC*
*Made-To-Measure Trading Solutions.*
Exactly what you need. No more. No less.
http://connamara.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20140109/b1e8ee8e/attachment-0002.htm>
More information about the Quickfixn
mailing list