Visual C++: Invalid allocation size. How to force the debugger to stop on this message?
- by James Roth
The MFC program I am debugging is printing this message in the "Output" window in Visual Studio 9.0:
HEAP[AppName.exe]: Invalid allocation size - 99999998 (exceeded 7ffdefff)
I'm pretty sure this is due to a bad "new", uninitialized variable or similar error.
The question is: how do I get the debugger to stop on this message so that I can view the stack trace and solve the problem?