Re: [Quickfix-developers] Re questing Previous Messages
Brought to you by:
orenmnero
From: Patrick W. <pw...@ka...> - 2008-08-15 06:04:21
|
I don't have your exact error but I remember there was a problem holding a reference to the message store. This is my code similar to yours: var list = new ArrayList(); _messageStore.refresh(); _messageStore.get(seqNum.getValue(), seqNum.getValue() + 1, list); if (list.Count == 1) { try { var refMessage = new Message((string) (list[0])); if (refMessage is NewOrderSingle) .... Where _messageStore is a class variable: protected MessageStore _messageStore; What I found was that this object would now be disposed twice when the class was destroyed so I had to put in this code: public virtual void Shutdown() { //Must call this or else messagestore is double-deleted in cpp if (_messageStore != null) { GC.SuppressFinalize(_messageStore); _messageStore = null; } } Like I said, not exactly the same as your problem but maybe a bit similar. Maybe you could try suppress finalize on your temp message store variable?? Patrick -----Original Message----- From: qui...@li... [mailto:qui...@li...] On Behalf Of Alexis Michaelides Sent: Friday, 15 August 2008 10:33 AM To: qui...@li... Subject: Re: [Quickfix-developers] Re questing Previous Messages QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html QuickFIX Support: http://www.quickfixengine.org/services.html Karl, (and anybody else who's listening!) Have you managed to figure this one out? I'm having the same issue when accessing the MessageStore from within a call to fromAdmin(). When I receive a message in fromAdmin(), I look at the MsgType and if it's a SessionReject (3), I'm attempting to look up the original message so I can perform further processing on it (e.g. if it was a new order message, create an order rejected and send back to the OMS etc). This is throwing a "Runtime Error! R6025 - pure virtual function call" without fail! However it appears that my MessageStore.get() call returned successfully - it seems the error happens asynchronously to my calling that method. I'm also using the C# wrapper, with a ThreadedSocketInitiator handling multiple sessions. Thanks! Alexis Karl Schulze-3 wrote: > > QuickFIX Documentation: > http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > > I am trying to use the store attached to a particular session in order to > request historical messages by the sequence number. I am running the C# > wrapper to quickfix and am requesting the previous message with the > following code: > > int seqNum = (int)lvFixMessages.SelectedItems[0].Tag; > ArrayList msgList = new ArrayList(); > FixApplication.Session.getStore().get(seqNum, seqNum, msgList); > if(msgList.Count > 0) > { > QuickFix.Message msg = new Message((string)msgList[0]); > } > > I may be running into a multi-threaded issue here, as this is called from > the user interface thread, but I was hoping that read operations were > threadsafe. > > The problem is characterisitic of multi-threading issues, sometimes it > works > just fine. Other times I get an AccessViolationException "Attempted to > read > or write protected memory. This is often an indication that other memory > is > corrupt." > > Or sometimes I also get "Runtime Error! R6025 - pure virtual function > call" > > Please let me know if there is a threadsafe way to access the filestore. I > am using a filestore and a single initiator, with a standard Application. > > Thanks, > > -Karl > > ------------------------------------------------------------------------- > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > Studies have shown that voting for your favorite open source project, > along with a healthy diet, reduces your potential for chronic lameness > and boredom. Vote Now at http://www.sourceforge.net/community/cca08 > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > -- View this message in context: http://www.nabble.com/Requesting-Previous-Messages-tp18316609p18991978.html Sent from the QuickFIX - Dev mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Quickfix-developers mailing list Qui...@li... https://lists.sourceforge.net/lists/listinfo/quickfix-developers |