您的位置:首页 > 其它

调用回调函数出现或者大循环出现has triggered a breakpoint

2016-11-11 16:30 337 查看
triggered a breakpoint 的意思是触发一个断点。
这个问题一般发生在程序运行过程中。
下面是错误发生显示的信息:
Windows has triggered a breakpoint in xxx.exe.
This may be due to a corruption of the heap, which indicates a bug in xxx.exe or any of the DLLs it has loaded.
This may also be due to the user pressing F12 while t.exe has focus.
The output window may have more diagnostic information.
这个错误发生的两个原因:
1.用delete或是free删除不是堆栈上的变量。
比如:
int n = 88;
delete n;
2.使用了已经delete或是free后的变量。
比如:
char *str = (char *) malloc(100); strcpy(str, "hello"); free(str); if(str != NULL) { strcpy(str, "world"); printf(str); }
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐