Assert Error (with V1-0)

Problems building or running the engine, queries about how to use features etc.
Post Reply
JasonW
Gnoblar
Posts: 18
Joined: Thu Feb 10, 2005 7:14 am
Location: Mackay, QLD, Australia

Assert Error (with V1-0)

Post by JasonW »

Hi
I am having an odd issue that I think may be associated with the moving of the CEGUI Ogre Renderer to the Ogre Core Engine (instead of CE maintaining it in his releases).

I have a basic test setup with CEGUI and Ogre for displaying a mouse cursor (For picking of models etc.) Now before the CEGUI Ogre Renderer was merged with Ogre everything was fine. but since retrieving the laster v1-0 (CVS) and latest CVS version of CEGUI I appear to be getting a double delete error withing the CEGUI class.

Here is the code that used to work fine:

Code: Select all

	mGUIRenderer = new CEGUI::OgreCEGUIRenderer(mWindow,Ogre::RENDER_QUEUE_OVERLAY, false, 3000,Ogre::ST_EXTERIOR_FAR);
    mGUISystem = new CEGUI::System(mGUIRenderer);
    CEGUI::SchemeManager::getSingleton().loadScheme((CEGUI::utf8*)"TaharezLook.scheme");
    mGUISystem->setDefaultMouseCursor((CEGUI::utf8*)"TaharezLook", (CEGUI::utf8*)"MouseArrow");
	CEGUI::Window* sheet = CEGUI::WindowManager::getSingleton().loadWindowLayout((CEGUI::utf8*)"test.xml"); 
    mGUISystem->setGUISheet(sheet);
Now it throws an assert error with the 3rd Line (CEGUI::SchemeManager::getSingleton().loadScheme((CEGUI::utf8*)"TaharezLook.scheme");)

Here is my call stack:

Code: Select all

 	ntdll.dll!7c901230() 	
 	ntdll.dll!7c96c943() 	
 	ntdll.dll!7c96cd80() 	
 	ntdll.dll!7c960af8() 	
 	kernel32.dll!7c85e7af() 	
>	msvcr71d.dll!_CrtIsValidHeapPointer(const void * pUserData=0x0f5f20e8)  Line 1807	C
 	msvcr71d.dll!_free_dbg_lk(void * pUserData=0x0f5f20e8, int nBlockUse=0x00000001)  Line 1132 + 0x9	C
 	msvcr71d.dll!_free_dbg(void * pUserData=0x0f5f20e8, int nBlockUse=0x00000001)  Line 1070 + 0xd	C
 	msvcr71d.dll!operator delete(void * pUserData=0x0f5f20e8)  Line 54 + 0x10	C++
 	msvcr71d.dll!operator delete[](void * p=0x0f5f20e8)  Line 21 + 0x9	C++
 	CEGUIBase_d.dll!CEGUI::RawDataContainer::release()  Line 141 + 0x18	C++
 	CEGUIBase_d.dll!CEGUI::RawDataContainer::~RawDataContainer()  Line 135	C++
 	CEGUIBase_d.dll!CEGUI::Imageset::load(const CEGUI::String & filename={...}, const CEGUI::String & resourceGroup={...})  Line 203 + 0x28	C++
 	CEGUIBase_d.dll!CEGUI::Imageset::Imageset(const CEGUI::String & filename={...}, const CEGUI::String & resourceGroup={...})  Line 82	C++
 	CEGUIBase_d.dll!CEGUI::ImagesetManager::createImageset(const CEGUI::String & filename={...}, const CEGUI::String & resourceGroup={...})  Line 90 + 0x36	C++
 	CEGUIBase_d.dll!CEGUI::Scheme::loadResources()  Line 184 + 0x24	C++
 	CEGUIBase_d.dll!CEGUI::Scheme::Scheme(const CEGUI::String & filename={...}, const CEGUI::String & resourceGroup={...})  Line 152	C++
 	CEGUIBase_d.dll!CEGUI::SchemeManager::loadScheme(const CEGUI::String & scheme_filename={...}, const CEGUI::String & resourceGroup={...})  Line 71 + 0x36	C++
 	Game_01.exe!GameApplication::setup()  Line 48 + 0x66	C++
 	Game_01.exe!GameApplication::go()  Line 13 + 0x8	C++
 	Game_01.exe!WinMain(HINSTANCE__ * hInst=0x00400000, HINSTANCE__ * __formal=0x00000000, char * strCmdLine=0x00141f18, HINSTANCE__ * __formal=0x00000000)  Line 11	C++
 	Game_01.exe!WinMainCRTStartup()  Line 251 + 0x30	C
 	kernel32.dll!7c816d4f() 	
 	ntdll.dll!7c915b4f() 	
 	kernel32.dll!7c8399f3() 	
It appears as if there is a double delete on the CEGUI::Rawdatacontainer destructor. Has anything significant changed with the move of the GUI Renderer to Ogre that may have broken my code (Or am I stupidly missing the obvious)...
JasonW
Gnoblar
Posts: 18
Joined: Thu Feb 10, 2005 7:14 am
Location: Mackay, QLD, Australia

Post by JasonW »

Ok after a bit more research I have a little more information.

After tracing deeper I have found that the error occurs in the ceguischememanager.cpp in particular in the following code ...

Scheme* SchemeManager::loadScheme(const String& scheme_filename, const String& resourceGroup)
{
......
Scheme* tmp = new Scheme(scheme_filename, resourceGroup);
.......
}

the line shown is where the assert occurs...

Does this help with any clues as even the Demo_gui.exe that comes with the latest Ogre CVS is doing it... not just my code...
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Post by sinbad »

Demo_Gui works perfectly here, I suspect you've moved or removed some crucial media file (like the scheme file).

[edit]Actually it's likely to be that you're using the latest CEGUI CVS. Make sure you get the release_0_2_0 branch if you want to use CEGUI CVS.[/edit]
JasonW
Gnoblar
Posts: 18
Joined: Thu Feb 10, 2005 7:14 am
Location: Mackay, QLD, Australia

Post by JasonW »

Thanks Sinbad - I am using the latest CEGUI. I will retrieve the one you have suggested and give that a shot.
Post Reply