Page 1 of 1

CEGUI malloc probs on OS X?

Posted: Sat Oct 01, 2005 13:22
by Alexco
After trying to resolve the bus errors I have with the sample programs (http://www.cegui.org.uk/modules/newbb/v ... 39&forum=2) I found out by changing the internal buffer size in the CEGUI::String class from 32 to 16, 64 or whatever, the segfault occurs somewhat earlier (or later).
But the problem still remains. It occurs always while parsing the XML file and inside the append method of String. Since I am using TinyXML, maybe the promplem is related to this?
Any OS X user out there who got the sample code up and running?

An other funny thing:
If I use the standard value of 32 and an OS X profiling tool which counts malloc/free calls, the Gui from demo4 is displayed before the app crashes. Until now, I found no other way to see the Gui :(

Re: CEGUI malloc probs on OS X?

Posted: Sun Oct 02, 2005 21:24
by BinaryAlchemy
You may be getting the same crash I was, it's caused by CEGUITinyXMLParser.cpp not null terminating the string before calling TinyXML. I have a quick hack of a patch if you want it, but I makes a copy of the entire XML file just to pass it and I think there's an upper bound to how big a file it will work with :oops: (works for me so far though).

If your using Falagard it can also cause a SIGBUS of a typo in it's plist, patch for that is on the SF patch tracker.

Re: CEGUI malloc probs on OS X?

Posted: Thu Oct 06, 2005 16:15
by Alexco
Hmm. I can not get this thing to work. It seems that I make something wrong here. I tried now using the xerces xml lib, but the same error remains.

How did you compile this thing? I am using OS X 10.4.2, XCode 2.1 and GCC 4.0 (Apple) and the supplied xcode template,
Maybe this is a gcc related bug?

I am now really clueless.....

Any tips/help would be nice...

regards,
Alex

Re: CEGUI malloc probs on OS X?

Posted: Fri Oct 07, 2005 05:44
by Alexco
Ohhh I am soo stupid. :oops:

I should have read your response twice before answering.
I thought I had looked for patches, but I missed yours. Thanks to your OpenGL texture patch everything works now!

Thanks!

Alex