Re: [Quickfix-developers] Virtual Function Call Exception
Brought to you by:
orenmnero
|
From: Oren M. <or...@qu...> - 2006-06-14 03:34:06
|
FYI to other users of the .NET API. This cause of this problem has
been discovered. It should be noted that calling stop() on the
initiator is 1000x more important in .NET because otherwise the GC
might not know it needs to keep the initiator alive. This means
forgetting to call stop will not only cause you to crash when
shutting down, it can actually cause you to crash while the
application is running. This is the example I sent to George that
demonstrates what happens.
Main()
{
ThreadedSocketInitiator initiator = new ThreadedSocketInitiator();
initiator.start();
...
Sleep(300000) // CLI says "initiator is not referenced again.
Let's garbage collect it!"
...
}
Main()
{
ThreadedSocketInitiator initiator = new ThreadedSocketInitiator();
initiator.start();
...
Sleep(300000) // CLI says "I still need to call stop on
initiator. Let's leave it alone for now."
...
initiator.stop();
}
On Jun 12, 2006, at 10:46 AM, George Papa wrote:
> QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/
> html/index.html
> QuickFIX Support: http://www.quickfixengine.org/services.html
>
> Hi,
>
> I just started using QuickFix with some success but have run into a
> problem with the engine throwing a pure virtual function call
> exception (from the C++ library). I'm using the C# wrapper
> (version 1.11.1). I saw on the archive that there had been some
> discussion of this type of problem a few years ago and was
> wondering if there is any new info.
>
> Symptom is as follows:
>
> using threaded socket initiator an exeception is thrown after about
> 60 seconds (4-6 heartbeats). using socket initator the engine
> simply disappears (no trappable exception at all) after about the
> same interval.
>
> I'm trying to integrate the QuickFix engine with a separate
> (multithreaded/async) library. When stripped down to only quickfix
> things seem to work fine. When I add some .NET threaded timers (no
> C# level interaction with the QF engine) I start to get exceptions.
>
> I'm still digging and should know more soon but am looking for hints.
>
> -g
> _______________________________________________
> Quickfix-developers mailing list
> Qui...@li...
> https://lists.sourceforge.net/lists/listinfo/quickfix-developers
|