[SlimDX] Direct3DX9NotFoundException is thrown

Started by
18 comments, last by Promit 15 years, 5 months ago
Hello, I'm a part of the development team of Visions, a 3D Image Management System. (The application can be downloaded from here: http://www.twins-solutions.com) We are using SlimDX in our app. Some of our customers (approximately 5% of them) are getting the Direct3DX9NotFoundException exception when starting the application. The problem is that our installer uses DirectX web setup (by Microsoft) to update DirectX to the latest version and even if we ask them to do a manual install (either using the web setup or download the full DirectX package) they get this exception. The web setup informs the user that DirectX is already installed. We searched through the internet for a solution but couldn't get anything. Can you help? Thanks, Maor Cohen Twins Solutions
Advertisement
You need to include the DirectX redistributable package (Or get them to download it) that comes with your SDK version. The web installer only installs D3D, not D3DX the latest version of D3D and D3DX, not every version.

The November 2007 redist is here.
I'm not sure whether it'd be possible on a non-dev environment, but have you considered using the fusion log viewer to see which DLL's it's trying to pull in? Maybe use Process Monitor from sysinternals to monitor LoadLibrary/ReadFile events. Again, not exactly simple for an end-user but you may well find that its the best source of information.

You may find that through some obscure oversight on your part its not looking for DLL's in the right place and that the web installer is in fact installing the latest-n-greatest D3DX version. Or maybe it isn't - but the aforementioned tools should tell you what its looking for and you can then start to figure out why it can't find it...


hth
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

Quote:Original post by Evil Steve
The web installer only installs D3D, not D3DX the latest version of D3D and D3DX, not every version.
[lol]I was just about to call you on your original post! But I must admit I missed the small print on it being only the latest and not every D3DX...


Anyway, maorc, you can probably ignore my overly complex suggestions and just package up your dependencies and installer correctly instead. That should sort everything out [smile]


cheers,
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

Thank you both for the quick and detailed replies.

As I said in my post, I already asked my customers to use the full DirectX installation package (the redistributable version), that didn't help.

When I asked one of my users to export a report using dxdiag.exe I found out that some of the files are not updated to the latest (unlike on my computer for example) even though he used the redist package.

Asking my customer to use file/process monitor is too complex. I must find the problem myself...

The question is where should I look for the problem, in Microsoft's DirectX installation or in SlimDX "D3DXCheckVersion" method (which is actually the method that throws the exception). I do hope that the problem is with SlimDX. It would be quicker to fix... ;)
The SlimDX code doesn't actually check the result of D3DXCheckVersion; it's just calling it to force the DLL to load at that point, and looking for an SEHException (indicating that the delay load failed to resolve). You should be able to use dependency walker to look up the exact name of the DLL it expects, and that DLL ought to be present in the user's WINDOWS_ROOT\system32 directory. If that DLL is present on the system and SlimDX is still throwing that exception, then something is definitely wrong with SlimDX...otherwise, it would probably be an MS bug.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Thanks promit,

I downloaded the utility and launched it on my computer for the SlimDX library. The following DirectX libraries are shown as a dependency:

D3D10.DLL
D3D10CORE.DLL
D3D8THK.DLL
D3D9.DLL
D3DX10_38.DLL
D3DX9_38.DLL

I have no problem on my computer and SlimDX is working just fine. But still, is it OK that the dependency is D3DX9_38.DLL? shouldn't it be D3DX9.DLL?

Anyway, I asked my customer to do the same as I did and I will give his result soon.

Maor
Quote:Original post by maorc
I have no problem on my computer and SlimDX is working just fine. But still, is it OK that the dependency is D3DX9_38.DLL? shouldn't it be D3DX9.DLL?
For the last few years all releases of D3DX have had an incrementing number attached to them. Whichever SDK your build of SlimDX was built with contained this particular version and hence you've got a dependency on it.

hth
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

OK. So when updating DirectX to the latest version (using web setup or redist package) this file should definitely be there, right?
Quote:Original post by maorc
OK. So when updating DirectX to the latest version (using web setup or redist package) this file should definitely be there, right?
As far as I remember, the web package installs the latest version of DirectX and the latest version of the D3DX library, and the redist package installs the latest version of DirectX and every version of the D3DX library. You should have the redist run as part of your installer (I'm not really sure of the details here, Jack or someone else may be able to give better advice), so it installs the files you need.

You could verify this by trying to use LoadLibrary() (Or C# equivalent) near the time your app starts, and if that fails you know the D3DX DLL isn't installed.

This topic is closed to new replies.

Advertisement