{SOLVED}[CRASH] when running last PLSM2 on start

Nktug

22-06-2009 15:26:53

Hi everybody,

I am using the last SVN PLSM source code with Ogrenew 1.4.7 SVN.
Everything is compiling without any error but I am facing a crash when I launch my app with PLSM scene.
If I switch to TerrainSceneManager all is running properly.

I am noob so I use Windbg to check where the app crash. Here are the backtrace :


ChildEBP RetAddr Args to Child
WARNING: Stack unwind information not available. Following frames may be wrong.
0012fc78 101442fc 01f91e10 7858c949 00ce83b0 Plugin_PagingLandScapeSceneManager2!Ogre::PagingLandScapeSceneManager::getMaxSlope+0x1c0d
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_6f74963e\MSVCR90.dll -
0012fc9c 78583a58 1003b49e 01f91e10 01fb8ce0 OgreMain!Ogre::SceneManager::_renderScene+0xfc [c:\developpement\librairies\ogrenew\ogremain\src\ogrescenemanager.cpp @ 1137]
0012fcb4 10177c94 01fb8ce0 00000001 10124a73 MSVCR90!malloc+0x79
0012fcc0 10124a73 00ce84c8 00ce82c8 00cdc828 OgreMain!Ogre::Viewport::update+0x14 [c:\developpement\librairies\ogrenew\ogremain\src\ogreviewport.cpp @ 197]
0012fcdc 10125ec8 00cdd02c 10125ebc 00000001 OgreMain!Ogre::RenderTarget::update+0x93 [c:\developpement\librairies\ogrenew\ogremain\src\ogrerendertarget.cpp @ 112]
0012fce4 10125ebc 00000001 10122649 000059c1 OgreMain!Ogre::RenderWindow::update+0x8 [c:\developpement\librairies\ogrenew\ogremain\src\ogrerenderwindow.cpp @ 76]
0012fcec 10122649 000059c1 00cce3f0 ffffffff OgreMain!Ogre::RenderWindow::update+0xc [c:\developpement\librairies\ogrenew\ogremain\src\ogrerenderwindow.cpp @ 68]
0012fd10 101364a3 78592a8c 0012fd78 00000000 OgreMain!Ogre::RenderSystem::_updateAllRenderTargets+0x89 [c:\developpement\librairies\ogrenew\ogremain\src\ogrerendersystem.cpp @ 106]
*** WARNING: Unable to verify checksum for freequest.exe
0012fd24 004203b5 bb001a5c 01f75480 0012fed4 OgreMain!Ogre::Root::renderOneFrame+0x53 [c:\developpement\librairies\ogrenew\ogremain\src\ogreroot.cpp @ 751]
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_6f74963e\MSVCP90.dll -
0012fd84 784b62c8 bb001afc 00000000 0012fe74 freequest!freequest::CGameManager::mainGameLoop+0x425
0012fda0 0042dde9 bb0019ec 0046ffe4 00151f20 MSVCP90!std::ios_base::_Ios_base_dtor+0x39
0012feec 0044be0d 0012ff18 0012ff00 00151f20 freequest!freequest::main+0x789
0012ff30 0044b13c 00400000 00000000 00151f20 freequest!WinMain+0x4d
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\WINDOWS\system32\kernel32.dll -
0012ffc0 7c817077 0175f6f2 0175f780 7ffde000 freequest!__tmainCRTStartup+0x140 [f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 574]
0012fff0 00000000 0044b31b 00000000 78746341 kernel32!RegisterWaitForInputIdle+0x49


It seems that ogre crash in "Ogre::PagingLandScapeSceneManager::getMaxSlope" function.

I load just the plugin "Plugin_PagingLandScapeSceneManager2.dll" in my cfg file, not the "Plugin_OctreeSceneManager.dll"

This is my code the same as the ExampleApplication for PSLM :


165 virtual void chooseSceneManager(void)
166 {
167 bool notFound = true;
168 // Get the SceneManager, in this case the Paging LandScape specialization
169 SceneManagerEnumerator::MetaDataIterator it = mRoot->getSceneManagerMetaDataIterator();
170 while (it.hasMoreElements ())
171 {
172 const SceneManagerMetaData* metaData = it.getNext ();
173
174 /// A mask describing which sorts of scenes this manager can handle
175 if (metaData->sceneTypeMask == ST_EXTERIOR_REAL_FAR &&
176 metaData->worldGeometrySupported == true &&
177 metaData->typeName == "PagingLandScapeSceneManager")
178 {
179 notFound = false;
180 break;
181 }
182 }
183 if (notFound)
184 {
185 OGRE_EXCEPT(Exception::ERR_ITEM_NOT_FOUND, "Could not find Paging Landscape plugin. Check if it's in plugins.cfg.",
186 "chooseSceneManager");
187 }
188
189 mSceneMgr = mRoot->createSceneManager("PagingLandScapeSceneManager", "MyAppSCM" );
190 //mSceneMgr = mRoot->createSceneManager(ST_EXTERIOR_REAL_FAR, "MyAppSCM" );


Is the last PLSM sources compatible with the Ogre 1.4.7 version ?
Did I made some mistake ?

Thank you in advance.

Nktug

23-06-2009 00:35:44

I fixed the problem !!!

I compiled the PLSM app with "plsm2_vc8_SVN.sln" file and I got the same problem in the different line in PLSceneManager.
Below the trace in Windbg :


ChildEBP RetAddr Args to Child
0012fc78 101442fc 0249e7c8 7858c949 00ce8678 Plugin_PagingLandScapeSceneManager2!Ogre::PagingLandScapeSceneManager::_updateSceneGraph+0xa [c:\developpement\librairies\ogreaddons\paginglandscape\plugins\paginglandscape2\src\ogrepaginglandscapescenemanager.cpp @ 385]
0012fca0 1003b49e 0249e7c8 0249d538 00000001 OgreMain!Ogre::SceneManager::_renderScene+0xfc [c:\developpement\librairies\ogrenew\ogremain\src\ogrescenemanager.cpp @ 1137]
0012fcb4 10177c94 0249d538 00000001 10124a73 OgreMain!Ogre::Camera::_renderScene+0x1e [c:\developpement\librairies\ogrenew\ogremain\src\ogrecamera.cpp @ 397]
0012fcc0 10124a73 00ce8790 00ce8590 00cdc888 OgreMain!Ogre::Viewport::update+0x14 [c:\developpement\librairies\ogrenew\ogremain\src\ogreviewport.cpp @ 197]
0012fcdc 10125ec8 00cdd02c 10125ebc 00000001 OgreMain!Ogre::RenderTarget::update+0x93 [c:\developpement\librairies\ogrenew\ogremain\src\ogrerendertarget.cpp @ 112]
0012fce4 10125ebc 00000001 10122649 0000123b OgreMain!Ogre::RenderWindow::update+0x8 [c:\developpement\librairies\ogrenew\ogremain\src\ogrerenderwindow.cpp @ 76]
0012fcec 10122649 0000123b 00cce348 ffffffff OgreMain!Ogre::RenderWindow::update+0xc [c:\developpement\librairies\ogrenew\ogremain\src\ogrerenderwindow.cpp @ 68]
0012fd10 101364a3 78592a8c 0012fd78 00000000 OgreMain!Ogre::RenderSystem::_updateAllRenderTargets+0x89 [c:\developpement\librairies\ogrenew\ogremain\src\ogrerendersystem.cpp @ 106]
0012fd24 004203b5 cef635e4 025371d0 0012fed4 OgreMain!Ogre::Root::renderOneFrame+0x53 [c:\developpement\librairies\ogrenew\ogremain\src\ogreroot.cpp @ 751]


By looking in this function, it seems that PLSM did not have any "PageManager" instanciated :


//-----------------------------------------------------------------------
void PagingLandScapeSceneManager::_updateSceneGraph(Camera * cam)
{
// entry into here could come before setWorldGeometry
// got called which could be disastrous
// so check for init
PLSM2_ASSERT(mPageManager);
if (isRenderQueueToBeProcessed(mPageManager->getPageRenderQueue()))
{


In my code, I found that I was calling "mRoot->renderOneFrame();" after the initialization of the scene "mSceneMgr =mRoot->createSceneManager("PagingLandScapeSceneManager", "MyAppSCM" );" without creating my terrain.

I put "mSceneMgr->setWorldGeometry( Ogre::String("paginglandscape2.cfg") );" between this 2 lines and all thing work properly.

Very strange but it is work !!!