Heisenbug:WinApi程序在一些电脑崩溃 [英] Heisenbug: WinApi program crashes on some computers

查看:226
本文介绍了Heisenbug:WinApi程序在一些电脑崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮助!我真的在我的智慧结束。
我的程序是一个小的个人笔记管理器(google的cintanotes)。
在某些计算机上(当然我自己没有),它在开始之后与未处理的异常崩溃。



环境:Windows XP,Visual C ++ 2005/2008,原始WinApi 。



这里是关于这个Heisenbug的一个确定:



1)崩溃只发生在发布版本。



2)当我移除所有与GDI相关的内容时,崩溃就会消失。



3)BoundChecker没有抱怨。



4)写一个日志表明崩溃发生在一个局部int变量的声明上!这怎么可能?内存损坏?



任何想法都将非常感谢!



更新:得到应用程序在一个有故障的PC调试。结果:



CintaNotes.exe中0x0044a26a处的未处理异常:0xC000001D:非法指令。



和代码中断



0044A26A cvtsi2sd xmm1,dword ptr [esp + 14h]



所以似乎问题出在代码生成/启用增强指令集编译器选项。它被设置为/ arch:SSE2,并且在不支持SSE2的机器上崩溃。我已将此选项设置为未设置,错误消失了。

解决方案

div>

所以它不会崩溃时配置是DEBUG配置?有很多事情不同于RELEASE配置:
1.)全局初始化
2.)实际机器代码生成等..



第一步是找出与DEBUG模式相比,RELEASE模式下每个参数的确切设置。



-AD


Please help! I'm really at my wits' end. My program is a little personal notes manager (google for "cintanotes"). On some computers (and of course I own none of them) it crashes with an unhandled exception just after start. Nothing special about these computers could be said, except that they tend to have AMD CPUs.

Environment: Windows XP, Visual C++ 2005/2008, raw WinApi.

Here is what is certain about this "Heisenbug":

1) The crash happens only in the Release version.

2) The crash goes away as soon as I remove all GDI-related stuff.

3) BoundChecker has no complains.

4) Writing a log shows that the crash happens on a declaration of a local int variable! How could that be? Memory corruption?

Any ideas would be greatly appreciated!

UPDATE: I've managed to get the app debugged on a "faulty" PC. The results:

"Unhandled exception at 0x0044a26a in CintaNotes.exe: 0xC000001D: Illegal Instruction."

and code breaks on

0044A26A cvtsi2sd xmm1,dword ptr [esp+14h]

So it seems that the problem was in the "Code Generation/Enable Enhanced Instruction Set" compiler option. It was set to "/arch:SSE2" and was crashing on the machines that didn't support SSE2. I've set this option to "Not Set" and the bug is gone. Phew!

Thank you all very much for help!!

解决方案

So it doesnnt crash when configuration is DEBUG Configuration? There are many things different than a RELEASE configruation: 1.) Initialization of globals 2.) Actual machine Code generated etc..

So first step is find out what are exact settings for each parameter in the RELEASE mode as compared to the DEBUG mode.

-AD

这篇关于Heisenbug:WinApi程序在一些电脑崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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