CEGUI and Ogre Memory Manager

Problems building or running the engine, queries about how to use features etc.
User avatar
Robomaniac
Hobgoblin
Posts: 508
Joined: Tue Feb 03, 2004 6:39 am

CEGUI and Ogre Memory Manager

Post by Robomaniac »

I'm currently working on implementing CEGUI into my game, but I'm having trouble with malloc errors. Apparently the cegui system uses a the xerces memory manager so i need to disable the ogre memory manager. At least this is what i've read. Is there a way around this? I don't want to lose ogre's functional memory manager (w/ the leak detection esp.)?

Thanks.

Steve
phear hingo

My Webpage
User avatar
pjcast
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2543
Joined: Fri Oct 24, 2003 2:53 am
Location: San Diego, Ca
x 2

Post by pjcast »

Put the CEGUI headers before any Ogre includes, or use the Ogre macros for disabling memory manager around the CEGUI includes - I forget what those are named, but they are include files.
Have a question about Input? Video? WGE? Come on over... http://www.wreckedgames.com/forum/
User avatar
Kanma
Halfling
Posts: 61
Joined: Sun Feb 22, 2004 3:41 pm
Location: Martigny, Switzerland

Post by Kanma »

From the top of my head, it should be something like:

Code: Select all

#include <OgreNoMemoryMacros.h>
#include <CEGUI.h>
#include <OgreMemoryMacros.h>
I had the same problem, but I didn't tested this solution yet.

HTH
User avatar
CrazyEddie
Goblin
Posts: 228
Joined: Thu Feb 12, 2004 10:03 am
Location: Workin' on someting cool
x 1

Post by CrazyEddie »

Yeah, this is a conflict between Ogre and Xerces. I'll hopefully get this resolved shortly.

There is a separate issue, related to the debug memory manager, that also affects CEGUI/Ogre; this is caused by blocks of memory being allocated in the Ogre modules (under the memory manager) and later released within the CEGUI modules (without the memory manager) - you get an assert. This is more of an issue, and I'll be investigating possible solutions ASAP.

CE.
User avatar
Robomaniac
Hobgoblin
Posts: 508
Joined: Tue Feb 03, 2004 6:39 am

Post by Robomaniac »

Alright, I'll try that.
phear hingo

My Webpage
User avatar
CrazyEddie
Goblin
Posts: 228
Joined: Thu Feb 12, 2004 10:03 am
Location: Workin' on someting cool
x 1

Post by CrazyEddie »

CrazyEddie wrote:There is a separate issue, related to the debug memory manager, that also affects CEGUI/Ogre; this is caused by blocks of memory being allocated in the Ogre modules (under the memory manager) and later released within the CEGUI modules (without the memory manager) - you get an assert
This issue has now been resolved in CEGUI CVS-HEAD, so it is once again possible to use CEGUI with the Ogre debug memory manager enabled. I'll merge this, and another unrelated fix, into the 0.1.0 branch shortly.

CE.
User avatar
spookyboo
Silver Sponsor
Silver Sponsor
Posts: 1141
Joined: Tue Jul 06, 2004 5:57 am
x 151

Post by spookyboo »

I am getting an assertion failed window as soon as I quit Ogre (dbgheap.c, _CrtIsValidHeapPointer(pUserData)).

I am getting this exception in Debug mode and it occurs with all downloaded CEGUI Ogre demo's. I've downloaded the latest CEGUI version from the site (10/01/05). Everything else works fine (@CE, nice job btw).