Page 1 of 1

CEGUI app crashes in Debug mode

Posted: Mon Mar 31, 2008 09:09
by ttk1001
Hi all,

I made a MFC app using CEGUI. But I met a crazy problem... My app crashes in Debug mode but run just fine in Release mode. An error occurs in this code:

Code: Select all

mRenderer = new CEGUI::OgreCEGUIRenderer(m_pWindow, Ogre::RENDER_QUEUE_OVERLAY, false, 3000, m_SceneManager);
mSystem = new CEGUI::System(mRenderer);


I catched CEGUI::Exception and got this error message:

"DynamicModule::DynamicModule - Failed to load module 'CEGUIExpatParser_d': The specified module could not be found."

I'm sure that I copied the CEGUIExpatParser_d.dll and all other dlls from OgreSDK\bin\debug folder to my execute folder. So I really don't understand why I got this error. I found that I'm not the first one who faces this problem.

Can somebody tell me what is the cause of this error?
Thank you in advance,

TTK

Re: CEGUI app crashes in Debug mode

Posted: Mon Mar 31, 2008 17:40
by CrazyEddie
Hi,

I suspect the module has unresolved external dependencies (other DLLs missing, or the like - that maybe prevent it from loading), possibly due to being linked with wrong libs somewhere along the way.

Can you let us know which compiler version you are using?

Also, do you know if the version of CEGUI that comes with Ogre is the one built by us or whether it was built by the Ogre devs?

[Edit]
I forgot to ask - do the precompiled Ogre demos that use CEGUI run okay in debug mode? If so, then everything must function correctly.
[/Edit]

CE.

Posted: Tue Apr 01, 2008 02:20
by ttk1001
Thank you CE,

I use VC8.0 with SP1 installed.

According to the CEGUI.log (in Release mode), CEGUI included in OgreSDK is 0.5.1 (I'm not sure who compiled this dll)

I tried the CEGUI example project in ogre Tutorial 7 and it runs well in debug mode.

By the way, this project runs well on may HP laptop (only with OpenGL)

And here are some ouputs from debug:
..............................

Code: Select all

Loaded 'D:\Programming\SDSFramework\debug\Plugin_ParticleFX_d.dll', No symbols loaded.
'SDSBase.exe': Loaded 'D:\Programming\SDSFramework\debug\Plugin_BSPSceneManager_d.dll', No symbols loaded.
'SDSBase.exe': Loaded 'D:\Programming\SDSFramework\debug\Plugin_OctreeSceneManager_d.dll', No symbols loaded.
'SDSBase.exe': Loaded 'D:\Programming\SDSFramework\debug\Plugin_CgProgramManager_d.dll', No symbols loaded.
'SDSBase.exe': Loaded 'D:\Programming\SDSFramework\debug\cg.dll', Binary was not built with debug information.
[b]'SDSBase.exe': Loaded 'D:\Programming\SDSFramework\debug\CEGUIExpatParser_d.dll', No symbols loaded.
'SDSBase.exe': Unloaded 'D:\Programming\SDSFramework\debug\CEGUIExpatParser_d.dll'
First-chance exception at 0x7c812a5b in SDSBase.exe: Microsoft C++ exception: CEGUI::GenericException at memory location 0x0012cd8c..[/b]


The CEGUIExpatParser_d dll was unloaded right after it loaded in then a CEGUI::GenericException occured. This bug really made me crazy threw one of my days away.

Any further suggestions are highly appreciated.

TTK

Posted: Tue Apr 01, 2008 08:52
by CrazyEddie
Hi,

Thanks very much for the additional information. These DLLs would have been compiled by the Ogre guys, since as far as I know the 0.5.0b release reports the version as 0.5.0 and no subsequent releases from that branch were made by the CEGUI project - so at least that clears that up ;)

I've looked at some of the code and did not spot anything that should throw CEGUI::GenericException, except when failing to load the module (why it's reported the way it is in the output window, I do not know).

I find it strange indeed that the project works on another system - is that the same binaries? Or do you compile it on that other system?

Would it be possible to create a minimal example that demonstrates the behaviour, so we could more easily investigate?

A very confused CE

Posted: Wed Apr 02, 2008 08:21
by ttk1001
Thank you for paying attention to my question,

I myself felt very strange 'cause I create and test that project at home using my laptop and copied to PC at office. Then it crash (I copy the source code only and rebuilt on my working PC).

I gave up finding the reason because when I upgraded this project to VC90 (I have both VC9 & 8 installed), it run smoothly without any problems (both Debug and Release mode). I'll try your sugguestion about the minimum project later when time allows.

Thank you and Have a nice day,

TTK

Re: CEGUI app crashes in Debug mode

Posted: Thu Apr 03, 2008 17:11
by mattbrinton
I recently ran into this as well. The problem went away when I copied CEGUIExpatParser_d.dll to the directory with my executable. I suspect you may see this same error if other dependencies of CEGUIBase_d.dll are missing.