Problems running NxOgre Tutorials

mibshahid

22-10-2010 00:41:16

Hi
I am a newcomer to the Ogre and NxOgre world. I am using NxOgre Detritus/Traumatic and built Ogre-Cthuga(1.7.1) from source using Cmake. However, I built the NxOgre Tutorials using VC 9 (2008 express) and they built smoothly with no error. But whenever I am running samplebrowser(_d).exe and select the NxOgre samples, it shows a VC runtime error message (please see the pic). .

It is to be mentioned that I do not use the precompiled Ogre SDK, rather built Ogre from source using Cmake and therefore my $OGRE_HOME is D:\Dev\Ogre\Builds\Cthugha\, but the NxOgre.zip file resides in D:\Dev\Ogre\Source\Cthugha\Samples\Media\ (which is outside $OGRE_HOME). I made the corresponding changes in the resource(_d).cfg file. The ogre samples are running fine. I did all the steps mentioned in http://github.com/betajaen/nxogretutorials. Please help me.

TechnoBulldog

22-10-2010 02:10:04

I'm rather new to this still, but I know that the NxOgre Tutorials have to copy DLLs to the Ogre bin folder (debug or release corresponding to which version you compile). Make sure that the DLLs are there is my recommendation. If it couldn't find the correct resource, it would have thrown an Ogre exception, not a runtime error.

betajaen

22-10-2010 07:46:46

Hmm, NxOgre doesn't use assertions or generally crashes like that (it tends to be very polite and gives you a reason), it could be PhysX.

Some silly questions;

- NxOgre(_d).dll is copied into the directory?
- The PhysX system software is installed?
- Can you attach a Visual Studio Debugger to see why it's crashing like that?

fruki

12-11-2010 01:34:56

Hi, I had some problems, and changing from MSVS2010 to MSVS2009 has made the error the OP is having now happens to me.

I have debugged it and I can point it to this line inside NxOgreWorld.cpp :

mCookingInterface = NxGetCookingLib(NX_PHYSICS_SDK_VERSION);

if (mCookingInterface == 0)
{
throw PhysXSystemSoftwareException(__FILE__, __LINE__, Classes::_World);
return;
}


Looks like mCookingInterface is NULL so the call to NxGetCookingLib gets a NULL pointer.

Im on a Win7 32bits, using PhysX 2.8.4

Hope that helps a little.

betajaen

12-11-2010 09:20:57

I had a similar problem. The System software I downloaded didn't contain the 2.8.4 DLLs, took me two days of thinking NxOgre had done something wrong until I realised this. Just copy the PhysX*.dlls from the PhysX SDK/Bin/Win32 directory into your application's folder, it should work then.

fruki

15-11-2010 07:22:37

Working like a charm now, thanks.