Re: [libtorrent] Heap corruption when debugging in Visual Studio 2005
Brought to you by:
arvidn
From: Allen Z. <xl...@ka...> - 2006-08-22 02:32:22
|
I used to have this problem. But it ends up all with my own coding problem. Most notably, if memory block is allocated from inside libtorrent dll, and later freed outside libtorrent, I will surely see this error. The copy constructor of STL will just get this problem worse. Once I allocate the memory first, and then pass only the pointer to libtorrent dll, I did not see any further problems like this. Best regards, Allen Zhao On Mon, 21 Aug 2006, Tianhao Qiu wrote: > Hi, > > This has been bugging me for some time. When I debug my application that > uses libtorrent in Visual Studio 2005, a message box keeps popping up: > > " > Windows has triggered a breakpoint in simple_client.exe. > > This may be due to a corruption of the heap, and indicates a bug in > simple_client.exe or any of the DLLs it has loaded. > > The output window may have more diagnostic information > " > > It happens so frequently that it becomes impossible to debug the > program. But I can see no problem at all in the codes from the calling > stack. > > Today I decide to try the simple_client example in libtorrent to make > sure this is not caused by my codes. The libtorrent library and the > simple_client are both built using the original bjam scripts, and the VC > project is created with the external build option. I hit F5 and after a > while, boom, the message box shows up... > > What's weird is that if I start the program without debugging (Ctrl-F5) > and then attach to the process to debug it, everything is fine. > > Does anyone else have the same experience? > > Thanks, > -- > Tianhao > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Libtorrent-discuss mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss > |