[Quickfix-developers] NewOrderList addgroup threw "Attempted to read or write protected memory. Thi
Brought to you by:
orenmnero
From: Gehani, N. <nee...@ci...> - 2009-01-22 20:25:02
|
Here is the log of exception this threw. This is the first time this problem has surfaced. App has been used for almost half year. Any Ideas. 2009-01-22 13:30:06,515 [35] FATAL TradeManager - Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at FIX.FieldMap.addGroup(FieldMap* , Int32 , FieldMap* , Boolean ) at QuickFix.Message.addGroup(Group group) at FixUtil.createNewOrderList(FixRequestDetails frd) at Communicator.SendNewOrderList(FixRequestDetails frd) at TradeManager.Execute(Queue`1 queue) at TradeManager.Manage(Object state) Code statements int listSeqNo = 0; QuickFix44.NewOrderList newOrderList = new QuickFix44.NewOrderList(); Hashtable listsCache = null; QuickFix.ListID listID = null; listsCache = PortfolioManager.Instance.getListsCache(frd.PortfolioID); listID = new ListID("ABC"); newOrderList.setField(listID); QuickFix.BidType bidType = new QuickFix.BidType(QuickFix.BidType.DISCLOSED_STYLE); newOrderList.setField(bidType); QuickFix44.NewOrderList.NoOrders sequenceGroup = null; foreach (Order order in orders.Values) { sequenceGroup = new QuickFix44.NewOrderList.NoOrders(); SoupLogger.getLogger().InfoFormat("Processing Frd={0} Order {1}", frd.getTag66(),order.ToString()); sequenceGroup.setField(new QuickFix.Account(order.ActMnc)); sequenceGroup.setField(new QuickFix.ClOrdID(order.OrderId)); sequenceGroup.setField(new QuickFix.ListSeqNo(++listSeqNo)); sequenceGroup.setField(new QuickFix.Symbol(order.Ticker)); if (order.TickerSuff != null && order.TickerSuff.Length != 0 ) sequenceGroup.setField(new QuickFix.SymbolSfx(order.TickerSuff)); if (order.Side == OMConstants.BUY) { sequenceGroup.setField(new QuickFix.Side(QuickFix.Side.BUY)); } else if (order.Side == OMConstants.SELL) { sequenceGroup.setField(new QuickFix.Side(QuickFix.Side.SELL)); } else if (order.Side == OMConstants.SELLSHORT) { sequenceGroup.setField(new QuickFix.Side(QuickFix.Side.SELL_SHORT)); } else if (order.Side == OMConstants.SELLSHORTEXEMPT) { sequenceGroup.setField(new QuickFix.Side(QuickFix.Side.SELL_SHORT_EXEMPT)); } string[] locateIdArr = order.LocateIds.Split(':'); sequenceGroup.setField(FixConstants.LOCATEBROKERNAME, locateIdArr[0]); sequenceGroup.setField(FixConstants.LOCATEBROKERID, locateIdArr[1]); sequenceGroup.setField(new QuickFix.OrderQty(order.Quantity)); sequenceGroup.setField(FixConstants.SUBLISTID, order.ListId); sequenceGroup.setField(FixConstants.TRADERSOEID, order.ClientName); sequenceGroup.setField(new IntField(FixConstants.SRCSYSTEMID,srcSystemId)); sequenceGroup.setField(new IntField(FixConstants.AGGUNIT, 999); sequenceGroup.setField(new QuickFix.SenderCompID(senderCompId)); sequenceGroup.setField(new QuickFix.TargetCompID(targetCompId)); sequenceGroup.setField(new QuickFix.OrderID(order.OrderId)); sequenceGroup.setField(new QuickFix.TimeInForce(TimeInForce.DAY)); sequenceGroup.setField(new QuickFix.OrderCapacity(OrderCapacity.AGENCY)); sequenceGroup.setField(new QuickFix.UtcTimeStampField( FixConstants.ORDERFLOWENTRYTIME, DateTime.UtcNow)); newOrderList.addGroup(sequenceGroup); } |