C++ Debugging problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All,

I am writing a Thread pooled P2P application using C++ and VS2005,
occasionally I get “HEAP: Free Heap block 356bf0 modified at 356f84 after it
was freed“,When the error is triggered, it report a constant memory address,
this address belong to a certain object, if this object is NOT removed from
memory the problem is never produced, however, when the object IS REMOVED the
problem happen while accessing a totally different object ( which seems
awkward to me ).

However, the problem happen ONLY when I am Launching the app in debug mode
from VS2005 IDE ( e.g. pressing F5 ), when attaching the debugger the problem
doesn’t re-produce and no error is triggered, also when using VS2003, WinDbg
or running without a debugger the problem doesn’t re-produce.

May this be a problem with the debugger? Are there any known issues with
VS2005 C++ debugger?

Any help would be appreciated
 
My guess is that you are doing a double free/delete call, which causes
a whole bunch of heap problems. Try this call in VS2005 and see if it
shows the same error:

byte *x = new byte[2048];
delete x;
delete x;


Simon Ellis
http://www.AutoUpdatePlus.com
Get software updates to your clients the Quick and Easy way!
Latest Version ==========>>> Client Computer
 
Try using "gflags" to enable full page heap checks. You need lots of memory
though. You can download it from MS.
-Michael Viking
 
Back
Top