GNOME Bugzilla – Bug 169326
Vte widget crashes when reparented
Last modified: 2005-07-22 11:00:39 UTC
Distribution/Version: Debian sid While working on a python app of mine, which uses python-vte I got it to crash vte when changing the container for the vte widget. (http://www.mail-archive.com/pygtk@daa.com.au/msg10333.html) I've managed to create a simple .c testcase to reproduce the problem. I tend to believe this is the same issue as http://bugzilla.ximian.com/show_bug.cgi?id=55679 and I have found no other references of such a problem on {ximian,gnome,redhat}.bugzilla This is the stacktrace: Program received signal SIGSEGV, Segmentation fault. 0xb7f61cad in _vte_draw_set_text_font (draw=0x0, fontdesc=0xb7fe0a77, anti_alias=3086879351) at vtedraw.c:221 221 g_return_if_fail(draw->impl != NULL); (gdb) bt
+ Trace 56469
I reproduce this with both 0.11.11 and the new 0.11.12. Attached is the testcase
Created attachment 38314 [details] Testcase This reproduces the segfault (crashes on ppc and x86 fwiw)
Created attachment 38327 [details] [review] Tiny patch to clear up the segfault Note that this papers over the real issue (haven't dug deeper into it ATM) but it does fix the segfault when reparenting. Given that this isn't a clean nice fix (I hope I can provide one later this week), I won't add the PATCH keyword.
Created attachment 38334 [details] [review] First tentative fix Looked at this a bit more, it seems vte_terminal_style_changed gets called when the widget is not realized. So simply returning in such case fixes the segfault.
Unfortunately the maintainer is MIA, but marking new so this patch will be hopefully applied anyway.
I've checked around various different gtk+ widgets (gtkcalendar.c and gtkwidget.c for example) and before changing the style GTK_WIDGET_REALIZE(widget) is always tested for, so this patch isn't tentative any longer ;)
I applied this.
*** Bug 311140 has been marked as a duplicate of this bug. ***