首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >随机崩溃调试

随机崩溃调试
EN

Stack Overflow用户
提问于 2009-08-13 19:18:56
回答 2查看 235关注 0票数 0

我有一个程序,在运行2-4小时后随机崩溃(看起来)。我是在Visual Studio Pro 2008下用c++开发的。由于崩溃发生在注入的DLL中(被注入到第三方软件内存空间的内存空间中),我不能使用Visual Studio调试器,但我可以使用iter进程通信(我使用邮箱)获得一些输出到控制台。所以这里有一个问题:调试这个的最好方法是什么?有没有第三方软件/插件/调试器可以告诉我哪个变量是NULL导致崩溃?

谢谢你的帮助。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2009-08-13 19:30:52

尝试在Windbg下运行该程序。当崩溃发生时,你可能会得到一些关于原因的具体信息。您可以启动托管dll的第三方进程,然后将windbg调试器附加到该进程。当崩溃发生时,windbg可能会停止并报告某种类型的异常。然后您可以使用各种windbg命令来查看线程堆栈等。

票数 1
EN

Stack Overflow用户

发布于 2009-08-13 19:54:47

大家好,

你的问题给我带来了两个警报。

代码语言:javascript
复制
* a memory leak smell which could be verified by running the same set of input and seeing if the crash happens at about the same elapsed time, and
* a specific test case that is tickling something in your third party library. You could do a binary chop on your input data to track down what's triggering this. I just had to do this to track down which request out of over two hundred thousand was triggering a memory leak in a custom Apache module. Divide and conquer. Divide and conquer. Divide and conquer. Repeat and rinse.

HTH

“祝你快乐,

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/1274033

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档