Bug 38918

Summary: Assertion failure in GIMP with cairo --enable-xlib-xcb
Product: cairo Reporter: ojab <ojab>
Component: xcb backendAssignee: Uli Schlachter <psychon>
Status: RESOLVED INVALID QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium    
Version: 1.10.3   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: gdb bt
gdb bt full

Description ojab 2011-07-02 11:42:50 UTC
Created attachment 48692 [details]
gdb bt

File -> Create -> Screenshot -> Snap ->
gimp-2.7: cairo-surface.c:1189: cairo_surface_mark_dirty_rectangle: Assertion `! _cairo_surface_has_snapshots (surface)' failed.

Reproducible with gimp git commit ab3fe10... (no crash with git master) & cairo-git master, no crash when cairo built without --enable-xlib-xcb.
Comment 1 ojab 2011-07-02 11:43:11 UTC
Created attachment 48694 [details]
gdb bt full
Comment 2 Uli Schlachter 2011-07-02 12:00:28 UTC
Since you mention that it works with gimp git master, I looked at the recent gimp commits. This is what I found:

http://git.gnome.org/browse/gimp/commit/?id=3efa2062c517e3365efc1f1f7a22a0016a85f35c
https://bugzilla.gnome.org/show_bug.cgi?id=650426

I'd say that this is indeed a gimp bug and the xlib backend just didn't cause a snapshot to be created.
Comment 3 Chris Wilson 2011-07-02 12:10:08 UTC
On the face of it, that's actually indicative of a bug in GIMP. It is either using cairo_surface_mark_dirty() when there is no need (it is not bypassing cairo and touching the surface directly), or it is bypassing cairo and has not called cairo_surface_flush().

The alternative, is of course, that the xlib-xcb hookup is not complete and the flush is not being propagated to the xcb surface...

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.