Crash while creating level geometry

jarwulf

14-08-2011 02:33:38

After moving to another computer I switched to the latest version of NxOgre. I'm getting an unhandled exception with what I believed used to work under a previous version on a different computer.

Crash occurs where marked

SceneGeometry* GameStateII::makeLevel(const Matrix44& globalPose)
{

if (mLevelMesh == 0)
mLevelMesh = NxOgre::MeshManager::getSingleton()->load("ogre://General/BeltofWeller5.nxs", "level");//"ogre://General/BeltofWeller5.nxs"

/*CRASH OCCURS ON THIS LINE*/ SceneGeometry* scene_geom = mScene->createSceneGeometry(TriangleGeometryDescription(mLevelMesh), globalPose);
mRenderSystem->createSceneNodeEntityPair("BeltofWeller5.mesh", Vec3(globalPose), Quat(globalPose));
return scene_geom;
}



The debugger autobreaks here...

NxOgreRigidBody.cpp


NxShapeDesc* shape_description = shape.createShapeDescription();
actor_description.shapes.push_back(shape_description);
//////////////////////////////////////////////////

// RIGIDBODY_CREATE_OR_THROW_EXCEPTION
//////////////////////////////////////////////////

/*AUTOBREAK*/ mActor = mScene->getScene()->createActor(actor_description);
if (mActor == 0)
{
NxOgre_ThrowException(DescriptionInvalidException, Reason::Exceptionise(actor_description), Classes::_RigidBody);
}
//////////////////////////////////////////////////

// RIGIDBODY_SINGLE_SHAPE_DESCRIPTION_PASS_POST
//////////////////////////////////////////////////



any idea what's wrong and how to fix it?

betajaen

14-08-2011 20:35:11

The actor isn't being created, because PhysX isn't happen with the description. Either the Actor or Shape. As your using the default RigidBody description, I'm guessing it's that mesh.

Try another and see if that works, then see if it's cooked incorrectly.

jarwulf

14-08-2011 22:37:39

The actor isn't being created, because PhysX isn't happen with the description. Either the Actor or Shape. As your using the default RigidBody description, I'm guessing it's that mesh.

Try another and see if that works, then see if it's cooked incorrectly.



I threw in a couple other meshes and nxss lying around hoping for a quick fix but no go. Same crash . I rechecked the program in my old comp and it works fine.

Possible causes?

1. Theres a huge difference between environments...Detritus/XP/PX 2.8.3 vs BuggySwires/7/PX 2.8.4. The meshes were created converting maya 2009 files (mb) to Ogre meshes using a plugin and then converted these to nxs with old flour. Maybe the newer setup doesn't like this?


2. I had to make a slight change in the code to get it to the current state...

avatar->getNode()->setScale(.1);
HeroEntity = mSceneMgr->createEntity(NameGenerator::Next("Hero"), "robot.mesh");//robot.mesh
avatar->getNode()->addEntity(HeroEntity);


vs previously this


avatar->getSceneNode()->scale(.1,.1,.1);
HeroEntity = mSceneMgr->createEntity(NameGenerator::Next("Hero"), "robot.mesh");//robot.mesh
avatar->getSceneNode()->attachObject(HeroEntity);

probably not though.

then see if it's cooked incorrectly.

How'd I do that?

From what you've said and what I've seen it looks like I'm going to have to reconvert the meshes and nxs from the mb files right?..if that doesn't work I might be screwed unless the maya plugin is actually available finally.

jarwulf

19-08-2011 00:13:39

updated to buggyswires on old computer. Turns out it was using 2.8.4 although not sure about the final version. Program still works so it looks like it may be due to XP vs 7 for some reason.

The official PhysX plugin for Maya has finally arrived in beta so its time to see if meshes can be converted and try again. If this doesn't work I'm not sure what to do next.