[SOLVED] Demo App Crashes on Start

joe

06-05-2008 20:39:51

Hi! I've recently started PLSM2. I'm using Code::Blocks+mingw on Win32, and the most recent SVN version of Ogre and PLSM2. I've gotten it to compile up, and have my resource paths setup properly in the cfg files, but after startup, after clicking OK on the ogre display setup screen, the demo app segfaults and dies. Here's my log file, although there doesn't seem to be much there: (Note that the map files I'm using worked fine in the pre-compiled binary demo.)

EDIT: see next post


Can someone point me in the right direction? Thanks in advance!!!

joe

06-05-2008 20:57:56

Here's another Log file, this one showing the correct ogre version number. I'm really not quite honestly sure where I got that first log file from - maybe an old notepad window I had up. Sorry. Here's a real one:


12:56:31: Creating resource group General
12:56:31: Creating resource group Internal
12:56:31: Creating resource group Autodetect
12:56:31: SceneManagerFactory for type 'DefaultSceneManager' registered.
.....
.....
.....
12:56:32: ***************************************
12:56:32: *** D3D9 : Subsystem Initialised OK ***
12:56:32: ***************************************
12:56:32: ResourceBackgroundQueue - threading disabled
12:56:32: Particle Renderer Type 'billboard' registered
12:56:32: MovableObjectFactory for type 'PagingLandScapeMeshDecal' registered.

joe

06-05-2008 23:02:16

The release version seems to get a little farther. Here is the log, note I switched to OpenGL renderer:

15:00:01: Creating resource group General
15:00:01: Creating resource group Internal
15:00:01: Creating resource group Autodetect
15:00:01: SceneManagerFactory for type 'DefaultSceneManager'
...
...
...
...
15:00:05: Initialising resource group PLSM2
15:00:05: Added resource location './hf129_3' of type 'FileSystem' to resource group 'PLSM2'
15:00:05: Initialising resource group PLSM2
15:00:05: Texture: flare.png: Loading 1 faces(PF_R8G8B8,256x256x1) with 8 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
15:00:05: Texture: cursor.png: Loading 1 faces(PF_R8G8B8,32x32x1) with 5 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,32x32x1.

joe

07-05-2008 00:27:46

I followed the instructions here: http://www.ogre3d.org/phpBB2addons/view ... c&start=25

and used the _PLSM_OCTREE in my defines to recompile PLSM2, and now my debug and release version behave the same, both dump out after loading the texture for the flare and for the cursor.

I tried commenting out both the flare code and the cursor overlay in the example application, but it crashed in the same spot.

Still working on this, any help would be -greatly- appreciated. Probably it's something silly I'm missing.

korupt

07-05-2008 01:43:33

Make sure you use the debug dll with a debug build of your project and the release dll for the release build. Think I had something similar, and the problem was in that. Might also have been the debug dll doing strange things.

Sorry, can't remember at this point:(

joe

07-05-2008 03:06:10

Thanks for the reply! Yes, I've made sure I'm running the correct debug dll with the debug version of the demo app, and the release dll with the release version of the demo app. Both versions now behave identically - the app crashes in the same spot, according to the log files - just after initializing the cursor - which, if I'm reading the code right, is the last thing it does when initializing.

joe

07-05-2008 17:52:24

Here's the stack trace when it crashes. It maybe leads me to believe it's STL related?

#0 65316827 Ogre::Overlay::show(this=0x0) (C:/OgreSVN/OgreMain/src/OgreOverlay.cpp:96)
#1 00433CF0 operator new() (??:??)
#2 00000000 ??() (??:??)
#3 0022FCD0 ??() (??:??)
#4 0022FCC0 ??() (??:??)
#5 00000000 ??() (??:??)
#6 00000001 ??() (??:??)
#7 77C50C8E msvcrt!modf() (C:\WINDOWS\system32\msvcrt.dll:??)
#8 007F007F ??() (??:??)
#9 6559EEB1 Ogre::Math::Sqrt(fValue=3.79266456e-034) (../include/OgreMath.h:291)
#10 0042515B operator new() (??:??)
#11 07FC10D8 ??() (??:??)
#12 00A411B8 ??() (??:??)
#13 00A53AE0 ??() (??:??)
#14 07F3E748 ??() (??:??)
#15 07F781E0 ??() (??:??)
#16 00000000 ??() (??:??)
#17 00000001 ??() (??:??)
#18 65710D1B std::_Rb_tree<int, std::pair<int const, Ogre::Viewport*>, std::_Select1st<std::pair<int const, Ogre::Viewport*> >, std::less<int>, std::allocator<std::pair<int const, Ogre::Viewport*> > >::begin(this=0x22ff30) (C:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:579)
#19 0041F1F3 operator new() (??:??)
#20 0022FF30 ??() (??:??)
#21 00000014 ??() (??:??)
#22 0022FE50 ??() (??:??)
#23 0022FE30 ??() (??:??)
#24 00000000 ??() (??:??)
#25 004A101A operator new() (??:??)
#26 0022FDD8 ??() (??:??)
#27 004701E6 operator new() (??:??)
#28 0022FF48 ??() (??:??)

joe

07-05-2008 18:43:48

For what it's worth, the mapsplitter compiles and runs just fine, which proves to me that my compiler environment is sound, and that my resource config files are correct.

joe

07-05-2008 21:20:01

Aha! Got my debugger flags setup, and got some useful errors:

#0 65316827 Ogre::Overlay::show(this=0x0) (C:/OgreSVN/OgreMain/src/OgreOverlay.cpp:96)
#1 00433CF0 myPagingLandScapeFrameListener::myPagingLandScapeFrameListener(this=0x841a5c0, win=0xfe19c8, cam=0xff3df8, l=0x83dece0, LightNode=0x8418828, useBufferedInputKeys=false, useBufferedInputMouse=true) (../include/FrameListener.h:31)
#2 0042515B myPagingLandScapeApplication::createFrameListener(this=0x22ff30) (../include/PagingLandScape.h:67)
#3 0041F1F3 PagingLandScapeApplication::setup(this=0x22ff30) (../../Common/include/PagingLandScape2Application.h:72)
#4 004151C8 ExampleApplication::go(this=0x22ff30) (../../Common/include/ExampleApplication.h:89)
#5 00401474 main(argc=1, argv=0x3d93c8) (C:/OgreSVN/paginglandscape/Samples/PagingLandScape2/src/PagingLandScape.cpp:54)

Now... to figure out if this is something bizzare on my end, or if this will affect everyone with my particular build setup. On the bright side, this is likely a problem with the demo app, not the plugin.

joe

07-05-2008 21:55:06

Ok, everything is working! And yes, it turned out to be silliness on my part. In case this happens to anyone else, if you want to run the demo app, make sure your resource.cfg contains a line pointing to the overlays directory. I had used the resource.cfg files I used with the precompiled binary demo, and, of course, they didn't have that line. Doh!