views:

98

answers:

3

It's very stange, but I moved from VS2005 to VS2008 (MFC, VC++) and now the recompiled program causes a BSOD or a reboot on XP SP2 (works ok on SP3 and above). It doesn't get to InitInstance.

Has anyone experienced this and knows where to look to fix it? I'm tinkering with project settings at the moment, but unsuccessfully so far.

Debug and release behave the same way (reboot).

Thanks in advance!

Added: it actually goes through the CWinApp constructor ok, but dies somewhere in between before getting to InitInstance.

A: 

Probably you have some kind of hardware issue, or driver problem that is causing this. Check your memory to make sure they are properly seated, and the fans - maybe the CPU is overheating. In general, there is no possibility of a user mode program causing a BSOD.

1800 INFORMATION
I'm not actually getting a BSOD in my test environment, I'm getting a reboot (a BSOD was reported by at least one user). I've tested it on 2 different machines (one virtual, one real), so it's not hardware.
dennisV
+1  A: 

If it happens before InitInstance, I'd put a breakpoint in the CWinApp constructor to see if that gets hit. If not then it very well could be a dll loading problem.

Is it possible that one of your dll's was compiled with vs2005 and then linked with vs2008?

Or that you edited the manifest file by hand and load the wrong sxs dlls?

chollida
I've put messages boxes in the constructor and it gets through all of them, but never show a message box that's on the first line of InitInstance. I suppose my next step is to setup remote debugging to see if that shows anything.I don't have many DLLs, maybe only a couple third-party ones that I link to, it's worth checking though (I'll do so later tonight).Not sure about the manifest file - I don't know what sxs dlls are?
dennisV
A: 

It appears to be linked to manifest. After I disabled generating a manifest and instead supplied one that I created manually things started to work ok again.

dennisV
I'm glad I was able to help you:)
chollida
Yes, but it does seem that it actually prefers the manifest that I created myself versus the one it generates. Weird - you'd hope it knows what's it doing.
dennisV
Is it possible that you copied the manifest that was created in vs2005 to your machine with vs2008( ie was it under source control). That would certainly cause an issue.
chollida
Yes, I had a manifest that I had manually created in VS2005 (I needed to add some sections to it) brought in to VS2008. What I didn't realize was that VS2008 was already trying to generate and embed it's own manifest as well.
dennisV