hotdot
10-11-2008 23:31:04
Here is my code :
The log has an entry for each model loaded in my oScene, it says that it is already loaded, so i figure it must find it at some level (ofusion has loaded the mesh already).
The thing is it crashes on createActor
stack :
It tries to malloc in nx..allocator.h some 69204263 at line 61. I have huge .mesh which we use for testing terrain loading, and we do not use height maps because they are made in max by the artists for control purpose. What could go wrong since it crashes on the first loaded item.
void OfusionCallBack::OnEntityCreate(Ogre::Entity *pEntity, TiXmlElement* pEntityDesc)
{
try
{
NxOgre::Scene* physXScenePtr = OddBoyGame::getSingleton().getPhysxScene();
NxOgre::World* physXWorldPtr = OddBoyGame::getSingleton().getPhysxWorld();
Ogre::ResourcePtr rPtr = pEntity->getMesh()->getCreator()->getByName(pEntity->getMesh()->getName());
String meshFileName = "file://../Resources/TerrainExport/";
meshFileName += pEntity->getMesh()->getName();
NxOgre::Resources::ResourceSystem* rsPtr = NxOgre::Resources::ResourceSystem::getSingleton();
rsPtr->addMeshAs(meshFileName.c_str(), pEntity->getMesh()->getName().c_str());
NxOgre::Resources::Mesh* collisionMesh = rsPtr->getMesh(pEntity->getMesh()->getName().c_str());
physXScenePtr->createActor(pEntity->getName(), new NxOgre::TriangleMesh(collisionMesh), pEntity->getParentSceneNode()->getPosition() , "static: yes");
}
catch(...)
{}
}
The log has an entry for each model loaded in my oScene, it says that it is already loaded, so i figure it must find it at some level (ofusion has loaded the mesh already).
The thing is it crashes on createActor
stack :
PhysXCore.dll!041e8e46()
[Frames below may be incorrect and/or missing, no symbols loaded for PhysXCore.dll]
> msvcr80d.dll!_heap_alloc_dbg(unsigned int nSize=87923268, int nBlockUse=1304124, const char * szFileName=0x053d9c58, int nLine=1303448) Line 474 + 0xc bytes C++
PhysXCore.dll!041eafa1()
NxOgre_d.dll!NxOgre::UserAllocator::malloc(unsigned int size=69204263) Line 62 + 0x10 bytes C++
PhysXCore.dll!041ff8d9()
PhysXCore.dll!042285a3()
NxOgre_d.dll!Betajaen::SharedList<NxOgre::Shape,Betajaen::SharedAllocator>::Insert(NxOgre::Shape * const & val=0x0095aa98) Line 569 + 0x10 bytes C++
NxOgre_d.dll!NxOgre::Actor::Actor(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & name="Object01", NxOgre::Scene * scene=0x01394420, NxOgre::Shape * shape=0x053d9970, const NxOgre::Pose & pose={...}, const NxOgre::ActorParams & params={...}) Line 237 C++
NxOgre_d.dll!NxOgre::Scene::createActor(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & identifier="Object01", NxOgre::Shape * firstShapeDescription=0x053d9970, const NxOgre::Pose & pose={...}, const NxOgre::ActorParams & params={...}) Line 833 + 0x3f bytes C++
OddBoy.exe!Game::OddBoyOfusionCallBack::OnEntityCreate(Ogre::Entity * pEntity=0x053d9078, TiXmlElement * pEntityDesc=0x0549ea40) Line 33 + 0x166 bytes C++
OddBoy.exe!OSMScene::createEntities(TiXmlElement * pEntityNode=0x0549e958, Ogre::SceneNode * pSceneRoot=0x013bd9e8) Line 735 + 0x1d bytes C++
OddBoy.exe!OSMScene::createScene(Ogre::SceneNode * pParent=0x013bd9e8) Line 200 C++
OddBoy.exe!Game::GameState_Start::enter(OGE::IStateMachine<Game::OddBoyGame> * sm=0x013b90b8, Game::OddBoyGame * object=0x0130ba80) Line 35 C++
OddBoy.exe!OGE::GameStateMachine<Game::OddBoyGame>::changeState(OGE::IState<Game::OddBoyGame> * newState=0x0537fc60) Line 121 + 0x3f bytes C++
OddBoy.exe!Game::OddBoyGame::HighPriorityInitialization() Line 113 + 0x26 bytes C++
OGameEngine.dll!OGE::OgreAppInterface::StartApplication(OGE::GameInterface * gameObject=0x0130ba80) Line 52 + 0x17 bytes C++
OddBoy.exe!WinMain(HINSTANCE__ * hInst=0x00400000, HINSTANCE__ * __formal=0x00000000, char * strCmdLine=0x00161f28, HINSTANCE__ * __formal=0x00000000) Line 58 + 0x27 bytes C++
It tries to malloc in nx..allocator.h some 69204263 at line 61. I have huge .mesh which we use for testing terrain loading, and we do not use height maps because they are made in max by the artists for control purpose. What could go wrong since it crashes on the first loaded item.