Game Development Community

TSE Crashes On D3D Init

by Bryce "Cogburn" Weiner · in Torque Game Engine Advanced · 11/15/2004 (4:46 pm) · 12 replies

I have an FX5200 with the latest drivers (66.93). DX9 is installed correctly and up to date according to DXDIAG. The DXSDK used was the Oct 2004 version, with the Extras added for VC6.

TSE compiles fine per the directions on the website. When I run the application I get the following assert:

gfxd3ddevice.cpp : Line 1257
"Could not create D3D object, make sure you have the latest version of DirectX installed."

Other D3D and OpenGL applications work without error.

What's going wrong?

#1
11/16/2004 (11:55 am)
For some reason it cannot get a DirectX9 interface on your system. I recently put this assert in because the TSE car demo was crashing when users running DirectX 9b ran the demo (the demo was compiled with DirectX 9c).

Since you are compiling this yourself, the above case should not be happening.

Did you remove a previous version of the DXSDK before you installed the October release? If you install one SDK over the other without removing the first, you can run into problems. Did you install a DirectX runtime over the SDK? That can do it too. Ie. if you installed a game recently that installed DirectX, it may have installed the 9b runtime on your system and messed it all up.
#2
11/16/2004 (12:21 pm)
Interesting.

I very well may have had an old version of the SDK on my system from another project.

To verify its not the OS, I ran the application on a fresh WinXP install w/ DX9. Same crash.

To confirm: the problem then, as you stated, is in the SDK (and subsequent compile) and NOT in the DirectX runtime?
#3
11/16/2004 (4:58 pm)
The DirectX SDK should (in theory) install the proper runtime, however if you tried it on a clean system, it may not have had the correct runtime.
#4
11/17/2004 (12:50 pm)
I don't know ;) I don't think you can eliminate one or the other from your test. I'd uninstall both the SDK and DirectX and then reinstall the SDK.

You aren't doing anything weird with your DX9 header files are you? I'm guessing it returns NULL if the SDK version you are passing in doesn't match the runtime.
#5
11/17/2004 (2:01 pm)
After you uninstall the SDK and DX make sure you reboot so everything is cleaned up properly. Then you can re-install your SDK. I highly recommend that you choose the debug version when installing.

Also, on a developer machine NEVER update your DX runtime separately from the SDK. You're asking for trouble if you do.

If you already have the debug version installed try running it from within the IDE. The DX debug output may give you more information.
#6
12/25/2004 (12:48 pm)
I'm having this problem. I can run the demo binary fine, and if I compile the source with the Debug configuration, it will run, but if I compile it with the Release configuration, it gives me the "Could not create D3D object, make sure you have the latest version of DirectX installed."

I am using the December 2004 SDK update, video card is a FX5500 with 66.93 drivers. I originally had older drivers, 56.something, and I couldnt run the car demo. Since i updgraded to 66.93, I was able to run the car demo. I just cant run anything that I build myself in Release configuration.

I did have the Summer 2003 update installed before I installed the Dec 2004 update. I have since uninstalled both, rebooted, and reinstalled Dec 2004, and did a full rebuild, but the problem persists.

I'm going to try to debug this and find whats going on, but if anybody has any ideas, do tell :D

Peace

P.S. just got myself TSE for Christmas, it looks great from what I've been able to see, and seems likely to consume more of my time in 2005 than everything else combined :p
#7
12/25/2004 (1:02 pm)
This is the debug output I get when this happens:

The application was compiled against and will only work with D3D_SDK_VERSION (32), but the currently installed runtime is version (31).

I tried installing the Redist that came with the Dec 2004 update, but it doesnt seem to install anything, like it's detecting that the latest version is already installed. I tried manually replacing the DLL files from the CABs, but it still does the same thing.

Peace
#8
12/25/2004 (1:32 pm)
Okay, so I've deduced atleast that it doesn't have anything to do with TSE. It does the same thing if I try to run the samples that came with the SDK. It just doesnt want to install the updated DLLs for some reason. When I look in the system32 folder at d3d9.dll it shows a modified date of 5/18/2004, the d3d9.dll in the SDK shows a modified date of 7/9/2004. When I install the redist it retains the old d3d9.dll file, and even if I copy the d3d9.dll to my system32 folder from the CAB file, it seems to revert back to the old version instantly, still showing 5/18/2004 and with a different file size than what comes with the SDK. It is showing the correct date on the d3d9d.dll, which I guess would explain why it works when I compile in debug mode.

So I'm currently downloading the October 2004 update, which I presume is the version congruent with my current runtimes. I just want to get this bad boy working before I go to bed so I can dream in HLSL.

Peace
#9
12/26/2004 (5:06 am)
Okay, I am still having a problem with this. Not sure what the major malfunction is. Maybe somebody has encountered this in the past...

First I hosed my system completely when I was manually copying the DLL files, so I reinstalled Windows XP Pro. After installing the drivers, I downloaded the October 2004 Update of the SDK and installed it. When I run DXDIAG it shows my version as 9.0c, and in the applicationn when I call getDXVersion, it returns DirectX 9.0c. But as soon as it tries to create the D3D object, it prints out this error message and returns NULL:

The application was compiled against and will only work with D3D_SDK_VERSION (32), but the currently installed runtime is version (31).


When I look in the header files from the SDK, it shows that version 31 is 9.0b. For some reason it's detecting that 9.0b is installed when it tries to create the D3D object, even though it's detecting 9.0c is installed immediately before that when I call getDXVersion. It even does the same thing when I try to run any of the samples that come with the SDK.

But I can run both of the TSE demos as can be downloaded from this website with no problem. And if I build in Debug mode, I can run my project as well.

Weird stuff indeed. Anybody encounter this before?

The only other thing I can think of is I just realized that I was installing Windows from an SP2 Beta disc. I'm going to try reinstalling with a retail disc a little later and see if that makes any difference, might be some weird bug that was in the beta.

Peace
#10
12/26/2004 (12:34 pm)
Yeah, I'd definitely make sure I was on a really clean install - retail official everything. I've had some _VERY_ odd problems come up that have only been fixed by ripping out all my drivers, making sure my OS is really really clean, and reinstalling in the right order from scratch...

Charming, isn't it? :)

Once TSE is in a more final state, we'll be focusing a lot more effort onto getting it to play nice in these situations. Not to say we aren't striving for compatibility now, just that it'll be a lot easier for us to acheive it once the actual featureset of the GFX layer is completed. ;)
#11
12/26/2004 (1:20 pm)
Yeah, I decided to take a break from worrying about it for now, it's the holidays and Im not supposed to be stressing over anything until atleast Jan. 2 :p

So I'm just playing around with it in debug mode and using the exe that came with the demo to test some things, get accustomed to the new materials, etc.

So far I like it a lot. Relatively painless to merge with the TGE base,the performance on my dev rig isnt that great, but the performance on my game rig is awesome; never goes below 200fps on a 3.0P4 with GF6800. The procedural shaders are awesome and I'm looking forward to putting my shader skills to the test soon ;)

Peace
#12
01/12/2005 (3:03 pm)
To follow up on this, I finally got ambitious enough to try again ;) I reinstalled Windows using a retail SP1 disc, installed VS.NET and DXSDK Oct 2004... works like a charm. I guess the beta SP2 had some DirectX issues.

Peace