Page 1 of 2

Crash at the scheme loading

Posted: Sat Feb 19, 2005 11:50
by Elrick
I use CeGUI 0.2 and Ogre 1.0 RC1 with the OgreRenderer which is located on the Ogre CVS (in my opinion it's will better if you include it in the zip/tar.bz2).

When I try to load a scheme via :

SchemeManager::getSingleton().loadScheme((utf8*)"my scheme.xml");

It makes my program crash at the end of :

OgreCEGUIResourceProvider::loadRawDataContainer

Maybe I don't use the good renderer and the one I use is still under developement ?

Re: Crash at the scheme loading

Posted: Sat Feb 19, 2005 13:15
by spannerman
Elrick, was your "my scheme.xml" scheme working before you updated to these versions of CEGUI and OGRE? What do the error logs say?

Re: Crash at the scheme loading

Posted: Sat Feb 19, 2005 14:05
by Elrick
Yes, with CeGUI 0.1 and Ogre 0.15, it was working.

I've tried to simplify the scheme at the maximum:

<?xml version="1.0" ?>
<GUIScheme Name="Milcis">
</GUIScheme>

and the same problem occurs.

The log:

19/02/2005 12:38:29 (InfL1) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
19/02/2005 12:38:29 (InfL1) + Crazy Eddie's GUI System - Event log +
19/02/2005 12:38:29 (InfL1) + (http://www.cegui.org.uk) +
19/02/2005 12:38:29 (InfL1) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

19/02/2005 12:38:29 (InfL1) CEGUI::Logger singleton created.
19/02/2005 12:38:29 (InfL1) ---- Begining CEGUI System initialisation ----
19/02/2005 12:38:29 (InfL1) CEGUI::ImagesetManager singleton created
19/02/2005 12:38:29 (InfL1) CEGUI::FontManager singleton created.
19/02/2005 12:38:29 (InfL1) CEGUI::WindowFactoryManager singleton created
19/02/2005 12:38:29 (InfL1) CEGUI::WindowManager singleton created
19/02/2005 12:38:29 (InfL1) CEGUI::SchemeManager singleton created.
19/02/2005 12:38:29 (InfL1) CEGUI::MouseCursor singleton created.
19/02/2005 12:38:29 (InfL1) CEGUI::GlobalEventSet singleton created.
19/02/2005 12:38:29 (InfL1) WindowFactory for 'DefaultWindow' windows added.
19/02/2005 12:38:29 (InfL1) Window type alias named 'DefaultGUISheet' added for window type 'DefaultWindow'.
19/02/2005 12:38:29 (InfL1) CEGUI::System singleton created.
19/02/2005 12:38:29 (InfL1) ---- CEGUI System initialisation completed ----
19/02/2005 12:38:29 (InfL1) Attempting to load Scheme from file 'my scheme.xml'.

Re: Crash at the scheme loading

Posted: Sat Feb 19, 2005 14:23
by Elrick
I think I have identified the problem.

I was in Debug mode and I use the Ogre Release. Before, I have used the Ogre lib in release mode in a debug program ...

It seems I can't do this anymore ;-)

Re: Crash at the scheme loading

Posted: Sat Feb 19, 2005 15:45
by Elrick
I think I've wrote this a bit too fast.

So, in releas emode, there isn't any problems but in debug mode there is the problem I've wrote in the first message ...

Re: Crash at the scheme loading

Posted: Sun Feb 20, 2005 18:41
by CrazyEddie
What is the exact exception that you're getting? Also compiler version & STL type in use.

Exceptions like this are usually related to memory problems, make sure you app is dynamically linking to the correct runtime (Debug Multithreaded DLL). If you use STLport ensure that _STLP_DEBUG is defined for your projects Debug configuration.

CE

Re: Crash at the scheme loading

Posted: Mon Feb 21, 2005 10:30
by Elrick
What is the exact exception that you're getting? Also compiler version & STL type in use.


I use Visual Studio .Net 2003 (7.1) and the default STL library of VS.
I have recompiled the Ogre library + CeGUI + OgreGuiRenderer and now I have an assertion on deleting a block at the end of Rawcontainer (or something like that, I don't have my code at the place where I write this message)

Exceptions like this are usually related to memory problems, make sure you app is dynamically linking to the correct runtime (Debug Multithreaded DLL). If you use STLport ensure that _STLP_DEBUG is defined for your projects Debug configuration.


Yeah I know, I know ;-)
It's a memory crash/problem/something else
But I'm in DLL Debug Multithread and I don't use STLport :-(

Re: Crash at the scheme loading

Posted: Tue Feb 22, 2005 09:36
by CrazyEddie
This is the same general config that I use on Win32. There was a major issue with this a while back which has been fixed. I am currently unable to reproduce this :?

CE.

Re: Crash at the scheme loading

Posted: Wed Feb 23, 2005 14:00
by Blakharaz
I have the same problem with Ogre 1.0 (from Ogre's v1-0 CVS branch) and CEGUI 0.2 (currently in debug mode). After reading the configuration file the block end causes the RawDataContainer to be deleted and this ends up in a memory error

The (shortened) call stack is
msvcr71d.dll!_CrtIsValidHeapPointer(const void * pUserData=0x04700598) Zeile 1807 C
msvcr71d.dll!_free_dbg_lk(void * pUserData=0x04700598, int nBlockUse=1) Zeile 1132 + 0x9 C
msvcr71d.dll!_free_dbg(void * pUserData=0x04700598, int nBlockUse=1) Zeile 1070 + 0xd C
msvcr71d.dll!operator delete(void * pUserData=0x04700598) Zeile 54 + 0x10 C++
msvcr71d.dll!operator delete[](void * p=0x04700598) Zeile 21 + 0x9 C++
CEGUIBase_d.dll!CEGUI::RawDataContainer::release() Zeile 141 + 0x18 C++
CEGUIBase_d.dll!CEGUI::RawDataContainer::~RawDataContainer() Zeile 135 C++
> CEGUIBase_d.dll!CEGUI::System::constructor_impl(CEGUI::Renderer * renderer=0x03fd18d0, CEGUI::ResourceProvider * resourceProvider=0x03fd2630, CEGUI::ScriptModule * scriptModule=0x00000000, const CEGUI::String & configFile={...}, const CEGUI::String & logFile={...}) Zeile 321 + 0x28 C++
CEGUIBase_d.dll!CEGUI::System::System(CEGUI::Renderer * renderer=0x03fd18d0, CEGUI::ScriptModule * scriptModule=0x00000000, CEGUI::ResourceProvider * resourceProvider=0x03fd2630, unsigned char * configFile=0x00d8c85c) Zeile 153 + 0x49 C++
RlUI.dll!rl::UiSubsystem::initializeUiSubsystem() Zeile 113 + 0x121 C++


Do you have any idea about how to fix it?

Re: Crash at the scheme loading

Posted: Thu Feb 24, 2005 09:31
by CrazyEddie
It seems that everyone is getting this now (except me), I'll see if I can find the time to attempt to reproduce the problem. Until I can reproduce this, I have no idea how to fix it (if it is not one of the affore mentioned issues) :?

CE.

Re: Crash at the scheme loading

Posted: Sat Feb 26, 2005 05:38
by nfz
CE, you are not alone. I built the Ogre VC7.1 SDK using Ogre CVS v1-0-0 and CEGUI 0.2.0 src and found no problems running Demo_GUI in debug. I didn't use the pre-built Xerces so maybe that has something to do with it. Had me worried when I saw this post just after the SDK were released so I downloaded the SDK that I had uploaded :) and the gui demo runs fine in debug and release.

Re: Crash at the scheme loading

Posted: Sat Feb 26, 2005 10:00
by CrazyEddie
Thanks for the info.

I'm going to try and track this one down today, if at all possible.

CE.

Re: Crash at the scheme loading

Posted: Sun Feb 27, 2005 01:20
by Assidragon
Just a note, I'm using OGRE 1.0 (SDK), the CEGUI stable release and the Xerces DLL I downloaded from this site, and have no problems with CEGUI. =)

Re: Crash at the scheme loading

Posted: Sun Feb 27, 2005 10:43
by CrazyEddie
I'm glad there's still a few of us who are able to use the system :lol:

I spent quite a while yesterday playing around with various things trying to recreate this issue, but in the end could not reproduce it (except to change project settings which I already know to cause it). I did not switch around the dependedncy DLLs though, it does seem that there may be an issue with using dependency files other than the ones either supplied here or built yourself.

In case anyone's searched and found this topic, the advice now (in addition to things previously mentioned) is to try the CEGUI dependency files from this site in place of the ones from the Ogre dependency packages.

CE.

Re: Crash at the scheme loading

Posted: Fri Mar 04, 2005 03:21
by walaber
just a note, I was recently using the version of CEGUI that comes as part of the dependencies to Ogre 1.0 for my project, and was experiencing the same problem (except in release mode).

I compiled CEGUI 0.2.0, and linked my project to it instead, and then copied over all of the dependency library .dll files from the CEGUI dependencies into my Ogre project directory, and the problem has since gone away!

I think it must be an issue with one of the pre-compiled .dll dependency files (DevIL, ILU, ILUT) between the ones that come with Ogre 1.0 and CEGUI.

p.s. other than this slight issue, my project with CEGUI is going great! :D