Re: the hue of death: setting color property crashes application
Andy Wingo <[email protected]> Tue, 29 Jul 2008 21:03:25 +0200
| Newsgroups | gmane.lisp.guile.gtk |
|---|---|
| Message-ID | <[email protected]> |
Hi, On Mon 28 Jul 2008 17:43, "gregory benison" <[email protected]> writes: > In the latest guile-gnome, setting a "color" property can cause a crash: > > G_SLICE=debug-blocks guile-gnome-2 >> (use-modules (oop goops)(gnome gtk)) >> (set (make <gtk-color-button>) 'color "red") > GSlice: MemChecker: attempt to release non-allocated block: 0x81a50a8 size=12 > Aborted > > Without 'debug-blocks', the crash is delayed, but will happen > eventually because the heap is corrupted. > > The cause is a GdkColor* being allocated with g_new0(), but freed with > g_slice_free1() rather than g_free(): Wow, that's a nasty one. Good catch. As you say it probably affects GdkRectangle as well, and perhaps also GtkTreeIter. Your patch is good, will apply. Andy -- http://wingolog.org/