Some memory-management related problems

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
Assidragon
Just popping in
Just popping in
Posts: 6
Joined: Sun Jan 16, 2005 02:24
Location: Hungary
Contact:

Some memory-management related problems

Postby Assidragon » Sun Jan 16, 2005 02:37

So, straight into it. I'm experiencing some strange behaviour and I wonder if anyone else saw these or just I managed to mess something again.

This is how I start the system:

Code: Select all

// Set the rendering options
mOgreRenderer = new OgreRenderer(GameMain::getSingleton().getWindow(), RENDER_QUEUE_OVERLAY, false, 3000, GameMain::getSingleton().getSceneMgr());
// Create the GUI system
new System(mOgreRenderer);


...and this is how I end it:

Code: Select all

delete CEGUI::System::getSingletonPtr();

if (mOgreRenderer)
{
   delete mOgreRenderer;
}


Now, I have two problems/questions.

Using line like this

Code: Select all

CEGUI::SchemeManager::getSingleton().loadScheme((utf8*)"TaharezLook.scheme");
results in memory leaks, according to OgreLeaks.log (4 leaks, ogredatachunk.cpp(55) Ogre:: DataChunk::allocate).

This snippet

Code: Select all

CEGUI::Font* gfont = CEGUI::FontManager::getSingleton().createFont((utf8*)"Tahoma-12", (utf8*)"tahoma.ttf", 14, 0);
gfont->setAutoScalingEnabled(true);
gfont->setNativeResolution(CEGUI::Size(800, 600));

however gives an assert (_BLOCK_TYPE_IS_VALID(pHead->nBlockUse) ) on the delete CEGUI::System::getSingletonptr() line when I try to exit in debug.
Log:

Code: Select all

16/00/2005 02:52:34 (InfL1)   ---- Begining cleanup of Font system ----
16/00/2005 02:52:34 (InfL2)   Imageset 'Tahoma-12_auto_glyph_images' has been destroyed.

And that's it. Normally the line "Font 'Tahoma-12' has been destroyed." should follow.

I have a feeling the second one is thanks to my messup, just with all these changes lately I wondered if anyone else experienced them. If this was already noted somewhere... sorryyy, I tried searching :?
EDIT: Oh and I use the latest stable releases in both OGRE and CEGUI.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Some memory-management related problems

Postby CrazyEddie » Sun Jan 16, 2005 07:33

If you're using the 0.1.0 release of CEGUI can you do a cvs update on the source; this will get you bug-fixes from that branch only; so is still considered stable. There was a fairly big bug that caused a lot of issues with memory that has been fixed. I'll try to get a set of bug-fix releases out next week.

If you already have the bug fixes via CVS and the problem persists, can you let me know which compiler version you are using, thanks.

CE.

User avatar
Assidragon
Just popping in
Just popping in
Posts: 6
Joined: Sun Jan 16, 2005 02:24
Location: Hungary
Contact:

Re: Some memory-management related problems

Postby Assidragon » Sun Jan 16, 2005 10:46

Updating to CVS fixed these, thanks a lot. :)

While here I'd like to say thanks for developing this great system :)

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Some memory-management related problems

Postby CrazyEddie » Sun Jan 16, 2005 12:32

No problem. I'm glad you're finding the system useful :)

User avatar
Assidragon
Just popping in
Just popping in
Posts: 6
Joined: Sun Jan 16, 2005 02:24
Location: Hungary
Contact:

Re: Some memory-management related problems

Postby Assidragon » Sun Jan 16, 2005 12:39

Hard not to actually. It does all what it has to and is quite flexible... the only drawback I found in CEGUI a while ago was the fact it had a seperate resource handling than OGRE so you had to mess with the directories, but now it's all fine. =)


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 6 guests