如果调试运行良好,但释放崩溃,该怎么办 [英] what to do if debug runs fine, but release crashes

查看:98
本文介绍了如果调试运行良好,但释放崩溃,该怎么办的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序在调试版本中运行良好,但是当我在版本构建中启动它时,我得到一个

  unhandled 0x0043b134在myapp.exe中的异常:0xC0000005:
在位置0x004bd96c处读取时访问违例


$ b b

如果我点击'break'它告诉我没有符号加载,源代码不能显示。





谢谢!

解决方案

这种问题通常是由于统一的变量。我从那里开始寻找你的问题。



调试模式是更宽容的,因为它通常配置为初始化未显式初始化的变量。



也许你正在删除一个单位化的指针。在调试模式下,它的工作原理是指针被nulled和删除ptr将确定在NULL。在发布它有一些垃圾,然后删除ptr将实际上导致一个问题。


I have an application that runs just fine in the debug build, but when I start it in the release build, i get a

unhandled Exception at 0x0043b134 in myapp.exe: 0xC0000005:
Access violation while reading at position 0x004bd96c

if i click on 'break' it tells me that there are no symboles loaded and the sourcecode can't be displayed.

What can I do in such a situation to track down the problem?

thanks!

解决方案

This kind of problem is often due to unitialized variables. I'd start there looking for your problem.

Debug mode is more forgiving because it is often configured to initialize variables that have not been explicitly initialized.

Perhaps you're deleting an unitialized pointer. In debug mode it works because pointer was nulled and delete ptr will be ok on NULL. On release it's some rubbish, then delete ptr will actually cause a problem.

这篇关于如果调试运行良好,但释放崩溃,该怎么办的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆