After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 599574 - Crash in _cairo_surface_set_error at cairo-surface.c line 128
Crash in _cairo_surface_set_error at cairo-surface.c line 128
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
2.20.x
Other All
: Normal critical
: ---
Assigned To: gtk-bugs
gtk-bugs
: 604283 604831 616563 616667 616676 617086 617275 617758 618465 618658 619013 619327 619876 620707 621231 621569 622258 624081 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-10-25 18:13 UTC by Johannes Berg
Modified: 2014-12-22 18:18 UTC
See Also:
GNOME target: ---
GNOME version: 2.29/2.30


Attachments
[PATCH 1/2] GNU-style indent for gdk/x11/gdkdrawable-x11.c (83.39 KB, patch)
2010-05-23 03:02 UTC, Matthew W. S. Bell
none Details | Review
[PATCH 2/2] Convert Cairo error object convention to NULL on error. (15.23 KB, patch)
2010-05-23 03:03 UTC, Matthew W. S. Bell
none Details | Review
x11: Query size on real drawable (951 bytes, patch)
2010-07-19 11:21 UTC, Benjamin Otte (Company)
rejected Details | Review

Description Johannes Berg 2009-10-25 18:13:07 UTC
What were you doing when the application crashed?
switching folders to view


Distribution: Debian squeeze/sid
Gnome Release: 2.28.0 2009-09-27 (Debian)
BugBuddy Version: 2.28.0

System: Linux 2.6.32-rc3-wl-39587-g329c2e6-dirty #94 SMP PREEMPT Fri Oct 9 11:23:21 CEST 2009 x86_64
X Vendor: The X.Org Foundation
X Vendor Release: 10605000
Selinux: No
Accessibility: Disabled
GTK+ Theme: Simple
Icon Theme: Mist
GTK+ Modules: globalmenu-gnome, gnomebreakpad, canberra-gtk-module

Memory status: size: 1098719232 vsize: 1098719232 resident: 420450304 share: 25333760 rss: 420450304 rss_rlim: 18446744073709551615
CPU usage: start_time: 1256493823 rtime: 2804 utime: 2094 stime: 710 cutime:9 cstime: 10 timeout: 0 it_real_value: 0 frequency: 100

Backtrace was generated from '/usr/bin/evolution'

[Thread debugging using libthread_db enabled]
[New Thread 0x7f09bfdfc910 (LWP 25693)]
[New Thread 0x7f09b7fff910 (LWP 25692)]
[New Thread 0x7f09c72cd910 (LWP 25414)]
[New Thread 0x7f09c4ea8910 (LWP 25413)]
[New Thread 0x7f09c60bf910 (LWP 25412)]
[New Thread 0x7f09c68c0910 (LWP 25410)]
[New Thread 0x7f09c84f8910 (LWP 25407)]
[New Thread 0x7f09c8cf9910 (LWP 25406)]
0x00007f09de11852d in __libc_waitpid (pid=26563, 
    stat_loc=<value optimized out>, options=0)
    at ../sysdeps/unix/sysv/linux/waitpid.c:41
	in ../sysdeps/unix/sysv/linux/waitpid.c

Thread 1 (Thread 0x7f09e31bb810 (LWP 25398))

  • #0 __libc_waitpid
    at ../sysdeps/unix/sysv/linux/waitpid.c line 41
  • #1 IA__g_spawn_sync
    at /tmp/buildd/glib2.0-2.22.2/glib/gspawn.c line 386
  • #2 IA__g_spawn_command_line_sync
    at /tmp/buildd/glib2.0-2.22.2/glib/gspawn.c line 700
  • #3 ??
    from /usr/lib/gtk-2.0/modules/libgnomebreakpad.so
  • #4 <signal handler called>
  • #5 ??
    from /usr/lib/libcairo.so.2
  • #6 recompute_visible_regions_internal
    at /tmp/buildd/gtk+2.0-2.18.3/gdk/gdkwindow.c line 1062
  • #7 gdk_window_move_resize_internal
    at /tmp/buildd/gtk+2.0-2.18.3/gdk/gdkwindow.c line 7182
  • #8 ??
    from /usr/lib/libgnomecanvas-2.so.0
  • #9 gnome_canvas_set_scroll_region
    from /usr/lib/libgnomecanvas-2.so.0
  • #10 tree_canvas_reflow_idle
    at e-tree.c line 748
  • #11 g_main_dispatch
    at /tmp/buildd/glib2.0-2.22.2/glib/gmain.c line 1960
  • #12 IA__g_main_context_dispatch
    at /tmp/buildd/glib2.0-2.22.2/glib/gmain.c line 2513
  • #13 g_main_context_iterate
    at /tmp/buildd/glib2.0-2.22.2/glib/gmain.c line 2591
  • #14 IA__g_main_loop_run
    at /tmp/buildd/glib2.0-2.22.2/glib/gmain.c line 2799
  • #15 bonobo_main
    from /usr/lib/libbonobo-2.so.0
  • #16 main
    at main.c line 732

	Inferior 1 [process 25398] will be detached.

Quit anyway? (y or n) [answered Y; input not from terminal]


---- Critical and fatal warnings logged during execution ----

** evolution **: atk_object_set_name: assertion `name != NULL' failed 
** evolution **: atk_object_set_name: assertion `name != NULL' failed 
** evolution **: atk_object_set_name: assertion `name != NULL' failed 
** evolution **: atk_object_set_name: assertion `name != NULL' failed 
** evolution **: atk_object_set_name: assertion `name != NULL' failed 
** evolution **: atk_object_set_name: assertion `name != NULL' failed 
** evolution **: atk_object_set_name: assertion `name != NULL' failed 
** evolution **: atk_object_set_name: assertion `name != NULL' failed 
** evolution **: atk_object_set_name: assertion `name != NULL' failed 
** evolution **: atk_object_set_name: assertion `name != NULL' failed 
** evolution **: atk_object_set_name: assertion `name != NULL' failed 
** evolution **: atk_object_set_name: assertion `name != NULL' failed 
** evolution **: atk_object_set_name: assertion `name != NULL' failed 
** evolution **: atk_object_set_name: assertion `name != NULL' failed 
** evolution **: atk_object_set_name: assertion `name != NULL' failed 


----------- .xsession-errors (15653 sec old) ---------------------
(evolution:13556): camel-WARNING **: Error storing 'jberg1X@imapmail.intel.com:Journal': Host lookup failed: imapmail.intel.com: Name or service not known
(evolution:13556): camel-WARNING **: Error storing 'jberg1X@imapmail.intel.com:Junk E-mail': Host lookup failed: imapmail.intel.com: Name or service not known
(evolution:13556): camel-WARNING **: Error storing 'jberg1X@imapmail.intel.com:Managed Folders': Host lookup failed: imapmail.intel.com: Name or service not known
(evolution:13556): camel-WARNING **: Error storing 'jberg1X@imapmail.intel.com:Managed Folders/Business Important': Host lookup failed: imapmail.intel.com: Name or service not known
(evolution:13556): camel-WARNING **: Error storing 'jberg1X@imapmail.intel.com:Notes': Host lookup failed: imapmail.intel.com: Name or service not known
(evolution:13556): camel-WARNING **: Error storing 'jberg1X@imapmail.intel.com:Outbox': Host lookup failed: imapmail.intel.com: Name or service not known
(evolution:13556): camel-WARNING **: Error storing 'jberg1X@imapmail.intel.com:Quarantine': Host lookup failed: imapmail.intel.com: Name or service not known
...Too much output, ignoring rest...
--------------------------------------------------
Comment 1 Johannes Berg 2009-10-25 18:14:14 UTC
Looks like a bug in cairo/gdk I guess...
Comment 2 Johannes Berg 2009-10-25 18:16:55 UTC
Here's a trace with cairo dbg info installed.


System: Linux 2.6.32-rc3-wl-39587-g329c2e6-dirty #94 SMP PREEMPT Fri Oct 9 11:23:21 CEST 2009 x86_64
X Vendor: The X.Org Foundation
X Vendor Release: 10605000
Selinux: No
Accessibility: Disabled
GTK+ Theme: Simple
Icon Theme: Mist
GTK+ Modules: globalmenu-gnome, gnomebreakpad, canberra-gtk-module

Memory status: size: 847548416 vsize: 847548416 resident: 175943680 share: 24903680 rss: 175943680 rss_rlim: 18446744073709551615
CPU usage: start_time: 1256494523 rtime: 1122 utime: 773 stime: 349 cutime:0 cstime: 0 timeout: 0 it_real_value: 0 frequency: 100

Backtrace was generated from '/usr/bin/evolution'

[Thread debugging using libthread_db enabled]
[New Thread 0x7f1b5ae14910 (LWP 27007)]
[New Thread 0x7f1b5c019910 (LWP 26997)]
[New Thread 0x7f1b5d9b4910 (LWP 26996)]
[New Thread 0x7f1b65805910 (LWP 26814)]
[New Thread 0x7f1b5e1b5910 (LWP 26801)]
[New Thread 0x7f1b5f7fe910 (LWP 26800)]
[New Thread 0x7f1b5effd910 (LWP 26799)]
[New Thread 0x7f1b5ffff910 (LWP 26797)]
[New Thread 0x7f1b6622f910 (LWP 26794)]
[New Thread 0x7f1b66a30910 (LWP 26793)]
0x00007f1b7be4f52d in __libc_waitpid (pid=27008, 
    stat_loc=<value optimized out>, options=0)
    at ../sysdeps/unix/sysv/linux/waitpid.c:41
	in ../sysdeps/unix/sysv/linux/waitpid.c

Thread 1 (Thread 0x7f1b80ef2810 (LWP 26787))

  • #0 __libc_waitpid
    at ../sysdeps/unix/sysv/linux/waitpid.c line 41
  • #1 IA__g_spawn_sync
    at /tmp/buildd/glib2.0-2.22.2/glib/gspawn.c line 386
  • #2 IA__g_spawn_command_line_sync
    at /tmp/buildd/glib2.0-2.22.2/glib/gspawn.c line 700
  • #3 ??
    from /usr/lib/gtk-2.0/modules/libgnomebreakpad.so
  • #4 <signal handler called>
  • #5 _cairo_surface_set_error
    at /tmp/buildd/cairo-1.9.4/src/cairo-surface.c line 128
  • #6 recompute_visible_regions_internal
    at /tmp/buildd/gtk+2.0-2.18.3/gdk/gdkwindow.c line 1062
  • #7 gdk_window_move_resize_internal
    at /tmp/buildd/gtk+2.0-2.18.3/gdk/gdkwindow.c line 7182
  • #8 ??
    from /usr/lib/libgnomecanvas-2.so.0
  • #9 gnome_canvas_set_scroll_region
    from /usr/lib/libgnomecanvas-2.so.0
  • #10 tree_canvas_reflow_idle
    at e-tree.c line 748
  • #11 g_main_dispatch
    at /tmp/buildd/glib2.0-2.22.2/glib/gmain.c line 1960
  • #12 IA__g_main_context_dispatch
    at /tmp/buildd/glib2.0-2.22.2/glib/gmain.c line 2513
  • #13 g_main_context_iterate
    at /tmp/buildd/glib2.0-2.22.2/glib/gmain.c line 2591
  • #14 IA__g_main_loop_run
    at /tmp/buildd/glib2.0-2.22.2/glib/gmain.c line 2799
  • #15 bonobo_main
    from /usr/lib/libbonobo-2.so.0
  • #16 main
    at main.c line 732

	Inferior 1 [process 26787] will be detached.

Quit anyway? (y or n) [answered Y; input not from terminal]
Comment 3 Akhil Laddha 2009-12-18 03:45:42 UTC
*** Bug 604831 has been marked as a duplicate of this bug. ***
Comment 4 Matthew Barnes 2010-03-24 12:55:03 UTC
*** Bug 604283 has been marked as a duplicate of this bug. ***
Comment 5 Benjamin Otte (Company) 2010-04-09 15:11:26 UTC
I just had this pointed to me on #cairo - this can only happen if the pointer passed to _cairo_surface_set_error() is not a cairo surface. So something fishy is going on in the lower layers and an invalid pointer is passed to cairo_xlib_surface_set_size(). So this is definitely not a Cairo bug.
Comment 6 Frederic Crozat 2010-04-09 15:17:15 UTC
got a similar stacktrace with evolution 2.30.0 / gtk+ 2.20 / cairo 1.9.6

Reassigning to gtk+, from hint from Company (I thought cairo was suspicious). It could be a client-side window issue (trying to resize something it shouldn't)


(gdb) thread apply all bt

Thread 1 (Thread 0xb65397e0 (LWP 24417))

  • #0 _cairo_surface_set_error
    at cairo-surface.c line 132
  • #1 _gdk_windowing_set_cairo_surface_size
    at gdkdrawable-x11.c line 1540
  • #2 recompute_visible_regions_internal
    at gdkwindow.c line 1086
  • #3 recompute_visible_regions
    at gdkwindow.c line 1114
  • #4 gdk_window_move_resize_internal
    at gdkwindow.c line 7356
  • #5 IA__gdk_window_resize
    at gdkwindow.c line 7502
  • #6 IA__gtk_layout_set_size
  • #7 ??
    from /usr/lib/libgnomecanvas-2.so.0
  • #8 gnome_canvas_set_scroll_region
    from /usr/lib/libgnomecanvas-2.so.0
  • #9 tree_canvas_reflow_idle
    at e-tree.c line 778
  • #10 g_idle_dispatch
    at gmain.c line 4065
  • #11 g_main_dispatch
    at gmain.c line 1960
  • #12 IA__g_main_context_dispatch
    at gmain.c line 2513
  • #13 g_main_context_iterate
    at gmain.c line 2591
  • #14 IA__g_main_loop_run
    at gmain.c line 2799
  • #15 IA__gtk_main
    at gtkmain.c line 1219
  • #16 main
    at main.c line 578

Comment 7 Frederic Crozat 2010-04-12 08:12:18 UTC
got another similar crash in evo 2.30.0 / gtk+ 2.20 / cairo 1.9.6 :

(gdb) p *surface
$1 = {backend = 0x0, device = 0x0, type = CAIRO_SURFACE_TYPE_IMAGE, content = 
    CAIRO_CONTENT_COLOR, ref_count = {ref_count = -1}, status = 
    CAIRO_STATUS_INVALID_SIZE, unique_id = 0, finished = 0, is_clear = 1, 
  has_font_options = 0, user_data = {size = 0, num_elements = 0, 
    element_size = 0, elements = 0x0, is_snapshot = 0}, mime_data = {size = 0, 
    num_elements = 0, element_size = 0, elements = 0x0, is_snapshot = 0}, 
  device_transform = {xx = 1, yx = 0, xy = 0, yy = 1, x0 = 0, y0 = 0}, 
  device_transform_inverse = {xx = 1, yx = 0, xy = 0, yy = 1, x0 = 0, y0 = 0}, 
  x_resolution = 0, y_resolution = 0, x_fallback_resolution = 0, 
  y_fallback_resolution = 0, snapshot_of = 0x0, snapshot_detach = 0, 
  snapshots = {size = 0, num_elements = 0, element_size = 0, elements = 0x0, 
    is_snapshot = 0}, font_options = {antialias = CAIRO_ANTIALIAS_DEFAULT, 
    subpixel_order = CAIRO_SUBPIXEL_ORDER_DEFAULT, hint_style = 
    CAIRO_HINT_STYLE_DEFAULT, hint_metrics = CAIRO_HINT_METRICS_DEFAULT}}
Comment 8 Christophe Fergeau 2010-04-14 16:40:56 UTC
The surface is in CAIRO_STATUS_INVALID_SIZE state, so was probably created by _cairo_surface_create_in_error (cairo_status_t status) and is a pointer to    _cairo_surface_nil_invalid_format which is a constant defined by cairo.

_cairo_surface_set_error() tries to write to it and it segfaults because it's read-only (at least that's the only explanation I could find)

evolution is at fault for trying to do something using a surface in error state, but I think cairo tries to handle this kind of attempts as no-ops (instead of crashing).

openshot + cairo 1.9.x reliably reproduce "this" bug (that is, similar backtrace, and surface in exactly the same state), so I can do some testing if that's needed (see https://qa.mandriva.com/show_bug.cgi?id=57815). If I'm mistaken and these 2 bugs are different, then sorry for the noise :)
Comment 9 Benjamin Otte (Company) 2010-04-14 20:51:03 UTC
You are right.

The crash should be fixed in upstream http://cgit.freedesktop.org/cairo/commit/?id=005596907fc9b62fa4bf72ec35e0d1a1a242ef93 (1.9 branch, not sure if it applies without modifications to 1.8).

I'm leaving this open because I'm not sure if this hides a problem in gdk.
Comment 10 Akhil Laddha 2010-04-23 03:46:09 UTC
*** Bug 616563 has been marked as a duplicate of this bug. ***
Comment 11 Fabio Durán Verdugo 2010-04-25 01:50:56 UTC
*** Bug 616676 has been marked as a duplicate of this bug. ***
Comment 12 Milan Crha 2010-04-28 15:27:28 UTC
*** Bug 617086 has been marked as a duplicate of this bug. ***
Comment 13 Akhil Laddha 2010-05-05 15:07:54 UTC
*** Bug 617758 has been marked as a duplicate of this bug. ***
Comment 14 Fabio Durán Verdugo 2010-05-12 16:57:19 UTC
*** Bug 618465 has been marked as a duplicate of this bug. ***
Comment 15 Michael Meeks 2010-05-14 13:52:53 UTC
Running Evolution on MeeGo (gtk+ 2.20) for any length of time yields this exciting crasher (appended).

It looks very much as if we are missing a call to gdk_window_ensure_native somewhere - (perhaps around the canvas - no idea).

Presumably though, the code calling:

   gdk_window_move_resize_internal
to recompute_visible_regions_internal

that calls:

  if (private->cairo_surface)
    {
...
      _gdk_windowing_set_cairo_surface_size (private->cairo_surface,
					     width, height);

which calls:

void
_gdk_windowing_set_cairo_surface_size (cairo_surface_t *surface,
				       int width,
				       int height)
{
  cairo_xlib_surface_set_size (surface, width, height);
}

is the ultimate cause of the problem here.

Presumably we are missing some sort of:

gdk_window_ensure_native (window);

call at some level here (?).

trace:

  • #0 _cairo_surface_set_error
    at cairo-surface.c line 132
  • #1 _gdk_windowing_set_cairo_surface_size
    at gdkdrawable-x11.c line 1540
  • #2 recompute_visible_regions_internal
    at gdkwindow.c line 1086
  • #3 recompute_visible_regions
    at gdkwindow.c line 1114
  • #4 gdk_window_move_resize_internal
    at gdkwindow.c line 7356
  • #5 IA__gdk_window_move
    at gdkwindow.c line 7479
  • #6 gtk_layout_adjustment_changed
    at gtklayout.c line 1108
  • #7 IA__g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 77
  • #8 IA__g_closure_invoke
    at gclosure.c line 767
  • #9 signal_emit_unlocked_R
    at gsignal.c line 3248
  • #10 IA__g_signal_emit_valist
    at gsignal.c line 2981
  • #11 IA__g_signal_emit
    at gsignal.c line 3038
  • #12 IA__gtk_adjustment_value_changed
    at gtkadjustment.c line 668
  • #13 e_canvas_show_area
    at e-canvas-utils.c line 95
  • #14 show_area_timeout
    at e-canvas-utils.c line 168
  • #15 g_timeout_dispatch
    at gmain.c line 3396
  • #16 g_main_dispatch
    at gmain.c line 1960
  • #17 IA__g_main_context_dispatch
    at gmain.c line 2513
  • #18 g_main_context_iterate
    at gmain.c line 2591
  • #19 IA__g_main_loop_run
    at gmain.c line 2799
  • #20 IA__gtk_main
    at gtkmain.c line 1219
  • #21 main
    at main.c line 590
  • #1 _gdk_windowing_set_cairo_surface_size
    at gdkdrawable-x11.c line 1540
  • #2 recompute_visible_regions_internal
  • #3 recompute_visible_regions
  • #4 gdk_window_move_resize_internal
    at gdkwindow.c line 7356
$2 = 0x85c1000 [GdkWindow]
(gdb) p *$2
$3 = {parent_instance = {parent_instance = {g_type_instance = {g_class = 0x8052938}, ref_count = 2, qdata = 
    0x8ecf540}}, impl = 0x852ad90 [GdkWindowImplX11], parent = 0x85bef38 [GdkWindow], user_data = 0x84fd1f8, 
  x = 0, y = -13, extension_events = 0, filters = 0x0, children = 0x0, bg_color = {pixel = 15658220, red = 
    61166, green = 60652, blue = 60652}, bg_pixmap = 0x2, paint_stack = 0x0, update_area = 0x0, 
  update_freeze_count = 0, window_type = 2 '\002', depth = 24 '\030', resize_count = 0 '\000', state = 0, 
  guffaw_gravity = 0, input_only = 0, modal_hint = 0, composited = 0, destroyed = 0, accept_focus = 1, 
  focus_on_map = 1, shaped = 0, event_mask = 2162454, update_and_descendants_freeze_count = 0, redirect = 
    0x0, impl_window = 0x83c02a0 [GdkWindow], abs_x = 281, abs_y = 106, width = 714, height = 125183, 
  clip_tag = 2084, clip_region = 0x8958220, clip_region_with_children = 0x8945460, cursor = 0x0, 
  toplevel_window_type = -1 '\377', synthesize_crossing_event_queued = 0, effective_visibility = 1, 
  visibility = 1, native_visibility = 0, viewable = 1, applied_shape = 0, num_offscreen_children = 0, 
  implicit_paint = 0x0, input_window = 0x0, outstanding_moves = 0x0, shape = 0x0, input_shape = 0x0, 
  cairo_surface = 0x4cebed80, outstanding_surfaces = 0}

HTH.
Comment 16 Benjamin Otte (Company) 2010-05-14 14:06:44 UTC
Comment 8 outlines the problem pretty well already.

What you will likely find is that GDK is creating a 0x0 window somewhere. As that's an invalid size, an error surface is returned. And then GDK continues to use this as if it were a real surface, even though it's broken.

If you want to find the actual place where this happens, setting a breakpoint on _cairo_error() should help.
Comment 17 Fabio Durán Verdugo 2010-05-14 19:28:04 UTC
*** Bug 618658 has been marked as a duplicate of this bug. ***
Comment 18 Alexander Larsson 2010-05-17 07:33:27 UTC
Michael: You shouldn't really ever have to call gdk_window_ensure_native() to avoid a crash like that. As soon as you get the xid of the GdkWindow or otherwise do some native-only thing on it gdk will automatically convert it to native. gdk_window_ensure_native() is only needed when you rely on some native window semantics that gdk can't really know of (like some other app finding the window in the tree or something).

And, anyway, even for non-native windows private->cairo_surface is an xlib surface, it just points to a pixmap drawable rather than a window drawable.
Comment 19 Fabio Durán Verdugo 2010-05-22 03:47:19 UTC
*** Bug 619327 has been marked as a duplicate of this bug. ***
Comment 20 Matthew W. S. Bell 2010-05-23 02:59:50 UTC
The issue is that various cairo_*_create functions return pointers to static read-only surfaces with an error (that should be checked with cairo_surface_Status()).

The first patch indents gdkdrawable-x11.c incidentally.

The second adds/corrects error checking for the cairo functions. This stops things crashing, but does not address the reason for the functions failing. (In my case it seems to be because a cairo surface a large multiple of the screen height, and hits an internal limit).
Comment 21 Matthew W. S. Bell 2010-05-23 03:02:10 UTC
Created attachment 161753 [details] [review]
[PATCH 1/2] GNU-style indent for gdk/x11/gdkdrawable-x11.c
Comment 22 Matthew W. S. Bell 2010-05-23 03:03:10 UTC
Created attachment 161754 [details] [review]
[PATCH 2/2] Convert Cairo error object convention to NULL on error.
Comment 23 Matthew W. S. Bell 2010-05-23 03:07:59 UTC
That is, return pointers to static read-only surfaces instead of NULL on error.
Comment 24 Benjamin Otte (Company) 2010-05-23 11:28:50 UTC
That patch is completely unnecessary, because it works around the very well functioning error handling mechanism in Cairo - returning the error surfaces. And calling any Cairo function on an object in an error status is defined to be a no-op.

The idea behind this API design is of course to let the developer check errors when it is convenient to him instead of forcing him to check for errors all the time - note that even functions like cairo_pattern_add_color_stop_rgb() can put the pattern into an error state.
Comment 25 Matthew W. S. Bell 2010-05-23 15:45:46 UTC
Er, well, that's patently bollocks, because not checking the error and continuing to use the surface causes cairo to segv.
Comment 26 Benjamin Otte (Company) 2010-05-23 16:20:26 UTC
See comment 9: There was a bug in cairo that caused one single function to crash. That bug has been fixed since.
Comment 27 Matthew W. S. Bell 2010-05-23 17:15:35 UTC
That bug is not related to what I am seeing.
Comment 28 Matthew W. S. Bell 2010-05-23 17:29:58 UTC
On a slightly different note, as comment 9 does point out, even if cairo can carry on without the caller doing explicit error checking, is that even a sensible thing to do? Surely we'll want to know if things aren't getting rendered...
Comment 29 Benjamin Otte (Company) 2010-05-23 18:40:28 UTC
Yes, it is a sensible thing to do because it frees you of the burden to do error checking. You are free to do it whenever you want to.

Which is the reason why this bug is still open: We need to figure out why this problem happens in the first place.
Investigating where GTK tries to create a far too large window like you pointed out in comment 20 sounds like the approach we'd want to take.

That said, if you know a good place to check the error status and do something useful in that case, that'd be a very useful addition, too.
Comment 30 Akhil Laddha 2010-05-26 05:10:44 UTC
*** Bug 619013 has been marked as a duplicate of this bug. ***
Comment 31 Fabio Durán Verdugo 2010-05-28 03:03:29 UTC
*** Bug 619876 has been marked as a duplicate of this bug. ***
Comment 32 Akhil Laddha 2010-06-06 13:51:50 UTC
*** Bug 620707 has been marked as a duplicate of this bug. ***
Comment 33 Akhil Laddha 2010-06-11 03:50:54 UTC
*** Bug 621231 has been marked as a duplicate of this bug. ***
Comment 34 Fabio Durán Verdugo 2010-06-14 17:12:53 UTC
*** Bug 621569 has been marked as a duplicate of this bug. ***
Comment 35 Akhil Laddha 2010-06-21 04:49:41 UTC
*** Bug 622258 has been marked as a duplicate of this bug. ***
Comment 36 Benjamin Otte (Company) 2010-07-19 11:21:29 UTC
Created attachment 166153 [details] [review]
x11: Query size on real drawable

The X11 drawable does not have a clue about the real size of the
surface.

This might also be the cause for:
Comment 37 Akhil Laddha 2010-09-30 03:53:06 UTC
*** Bug 617275 has been marked as a duplicate of this bug. ***
Comment 38 Milan Crha 2010-09-30 14:41:24 UTC
*** Bug 616667 has been marked as a duplicate of this bug. ***
Comment 39 Akhil Laddha 2011-04-08 05:46:11 UTC
*** Bug 624081 has been marked as a duplicate of this bug. ***
Comment 40 Matthias Clasen 2014-12-22 18:17:33 UTC
Comment on attachment 166153 [details] [review]
x11: Query size on real drawable

the code has changed entirely in the meantime.
Comment 41 Matthias Clasen 2014-12-22 18:18:35 UTC
Lets assume this is fixed