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