NxOgre crashes upon init

esset

16-08-2010 20:10:59

Simply, the program crashes from Access Violation at
Callback* World::getNullCallback() const
{
return mNullCallback; // here
};
in NxOgreWorld.h

Where NxOgre is being initiated like this:
NxOgre::World* mWorld = NxOgre::World::createWorld();

NxOgre::Scene* mScene;

Critter::RenderSystem* mRenderSystem;

//Scene params. Gravity is same as earth
NxOgre::SceneDescription sceneDesc;
sceneDesc.mGravity = NxOgre::Vec3(0, -9.8f, 0);
sceneDesc.mName = "SDJworld";

//Our only scene
mScene = mWorld->createScene(sceneDesc);

//This need to be tweaked
mScene->getMaterial(0)->setStaticFriction(0.5);
mScene->getMaterial(0)->setDynamicFriction(0.5);
mScene->getMaterial(0)->setRestitution(0.1);

mRenderSystem = new Critter::RenderSystem(mScene, sceneMgr);

//Struct to pass on for other classes to use
NxOg.renderSystem = mRenderSystem;
NxOg.world = mWorld;
NxOg.sceneDesc = sceneDesc;
NxOg.scene = mScene;


It goes World::CreateScene->GC::safe_new2->PrincipalScene::PrincipalScene->Scene::Scene->World::getNullCallback

Using latest NxOgre version. Can't really provide more information since the debug seems to be bork because console nor .txtlog is showing any output. I simply have no idea whatsoever what the problem might be. Using freshly downloaded sources from the git and compiling without making any changes in the source (Apart from some minor config stuff).

betajaen

16-08-2010 20:45:44

That is really strange.

My first question when an NxOgre application crashes in World is. Is the PhysX runtimes installed? i.e. you can run a PhysX demo/Play a PhysX game, etc?

esset

16-08-2010 22:54:01

I am upgrading from a working bloody mess, so yes. All old files deleted/moved so theres no chance of collision between the two.

Come to think of it, there may have been an error i had to fix but im quite sure it was in critter. And it was certainly not in any of the core features. Would you mind uploading a pair of working binarys? Otherwise i can redo the process and see if i actually changed something.

betajaen

16-08-2010 23:38:22

I'm quite puzzled. mNullCallback is created in the within the first three lines of the constructor.

World::World(const WorldDescription& description)
: mSDK(0), mDeadSDK(false), mPhysXOutputStream(0), mPhysXUserAllocator(0), mNullCallback(0)
#if NxOgreHasCharacterController == 1
, mControllerManager(0)
#endif
{

mPhysXOutputStream = GC::safe_new0<PhysXOutputStream>(NXOGRE_GC_THIS);
mPhysXUserAllocator = GC::safe_new0<PhysXUserAllocator>(NXOGRE_GC_THIS);
mNullCallback = GC::safe_new0<Callback>(NXOGRE_GC_THIS);
....


The only thing I can think of is the precreateSingletons() function which deals with creating the singleton classes, which does involve some usage of PhysX.

Really, I'm quite stumped. That code has worked perfectly in the last few years.

esset

17-08-2010 08:52:43

I doubt nxogre itself is the problem here, since noone else has had this issue. Which dll-files are required?

esset

17-08-2010 12:36:42

Redownloading and recompiling...

NxOgre compiled without errors...

Critter compilation returned two warnings : warning LNK4221: no public symbols found; archive member will be inaccessible and warning LNK4006: __NULL_IMPORT_DESCRIPTOR already defined in OgreMain_d.lib(OgreMain_d.dll); second definition ignored. But i presume those are ok?

Main program compiled and ran fine after a few tweaks (removing CC-dependant code). This means that I must've messed something up while trying to implement the charactercontroller into Critter and NxOgre. Ill stay away from it until its more stable, i guess.

Now for something completely different; My ragdolls are quite jerky, how would you go about making an animated entity that can swap between ragdoll and animated mode atleast semi-smoothly?