GNOME Bugzilla – Bug 167481
Gnect does not start properly after detaching toolbar.
Last modified: 2005-02-16 21:30:39 UTC
Please describe the problem: I've tried this on two different machines, one a CVS HEAD gnome (entire thing, almost), and the other is Luis' Ubuntu-based 2.10 beta LiveCD. After the following steps, the game will start up, send a warning to the console (gtk_widget_size_allocate(): attempt to allocate widget with width -1075102744 and heigh 2148126), resulting in a gnect with drawing area that isn't being drawn into. Steps to reproduce: 1. Start gnect 2. Enable toolbar 3. Detatch toolbar from the game window 4. Close game 5. Start game again. Actual results: After those steps, the game will start up, send a warning to the console (gtk_widget_size_allocate(): attempt to allocate widget with width -1075102744 and heigh 2148126), resulting in a gnect with drawing area that isn't being drawn into. Expected results: Lose while playing a game against an evil AI that is almost entirely based off of a no-lose opening book, regardless of skill level. Does this happen every time? Yes. Other information: 'gconftool --recursive-unset /apps/gnect' doesn't fix it. I ran into this while trying to figure out why "toolbar_changed ()" was in both stack traces related to Bug 167421.
I get something slightly different with 2.9. No warning, but it still fails to draw anything even when I have reattached the tool bar. Hmmm.
It turns out that the drawing code was relying on the images being loaded and rendered as a side-effect of the drawing-area resize. Unfortunately, when the toolbar is in place this happens before the graphics context is ready so no drawing takes place. I have now made sure that drawing is explicitly done at start-up. The code is in CVS of course.