GNOME Bugzilla – Bug 581829
gtk_widget_get_snapshot crashes
Last modified: 2010-01-01 00:38:11 UTC
Use current gtk+ from git or 2.14 Use current gnumeric git with the patch from 144787 (of course with compilation of the main part of that patch enabled). Run gnumeric Add a slider to the empty gnumeric window. Select preview. This will result in a crash from within gtk_widget_get_snapshot. The following info is obtained by setting a break point at gtk_widget_get_snapshot while running jhbuild run gdb --args gnumeric --sync Breakpoint 1, IA__gtk_widget_get_snapshot (widget=0x8f47008, clip_rect=0x0) at gtkwidget.c:8773 8773 GdkWindow *parent_window = NULL; (gdb) p widget $1 = (GtkWidget *) 0x8f47008 (gdb) p *widget $2 = {object = {parent_instance = {g_type_instance = {g_class = 0x8f6a900}, ref_count = 1, qdata = 0x8f8c3b0}, flags = 2164704}, private_flags = 3584, state = 0 '\0', saved_state = 0 '\0', name = 0x0, style = 0x8decc78, requisition = {width = 31, height = 17}, allocation = {x = 38, y = 81, width = 183, height = 26}, window = 0x8dcc0e0, parent = 0x8f5d400} (gdb) n 8775 GList *windows = NULL, *list; (gdb) 8777 g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL); (gdb) 8778 if (!GTK_WIDGET_VISIBLE (widget)) (gdb) 8782 if (widget->parent && !GTK_WIDGET_REALIZED (widget->parent)) (gdb) 8784 if (!GTK_WIDGET_REALIZED (widget)) (gdb) 8788 x = widget->allocation.x; (gdb) 8789 y = widget->allocation.y; (gdb) 8790 width = widget->allocation.width; (gdb) p x $3 = 38 (gdb) p y $4 = 81 (gdb) n 8791 height = widget->allocation.height; (gdb) n 8793 if (widget->parent && !GTK_WIDGET_NO_WINDOW (widget)) (gdb) p width $5 = 183 (gdb) p height $6 = 26 (gdb) n 8825 else if (!widget->parent) (gdb) 8833 if (clip_rect) (gdb) p clip_rect $7 = (GdkRectangle *) 0x0 (gdb) n 8861 pixmap = gdk_pixmap_new (widget->window, width, height, gdk_drawable_get_depth (widget->window)); (gdb) 8862 for (list = windows; list; list = list->next) /* !NO_WINDOW widgets */ (gdb) p windows $8 = (GList *) 0x0 (gdb) n 8874 if (!windows) /* NO_WINDOW || toplevel => parent_window == NULL || parent_window == widget->window */ (gdb) n 8876 gdk_window_redirect_to_drawable (widget->window, pixmap, x, y, 0, 0, width, height); (gdb) 8877 expose_window (widget->window); (gdb) Gdk-ERROR **: The program '/home/aguelzow/gnumeric/bin/gnumeric' received an X Window System error. This probably reflects a bug in the program. The error was 'BadAlloc (insufficient resources for operation)'. (Details: serial 67177 error_code 11 request_code 53 minor_code 0) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) aborting... Program received signal SIGABRT, Aborted. 0xb7fcd424 in __kernel_vsyscall () (gdb) bt
+ Trace 215235
This appears to be fixed in 2.18.