deleting INITIATOR pointer causing HEAP corruption error (C++)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

deleting INITIATOR pointer causing HEAP corruption error (C++)

Dilipsinh Bheda
QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/


Hello all,

What I did is as below (VS2010):

 

{ //constructor

settings = new FIX::SessionSettings("MT4FIX.cfg");

storeFactory = new FIX::FileStoreFactory(*settings);

initiator = new FIX::SocketInitiator(fixApp, (*storeFactory), (*settings));

}

 

{ //destructor

if(initiator)

       {

              initiator->stop();

              delete initiator;  <- here exception generated

              initiator = NULL;

       }

}

 

 

Call Stack

                ntdll.dll!779eda25()        

                ntdll.dll!779d1a83()        

                ntdll.dll!779a37be()        

>             mfc100d.dll!__except_list()  + 0x78746341 bytes               Unknown

               FIXSample.exe!FIX::Dictionary::getString(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & key=, bool capitalize=)  Line 40 + 0x13 bytes    C++

 

Exception

Windows has triggered a breakpoint in FIXSample.exe.

This may be due to a corruption of the heap, which indicates a bug in FIXSample.exe or any of the DLLs it has loaded.

This may also be due to the user pressing F12 while FIXSample.exe has focus.

 

Cursor Stop in Dictionary.cpp

  if( capitalize )

->     std::transform(result.begin(), result.end(), result.begin(), toupper);

 

 

Please give me any solution to solve this error…..

 

Regards

Dilip


------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers