kudos, assert/abort, baby pics

If you found a bug in our library or on our website, please report it in this section. In this forum you can also make concrete suggestions or feature requests.

Moderators: CEGUI MVP, CEGUI Team

DougS
Just popping in
Just popping in
Posts: 14
Joined: Thu Mar 03, 2011 23:45

kudos, assert/abort, baby pics

Postby DougS » Thu Nov 17, 2011 04:43

First of all, kudos to all who have laboured to bring cegui to life over the years. I needed a gui for my opengl project and cegui 0.7.5 is serving well.

Second, I just went through a week of intense debugging my opengl+cegui+sdl+pthreads + etc. game-ish app when a race condition reared its ugly head. Well, if only it had properly reared its head I might have found it sooner. To make a long story short, the app had no problem on linux, but, in my Win32/mingw port sometimes SDL video (needed for the joystick?!) would grab the Windows Device Context (?) before a cegui notifyDisplaySizeChanged call. (At least I think that is what was happening - I could be wrong here! I watched it call notifyDisplaySizeChanged then die with an exit code of 3 - but it could have been things other than cegui) That happened in weird combinations of things which affect timing, as race conditions can manifest. Eventually (after much swapping of this and that: like various freeglut mingw libraries), I was able to fix/workaround the issue. (Ended up sticking with the freeglut dll that comes with cegui mingw) I think one little thing that might have helped me out some is not using assert/abort in the gui code. It would die, no error message, nothing in the log, with an exit code of 3. I haven't followed that issue from notifyDisplaySizeChanged to the assert/abort but maybe just doing a fflush(stdout) somewhere in there might help (Windows often needs an extra flush). Or logging the error before the assert (if you must assert/abort). But again, all good now as I managed to suss it out.

edit: If I had set up a signal handler for the abort it should have both core dumped and flushed. Which would have sped me along, no doubt. Sigh.

And third, here are some pics of my cegui-based Windows and linux creation, a loose recreation of a classic robot toy from ... the olden days. http://victoriafamilyrobotics.net/vfr1/gallery It walks and talks and stacks blocks.

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

Re: kudos, assert/abort, baby pics

Postby CrazyEddie » Thu Nov 17, 2011 09:08

Nice project :)

With regards to the assert / abort, where is that precisely? I have no ideas at all. If such a thing exists in CEGUI code, I don't know! But I agree, spontaneously aborting with no message is not good. This said, CEGUI is definitely not thread safe, so if you somehow trigger different parts of CEGUI from different threads (such as the notifyDisplaySizeChanged call), then debugging "fun" will definitely be the result.

CE


Return to “Bug Reports, Suggestions, Feature Requests”

Who is online

Users browsing this forum: No registered users and 5 guests