views:

377

answers:

4

I just got a bug report from someone running an app I wrote under Windows XP. He says it won't start up.

The application failed to initialize properly (0xc0150002). Click on OK to terminate the application.

It works fine at my end, (under Windows 7,) and I don't have any Win7- or Vista-specific stuff in the program, so it should work on XP too. How do I go about tracking this down and debugging it?

A: 

Perhaps your application is compiled in x64 and he's running a 32-bit OS? It's the usual cause for this in my personal experience.

edit: it can also be the lack of shared components such as .NET, DirectX or similar

Jonas B
Nope. I'm on a 32-bit compiler.
Mason Wheeler
Ok, well if it isnt that and it doesnt have anything to do with missing components on the xp computer, I suggest you do check that thread the other guy posted in the comment for ways to debug.
Jonas B
+1  A: 

The solution when I asked this question was to use Process Monitor. More specifically, you should have the person seeing the error run it and send you the log.

Chris Dodd
OK, just did that, and there's nothing obvious in the log file, like "tried to open a DLL and it wasn't there". It just gets to a certain part of the initialization process and ends.
Mason Wheeler
+6  A: 

I've generally seen this error when there is a DLL missing or out of date which is required by your program (or even a component that you are using). Using dependency walker may help identify the DLL that you didn't know you were using.

Also if you are using any managed code, make sure that the customer has the latest version of the .net framework installed.

If you can get the customer to run a belarc audit report, the final section of that report lists all installed software and drivers, which can be very helpful in identifying what is installed that might be conflicting.

skamradt
Yep, that was it. I had updated Visual Studio, which I use to build a certain DLL, and apparently somewhere along the way the "statically link the runtime" setting got lost. I fixed that and he says it works now.
Mason Wheeler
A: 

Maybe a service pack issue? Looks like Microsoft ran into this with an Office update on unpatched XP. I expect it would also apply to broken service packs, or otherwise botched systems. I'd also make sure that the MD5 Sum matches between your version of your app and his, as he may have a corrupt executable.

Chris Thornton