bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnubg] Another crash report....


From: Gary Wong
Subject: Re: [Bug-gnubg] Another crash report....
Date: Thu, 19 Dec 2002 11:45:48 -0500
User-agent: Mutt/1.3.28i

On Mon, Dec 16, 2002 at 06:19:09PM +0000, Joern Thyssen wrote:
> Using gtk_object_get_data seems to do the trick, but I would really like
> to know why it suddenly stopped working.

Found it!!!

It was a nasty bug in GTK's gtkobject.c.  gtk_object_get_user_data()
was calling a lower-level function and passing in a statically
allocated quark (i.e. hash) of the string "user_data".  Unfortunately,
that quark was initialised only by gtk_object_set_user_data(), so if
all code uses gtk_object_set_data_full() or some other function, then
the quark will never be set, and gtk_object_get_user_data() won't be
able to find the data.  (I've only found this bug in the source of
GTK+ 2.0.3, but presumably something similar is going on in 1.2/1.3 as
well.  I've reported it to the GTK+ people, so hopefully it will be
fixed one day...)

The code only ever managed to work in the past because the old
rendering code used gtk_object_set_user_data() on the widgets showing
the chequers next to the player names under the board.  When the new
rendering code eliminated that call, the GTK+ bug was triggered.

I know nobody cares, but it's reassuring to me that after days of
searching, there was no deep, subtle and mysterious memory corruption
bug in render.c.  (At least, not that we've found!)

Cheers,
Gary.
-- 
   Gary Wong           address@hidden           http://www.cs.arizona.edu/~gary/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]