OgreNewton/Newton3 Unhandled Exception

v1r0x

28-09-2013 04:46:19

Hey guys,

I recently started with ogre and was searching for a physics engine.
So I decided (after several problems with bullet) to use OgreNewt. In this forum I found the more up2date OgreNewton.
So, I tried to integrate the player demo into my project.
I got no compiler/linker errors, so I think the code should be ok.

But when I run the .exe I get an "Unhandled Exception" with error code 0xC0000005. I think the english translation would be "access violation writing location 0x...." (in german: "Zugriffsverletzung beim Schreiben an Position 0x...")


    void PhysicsDemo::loadStaticScene(){
    OgreNewtonSceneBody* const sceneBody = new OgreNewtonSceneBody(m_physicsWorld, m_allExcludingMousePick);
    sceneBody->BeginAddRemoveCollision();
    Entity* const levelMap = mSceneMgr->createEntity("Level", "flatplane.mesh");
    SceneNode* const floorNode = mSceneMgr->()->createChildSceneNode("FloorNode");
    floorNode->attachObject(levelMap);
    levelMap->setCastShadows(false);
    sceneBody->AddCollisionTree(floorNode); //this line causes the error
    sceneBody->EndAddRemoveCollision();
    }


    I'm using ogre 1.9 and MS visual Studio 2008 (both x86)

    I really don't know what could be the problem.

    Hope someone can help me!

    regards,
    v1r0x