像这样的错误怎么调试
HEAP[sacdil_pc.exe]: HEAP: Free Heap block 1d30e68 modified at 1d30e90 after it was freed
Windows has triggered a breakpoint in sacdil_pc.exe.
This may be due to a corruption of the heap, which indicates a bug in sacdil_pc.exe or any of the DLLs it has loaded.
This may also be due to the user pressing F12 while sacdil_pc.exe has focus.
The output window may have more diagnostic information
[解决办法]
野指针的问题。
这样查找:
GFlags是windows debug tools 工具包下的一个工具,在Windows 2000的Resource Kit中也可以找得到。用来设置一些调试属性,总体上分为3个级别System, Kernel, 和 Image File。
我们设置好Path环境变量,将其指向Debug tools工具的目录下。
输入如下命令行:
gflags /p App.exe /full
或者 pageheap app.exe /full
该命令行会在注册表里设置一些调试参数,使内存在使用的时候加入了保护机制,所以一旦内存写越界,或者发生野指针的问题,都会导致一个中断。由此,你就可以确定问题到底出在哪里了。