Ogre Bug: Loading of Entities with animation

Problems building or running the engine, queries about how to use features etc.
Post Reply
Dofter
Gnoblar
Posts: 16
Joined: Wed Jul 15, 2009 6:51 pm

Ogre Bug: Loading of Entities with animation

Post by Dofter »

Hi,

in my current project occured an crash, using curren Ogre 1.9

An exception has occured: OGRE EXCEPTION(2:InvalidParametersException): Cannot derive root bone as this skeleton has no bones! in Skeleton::deriveRootBone

In managed to build a minimalistic example where this occurs: see https://bitbucket.org/ChWick/bugtest

On keypress of '1' I reload a scene containing (line 479 of BaseApplication.cpp):
- it's own local resource group
- a single mesh with a skeleton in this resource group

Code to load/unload (mCurrentScene will be always 1 after first call)

Code: Select all

void BaseApplication::switchScene(int i) {
    // delete scene, unload groups, etc.
    if (mCurrentScene == 1) {
        mSceneMgr->getRootSceneNode()->detachObject(mFish);
        mSceneMgr->destroyEntity(mFish);
        Ogre::ResourceGroupManager::getSingleton().unloadResourceGroup("Fish");
        Ogre::ResourceGroupManager::getSingleton().destroyResourceGroup("Fish");
        mFish = 0;
    }

    mCurrentScene = i;

    // create scene, load groups, etc.
    if (mCurrentScene == 1) {
        Ogre::ResourceGroupManager::getSingleton().createResourceGroup("Fish", false);
        Ogre::ResourceGroupManager::getSingleton().addResourceLocation("./fish", "FileSystem", "Fish", true, true);
        Ogre::ResourceGroupManager::getSingleton().initialiseResourceGroup("Fish");
        Ogre::ResourceGroupManager::getSingleton().loadResourceGroup("Fish");

        mFish = mSceneMgr->createEntity("Fish", "fish.mesh");
        mSceneMgr->getRootSceneNode()->attachObject(mFish);
    }
}

On the 3rd :!: time I reload the scene, the crash occurs.

I checked so far:
- no crash if I i search only in the local pool: change line 498 to

Code: Select all

mFish = mSceneMgr->createEntity("Fish", "fish.mesh", "Fish");
- no crash if the resource group is in global pool: change line 493 to

Code: Select all

Ogre::ResourceGroupManager::getSingleton().createResourceGroup("Fish", true);
I think this should be a problem with the ogre engine.

Maybe some of you can reproduce this crash.

Dofter
Post Reply