Critter: crash at OgreResourceProtocol()

Mezzi

10-03-2011 09:30:41

Hello,

I'm new at Critter, NxOgre and Ogre, and I'm trying to use some of the example code in my project, in order to get physics working.
I implemented a setupPhysics()-function, analog to the same function in example 102 from NxOgreTutorials.

When I try to run the code, I get an unhandled exception at this line NxOgre::ResourceSystem::getSingleton()->openProtocol(new Critter::OgreResourceProtocol());

it crashes in a Critter file (CritterOgreResourceProtocol.cpp - line 41) at mProtocolName = "ogre";
mProtocolHash = NxOgre::Strings::hash(mProtocolName);


Do you have any idea what can be wrong?

Mezzi

betajaen

10-03-2011 14:13:31

That's a little weird. Do you have NxOgre and Ogre, initialised (new Root, World::createWorld) before you do all of that?

Mezzi

10-03-2011 14:28:49

That's a little weird. Do you have NxOgre and Ogre, initialised (new Root, World::createWorld) before you do all of that?

Yes, the root has been initialised, en I have called createWorld().

When I try to load a mesh without using a resourcesystem, but just calling the load()-function on mMeshManager, but then I also get a unhandled exception, even if I use the whole path for the mesh:

NxOgre::Mesh* meshbarrel = mMeshManager->load(NxOgre::Path("file://C:/OgreSDK_vc10_v1-7-2/media/models/barrel.mesh"));

I initialised mMeshManager with the getSingleton()-method. It seems like I can't call any function on it.