destroyImageSet causes crash :(

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
RuprechtTheMonkeyBoy
Just popping in
Just popping in
Posts: 17
Joined: Wed Jan 12, 2005 12:06
Location: Here
Contact:

destroyImageSet causes crash :(

Postby RuprechtTheMonkeyBoy » Sat Oct 02, 2004 05:57

Woohoo! /me does the happy dance! :lol: :D

I have successfully built and used CEGUI on Mac OS X!!

As suggested, somewhere during the build, the Ogre memory manager was getting tangled up in the code, and the whole thing was getting botched up on String destruction. :oops:

I had to complete scrap the Xcode project and build a new one, carefully, from scratch. But it works great now!

@CrazyEddie:
I will have another patch to you this weekend for this work.

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

destroyImageSet causes crash :(

Postby CrazyEddie » Sat Oct 02, 2004 08:26

Whoo Hoo! :D

That's great news :) I'll look out for the patch.

CE.

User avatar
pjcast
Quite a regular
Quite a regular
Posts: 47
Joined: Wed Jan 12, 2005 12:06

destroyImageSet causes crash :(

Postby pjcast » Sun Oct 03, 2004 16:05

Ok, I'm back to do some testing. ANd have recently built Ogre and plugins with debug stl (whoa, that was fun too) - so now I can debug
:twisted: .

As a side note - is it just me that can't build/use debug GL rendersystem because glu.dll uses release stlport?

Anyway, after getting everything setup, and a quick test/debug run, showed the app to be indeed crashing during texture deletion. i'll look more into it and try the solution you posted first since I still havn't gotten to that.

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

destroyImageSet causes crash :(

Postby CrazyEddie » Sun Oct 03, 2004 16:55

As a side note - is it just me that can't build/use debug GL rendersystem because glu.dll uses release stlport?

I guess that would affect everyone the same :?

Anyway, after getting everything setup, and a quick test/debug run, showed the app to be indeed crashing during texture deletion. i'll look more into it and try the solution you posted first since I still havn't gotten to that.

Hmmm. Hopefully the fix I checked in will have resolved that for you :)

CE.

User avatar
pjcast
Quite a regular
Quite a regular
Posts: 47
Joined: Wed Jan 12, 2005 12:06

destroyImageSet causes crash :(

Postby pjcast » Sun Oct 03, 2004 22:10

Sinbad told me he has/uses the GL system in debug, so it must be something I did (or a vc6 hangup) - anyway, thats not important

:arrow: I downloaded the most recent snapshot, and am a bit confused.

Code: Select all

void OgreTexture::setOgreTexture(Ogre::Texture& texture)
{
   freeOgreTexture();

   d_ogre_texture = &texture;
   d_width    = d_ogre_texture->getWidth();
   d_height = d_ogre_texture->getHeight();
   d_isLinked = true;
}


I see d_isLinked, but where is it used? I think it should of been added to:

Code: Select all

void OgreTexture::freeOgreTexture(void)
{
   if (d_ogre_texture)


But its not there, perhaps it should be:

if (d_ogre_texture = NULL && d_isLinked != true )

User avatar
pjcast
Quite a regular
Quite a regular
Posts: 47
Joined: Wed Jan 12, 2005 12:06

destroyImageSet causes crash :(

Postby pjcast » Sun Oct 03, 2004 23:13

Ok, that fix made it work better... Instead of crashing on destroyImageSet the crash moved to destroy texture... So I figure destroying the imageset causes the texture to get deleted? Anyway, I removed my call to OgreRenderer-> destroy teture so I don't try and delete something that was already deleted.

And everything seems better now (except I think you should add that titbit of code I posted above), and now that I know CE deletes the texture from an imageset, I just will null it after that call. I will have an updated player demo that has several fixes shortly.

Thanks :lol:

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

destroyImageSet causes crash :(

Postby CrazyEddie » Mon Oct 04, 2004 08:29

I did have that exact code in as part of the fix, honest! :oops:

I think the reason it was missing is because I have two versions of the code I'm working on at the same time; obviously I didn't transfer the changes over completely. I'll get this sorted in a little while :)

CE.

User avatar
pjcast
Quite a regular
Quite a regular
Posts: 47
Joined: Wed Jan 12, 2005 12:06

destroyImageSet causes crash :(

Postby pjcast » Tue Oct 05, 2004 00:29

I figured as much :wink:


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 4 guests