Direct X dll Crash - (d3dx9_33.dll).

Post Reply
glio
Posts: 10
Joined: Thu Mar 05, 2009 8:33 am
Location: Grenoble

Direct X dll Crash - (d3dx9_33.dll).

Post by glio »

Hello,

I have building OpenVibe on 3 computers, with the visual 2008 express compiler.

The first on windows vista SP1 (Last directX release installed), and the others on windows xp SP3 (no directX installed).

OpenVibe works perfectly on computers with XP, although an error message is displayed at the launch of gtk graphical user interfaces signaling that the d3dx9_33.dll can't be found.

[ ERROR ] <Ogre3D::Log> OGRE EXCEPTION(7:InternalErrorException): Could not load dynamic library .\RenderSystem_Direct3D9. System Error: Le module spécifié est introuvable. in DynLib::load at ..\src\OgreDynLib.cpp (line 80)

But, when I put the d3dx9_33.dll in the bin directory, the application crashes.

On vista, the application crashes too, but if I disabled the dll, OpenVibe works as on the other computers.

But, consequently, some boxes with 3D features as the 3D Topographic map are not working.

[ ERROR ] Plugin 3D topographic map was disabled because the required 3D context couldn't be created!

Thank you for your help !

Notice :
d3dx9_33.dll is the Direct3D 9 library of the Direct X suite.
http://msdn.microsoft.com/en-us/library ... S.85).aspx

yrenard
Site Admin
Posts: 645
Joined: Fri Sep 01, 2006 3:39 pm
Contact:

Post by yrenard »

OpenVibe works perfectly on computers with XP, although an error message is displayed at the launch of gtk graphical user interfaces signaling that the d3dx9_33.dll can't be found.
Ogre3D is configured to user DirectX render engine as default. This could eventually be switched to OpenGL but I recommand you install DirectX on the two XP computers. DirectX can be downloaded from there : http://www.microsoft.com/downloads/deta ... 20F1244A8E
But, when I put the d3dx9_33.dll in the bin directory, the application crashes.
d3dx9_33.dll is part of DirectX. You definitely should not get this DLL from another computer and copy/paste it in the OpenViBE folders. Just follow the standard DirectX installation procedure.
On vista, the application crashes too, but if I disabled the dll, OpenVibe works as on the other computers.
But, consequently, some boxes with 3D features as the 3D Topographic map are not working.
Please give me more details about this crash. I'd suggest lowering the log level to Debug in the configuration manager so we can determine what's going on at the time of the crash.

The configuration file is in /share/openvibe.conf (precompiled version) or openvibe-kernel-omk/trunc/share/openvibe.conf (svn version, must build again for changes to take effect!).

Tokens to edit :

Kernel_MainLogLevel = Debug
Kernel_ConsoleLogLevel = Debug
Kernel_FileLogLevel = Debug

Please post the last lines of the log file dumped in lib/openvibe-designer.log (precompiled version) or /dist/share/openvibe-designer.log

glio
Posts: 10
Joined: Thu Mar 05, 2009 8:33 am
Location: Grenoble

Post by glio »

Ok...

So first, on the Vista computer, with Direct X normally installed :

for :
Kernel_MainLogLevel = Debug
Kernel_ConsoleLogLevel = Debug
Kernel_FileLogLevel = Debug

The 4 last lines before the crash are :
[ DEBUG ] <Ogre3D::Log> Plugin successfully installed
[ DEBUG ] <Ogre3D::Log> *-*-* OGRE Initialising
[ DEBUG ] <Ogre3D::Log> *-*-* OGRE Version 1.4.9 (Eihort)
[ TRACE ] Ogre resources file ../share/openvibe-kernel-omk/resources.cfg
- CRASH -

But no problem for loading the RenderSystem_Direct3D9 (36/38 lines before...).

----------------------------------------------------------------------------

Exactly the same for XP, with the RenderSystem_Direct3D9 library in the bin directory. (I have not Admin rights to do anything in the system32 directory, but I can put all DirectX .dll in the dist/bin OpenVibe directory.)

---------------------------------------------------------------------------

The "../share/openvibe-kernel-omk/resources.cfg" file :

# Resource locations to be added to the 'boostrap' path
# This also contains the minimum you need to use the Ogre example framework
[Bootstrap]
Zip=../share/openvibe-kernel-omk/OgreCore.zip

# Resource locations to be added to the default path
[General]
FileSystem=../share/openvibe-kernel-omk/

yrenard
Site Admin
Posts: 645
Joined: Fri Sep 01, 2006 3:39 pm
Contact:

Post by yrenard »

So first, on the Vista computer, with Direct X normally installed :

for :
Kernel_MainLogLevel = Debug
Kernel_ConsoleLogLevel = Debug
Kernel_FileLogLevel = Debug

The 4 last lines before the crash are :
Please send the complete log (you can use something like http://pastebin.ca)
Exactly the same for XP, with the RenderSystem_Direct3D9 library in the bin directory. (I have not Admin rights to do anything in the system32 directory, but I can put all DirectX .dll in the dist/bin OpenVibe directory.)
Definitely don't copy any DirectX file in the bin directory, this is not the way to proceed. Please ask your sysadmin to install DirectX on those XP computers. Alternatively, remove the openvibe-kernel-omk/trunc/share/openvibe-kernel-omk/ogre.cfg file. This will force Ogre3D to open a popup window that will let you choose OpenGL in place of DirectX and generate a new dist/share/openvibe-kernel-omk/ogre.cfg that you will copy in openvibe-kernel-omk/trunc/share/openvibe-kernel-omk if you are happy with OpenGL and don't want the popup to reappear.

glio
Posts: 10
Joined: Thu Mar 05, 2009 8:33 am
Location: Grenoble

Post by glio »

Good morning.

Grrr... No sysadmin this morning...
Alternatively, remove the openvibe-kernel-omk/trunc/share/openvibe-kernel-omk/ogre.cfg file. This will force Ogre3D to open a popup window that will let you choose OpenGL in place of DirectX and generate a new dist/share/openvibe-kernel-omk/ogre.cfg that you will copy in openvibe-kernel-omk/trunc/share/openvibe-kernel-omk if you are happy with OpenGL and don't want the popup to reappear.
For execution or compilation ? I suppose that it's for compilation because no popup appears during execution. But an interesting fact is that Ogre seems configured for OpenGL by default.

Ogre.cfg file :

Code: Select all

Render System=OpenGL Rendering Subsystem

[OpenGL Rendering Subsystem]
FSAA=0
Full Screen=No
RTT Preferred Mode=FBO
# Stereovision=Disabled
Video Mode=800 x 600
------------------------------------------------------------------------
Quote:

So first, on the Vista computer, with Direct X normally installed :

for :
Kernel_MainLogLevel = Debug
Kernel_ConsoleLogLevel = Debug
Kernel_FileLogLevel = Debug

The 4 last lines before the crash are :


Please send the complete log (you can use something like http://pastebin.ca)
The complete LOG for Vista, Direct X (November2008) :

http://pastebin.ca/1354275


The complete LOG for XP, without Direct X :

http://pastebin.ca/1354280

(With the Direct3D & Ogre ERROR line 160.)

Thank you !

yrenard
Site Admin
Posts: 645
Joined: Fri Sep 01, 2006 3:39 pm
Contact:

Post by yrenard »

But an interesting fact is that Ogre seems configured for OpenGL by default.
Seems like you're right on this point.
Looking closer to the second log file, I see that the actual DirectX warning is launched when Ogre tries to open the DirectX renderengine. In fact, the popup you see is not explicitely opened by Ogre, this is automatcally done by Windows as a DLL this renderengine relies on is missing. Ogre then logs a message to notify this and actually switches to other available renderengines.

I can not help on the Vista bug for now, we'll have to wait for Vicent. He wrote this code and better understands what's going on at resource loading time.

Concerning the XP without DirectX machine, I think the 3D functionnalities should work correctly automatically switching to OpenGL, even if Ogre keeps showing this popup message concerning DirectX at startup

If this warning definitely annoys you, you can completely disable the DirectX renderengine commenting the 7th line of dependencies/ogre/bin/debug/Plugins.cfg and dependencies/ogre/bin/release/Plugins.cfg, resulting in the following files :

Code: Select all

# Defines plugins to load

# Define plugin folder
PluginFolder=.

# Define plugins
#Plugin=RenderSystem_Direct3D9_d
Plugin=RenderSystem_GL_d
Plugin=Plugin_ParticleFX_d
Plugin=Plugin_BSPSceneManager_d
Plugin=Plugin_OctreeSceneManager_d
Plugin=Plugin_CgProgramManager_d
and

Code: Select all

# Defines plugins to load

# Define plugin folder
PluginFolder=.

# Define plugins
#Plugin=RenderSystem_Direct3D9
Plugin=RenderSystem_GL
Plugin=Plugin_ParticleFX
Plugin=Plugin_BSPSceneManager
Plugin=Plugin_OctreeSceneManager
Plugin=Plugin_CgProgramManager

glio
Posts: 10
Joined: Thu Mar 05, 2009 8:33 am
Location: Grenoble

Post by glio »

Concerning the XP without DirectX machine, I think the 3D functionnalities should work correctly automatically switching to OpenGL, even if Ogre keeps showing this popup message concerning DirectX at startup
In facts, no. When the application didn't find the Direct3D DLL, OGRE is disabled without any change of the render-engine. So OpenVibe is launched, but without the 3D functions.
If this warning definitely annoys you, you can completely disable the DirectX render-engine commenting the 7th line of dependencies/ogre/bin/debug/Plugins.cfg and dependencies/ogre/bin/release/Plugins.cfg, resulting in the following files :
Interesting. When I do this .cfg files modification, OpenVibe switches to the OpenGL render-engine and... crashes. And that on both OS.
So this problem is independent of the OS and of the render-engine.

BUT..., I know now why OpenVibe crashes ! :D


In fact, the problem is in the ./dist/share/openvibe.conf configuration file where we can disabled completely the render-engine by editing the token [Kernel_3DVisualisationEnabled= false].

http://pastebin.ca/1354559

More precisely, the problem is located at the line n°37 :

Code: Select all

#Kernel_3DVisualisationOgrePluginsWindows = $Environment{OGRE_HOME}/bin/debug/Plugins.cfg
This line was commented and, as apparently I'm in the debug mode, the render-engine can't be loaded correctly and the application crashes.

So, with the token [Kernel_3DVisualisationEnabled= true] (line 32) and the line 37 uncommented, the application starts without any crash.


BUT ! (To easy without an other problem...:( ) I have an other problem with Ogre...

When I start, for example, the designer. I have a new error :

With the render-engine Direct3D :

Code: Select all

[ DEBUG ] <Ogre3D::Log> Loading library .\RenderSystem_Direct3D9_d
[ ERROR ] <Ogre3D::Log> OGRE EXCEPTION(7:InternalErrorException): Could not load dynamic library .\RenderSystem_Direct3D9_d.  System Error: Cette application n'a pas pu démarrer car la configuration de l'application est incorrecte. Réinstaller l'application pourrait résoudre ce problème.

 in DynLib::load at ..\src\OgreDynLib.cpp (line 80)
[ TRACE ] <Ogre3D::Exception> Failed to initialize Ogre : OGRE EXCEPTION(7:InternalErrorException): Could not load dynamic library .\RenderSystem_Direct3D9_d.  System Error: Cette application n'a pas pu démarrer car la configuration de l'application est incorrecte. Réinstaller l'application pourrait résoudre ce problème.

 in DynLib::load at ..\src\OgreDynLib.cpp (line 80)
[ TRACE ] Failed to initialize Ogre
And with OpenGL :

Code: Select all

[ DEBUG ] <Ogre3D::Log> Loading library .\RenderSystem_GL_d
[ ERROR ] <Ogre3D::Log> OGRE EXCEPTION(7:InternalErrorException): Could not load dynamic library .\RenderSystem_GL_d.  System Error: Cette application n'a pas pu démarrer car la configuration de l'application est incorrecte. Réinstaller l'application pourrait résoudre ce problème.

 in DynLib::load at ..\src\OgreDynLib.cpp (line 80)
[ TRACE ] <Ogre3D::Exception> Failed to initialize Ogre : OGRE EXCEPTION(7:InternalErrorException): Could not load dynamic library .\RenderSystem_GL_d.  System Error: Cette application n'a pas pu démarrer car la configuration de l'application est incorrecte. Réinstaller l'application pourrait résoudre ce problème.

 in DynLib::load at ..\src\OgreDynLib.cpp (line 80)
[ TRACE ] Failed to initialize Ogre
RenderSystem_Direct3D9_d.dll and RenderSystem_GL_d.dll are in the directory. So I don't know why they can't be loaded by OGRE...

Edit:
It's rather strange that I am in a debug mode, whereas my win32-build script file is written to build open-vibe in release mode...

Code: Select all

cmake -DCMAKE_BUILD_TYPE=Release

yrenard
Site Admin
Posts: 645
Joined: Fri Sep 01, 2006 3:39 pm
Contact:

Post by yrenard »

glio wrote: Interesting. When I do this .cfg files modification, OpenVibe switches to the OpenGL render-engine and... crashes. And that on both OS.
Can you send me the log message ?
Does it end with this messages ?

[ TRACE ] Ogre resources file ../share/openvibe-kernel-omk/resources.cfg
- CRASH -

glio wrote: So this problem is independent of the OS and of the render-engine.
Actually, it is not render-engine independent since you activated OpenGL :)
<off-topic>
Additionally, it is not strictly OS independent since you have not tried Linux :D
</off-topic>

glio wrote: In fact, the problem is in the ./dist/share/openvibe.conf configuration file where we can disabled completely the render-engine by editing the token

Code: Select all

Kernel_3DVisualisationEnabled= false
You won't have 3D in this case. If this is not a matter for you, then you can go on this way, waiting for Vincent to come back !

Concerning the Kernel_3DVisualisationOgrePluginsWindows token in the configuration file, you should not change it to the debug version until you compile OpenViBE in debug mode, which seems not to be the case according to your post correction.

This explains why Ogre has problems loading the *_d.dll because the OpenViBE kernel uses the release version of Ogre and you ask the release version of Ogre to load debug version of the render engines. They are incompatible. Either you turn everything to debug mode, either everything to release mode.

Finally, I suspect a problem in the resource loading step. Vincent will be able to help us on this as soon as he's back !

vdelanno
Posts: 14
Joined: Mon Feb 09, 2009 5:10 pm

Post by vdelanno »

Hi,

I can't think of an obvious answer to your problems. Re-reading your posts, I'm not too sure what's happening on what machine. Let's concentrate on the XP ones first, which are known to be working with OV.

1/First off, did you make sure DirectX was successfully installed by launching a Direct3D test using the dxdiag tool? If not, open a console and type in 'dxdiag' to open a diagnostic tool. 3D tests are available under the 'Display' tab. If these tests are successful, the problem may come from your installation of Ogre/OV.

2/As Yann said, you shouldn't modify the token holding the path to Plugins.cfg. It is set by default to point to the release Ogre libraries. Ensure you reset the Kernel_3DVisualisationOgrePluginsWindows token to the correct value.

3/Judging from your logs, the Ogre renderer seems to be successfully created. The problem seems to occur when parsing the resources file. This file isn't actually needed by OpenViBE, and in particular, the first resource (OgreCore.zip) is totally useless (it is only useful to try out the ExampleApplication framework provided with a full distribution of Ogre). However, the resources.cfg file must still be found for OpenViBE to consider Ogre was successfully initialized (I'll fix this in the next release). I'd suggest trying to launch OV with an empty resources.cfg file to see if Ogre initialization can then be completed.

Let me know whether these indications provide any more clues as to what's going on...

Post Reply