compiling a game for Vista

Started by
17 comments, last by Tayron 15 years, 3 months ago
Hello. I'm making a game on WinXP using Visual C++ 2005 and DX9. The thing is I can't get it to work on Vista regardless of the run-time and dx install. I have a dll with my engine and the main exe. I've also compiled them with VC++ express 2008 and it still doesn't work. Is there something I'm missing? I removed the includes missing from VC++ 2008 here's the pic clicky and here's the output I got from the resulting MS window Problem signature: Problem Event Name: APPCRASH Application Name: cj.exe Application Version: 0.0.0.0 Application Timestamp: 49679376 Fault Module Name: d3d9.dll Fault Module Version: 6.0.6000.16386 Fault Module Timestamp: 4549bdc9 Exception Code: c0000142 Exception Offset: 00008fc7 OS Version: 6.0.6000.2.0.0.768.3 Locale ID: 1033 Additional Information 1: 9d13 Additional Information 2: 1abee00edb3fc1158f9ad6f44f0f6be8 Additional Information 3: 9d13 Additional Information 4: 1abee00edb3fc1158f9ad6f44f0f6be8 Read our privacy statement: http://go.microsoft.com/fwlink/?linkid=50163&clcid=0x0409 any ideas? :(
Advertisement
Is one a 64 bit platform and the other a 32? It should still work regardless of that, and I thought I remember reading the Vista likes DX10 better, but I could be mistaken. Sorry I'm not much help.
/ Visual Studios 2010 / Codeblocks 10.05 / Windows 7 / Ubuntu 10.10 / - I might be wrong
Which version of the DirectX SDK are you compiling with?
try disabling the UAC and run as administrator
Are you sure you got the runtimes??

Because the VC2005 and VC2005 SP1 are two TOTALLY DIFFERENT REDISTRIBUTABLES.
If you install VC2005 redist and you compiled with SP1 compiler, it will crash.
If you install VC2005 SP1 redist and you compiled with non-SP1 compiler, it will crash.

It's a common mistake.

Also check the "Successors Log" or something (I can't remember the name well) in the Control Panel it shows detailed description. Is a pain in the ass to find it, but provides very usefull information about the crash if the crash it's Windows-specific
Quote:Original post by calav3ra
try disabling the UAC and run as administrator


Don't do this, leave UAC on.

I would suggest you try re-installing the DirectX9 runtime. Do you run other DirectX (9) games on this Vista computer without trouble, or do they all give the same error?

The "Fault Module Name: d3d9.dll" part seems suspicious to me. Did you install Vista SP1 recently?
Quote:Original post by Codeka
Quote:Original post by calav3ra
try disabling the UAC and run as administrator

Don't do this, leave UAC on.
To briefly provide some reasoning for that, it wouldn't be a correct solution to the problem if UAC or elevation were the cause of the problem - a well designed application should be able to work just fine whilst UAC is running and (unless it's doing something special) without requiring elevation to administrator privledges - disabling UAC/running as admin would therefore be hiding or avoiding rather than actually fixing the problem, and would mean similar measures would therefore also have to be taken by your (potentially less technically competent) end users.

- Jason Astle-Adams

ah, don't worry, I found the problem. I forgot to remove #include <altconv.h> from one of my frameworks:) thanks for helping out anyway:) oh, and I am using SP1. seems vista can't handle altconv.h....oh well...at least it works:D
Quote:Original post by Tayron
Problem signature:
Let's review it, shall we?

Since Vista created a problem report, that means it created a crash dump.

Lucky you!

The easiest thing is to copy the crash dump over to the computer that compiled it, and open the thing in visual studio with your project loaded. The IDE should magically start the debugger and go to the line of the crash.

Most of the Express Editions don't support crash dumps, so if you are using those just follow the next paragraph.


To debug without the full Visual Studio installed, you can use the Debugging Tools suite for it. Microsoft has provided instructions to download and run the debugging tools, run the debugger with the crash dump, and perform extremely basic analysis. You should also have your application's map file or pdb file ready if you go this route.


With the dump file, the pdb file from that build, and your corresponding source code, you'll be able to completely debug the application as though it had just barely crashed within your debugger.



But if you don't want to do that, you can tell a few things from the summary by itself.

01>> Problem Event Name: APPCRASH
02>> Application Name: cj.exe
03>> Application Version: 0.0.0.0
04>> Application Timestamp: 49679376
05>> Fault Module Name: d3d9.dll
06>> Fault Module Version: 6.0.6000.16386
07>> Fault Module Timestamp: 4549bdc9
08>> Exception Code: c0000142
09>> Exception Offset: 00008fc7
10>> OS Version: 6.0.6000.2.0.0.768.3
11>> Locale ID: 1033
12>> Additional Information 1: 9d13
13>> Additional Information 2: 1abee00edb3fc1158f9ad6f44f0f6be8
14>> Additional Information 3: 9d13
15>> Additional Information 4: 1abee00edb3fc1158f9ad6f44f0f6be8

This is the summary information from the crash dump. It means
1> Your app crashed. More information should be available in your system's error log. (run eventvwr.msc)

2-4> This is the app that crashed.

5-7> This is the module that crashed. It is the latest version of DX on Vista. Look for something in your app that calls DirectX

8> c0000142 == DLL Initialization Failed. Great! Now you know it is where D3D9.dll is loading libraries. My first guess is a call to CreateDevice() with bad parameters, although it could be many other places.

9> The offset is where within the file that it crashed. This won't help you much without your map file or pdb file.

10-11> Those are details about the OS when it crashed.
12-15> Some parameters sent to the crash debugging tool. They won't help you much by themselves.


So you know the app (which can be hard to track down sometimes), that it was a call within D3d9 called by your app, and that a DLL couldn't be loaded/initialized.

That's enough to start poking around in your source code, even without hooking up a debugger as described in the first half of the post.
Quote:Original post by Tayron
ah, don't worry, I found the problem. I forgot to remove #include <altconv.h> from one of my frameworks:) thanks for helping out anyway:) oh, and I am using SP1. seems vista can't handle altconv.h....oh well...at least it works:D

Just including that file by itself would not cause the crash. You changed something else in your program as well, or you are just getting lucky and not triggering the bug that still exists in your app.

This topic is closed to new replies.

Advertisement