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 709602 - segfault on gdk_cairo_set_source_pixbuf() without gtk_init()
segfault on gdk_cairo_set_source_pixbuf() without gtk_init()
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Backend: X11
3.10.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-10-08 01:03 UTC by Sunjin Yang
Modified: 2014-08-03 15:51 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sunjin Yang 2013-10-08 01:03:14 UTC
My Clutter-based application  doesn't use GTK+ library, and crashes on gdk_cairo_set_source_pixbuf() after GTK+ is upgraded to 3.10.0 version in Arch Linux.

This bug is already fixed in GTK+ master branch:

  1959e36066908327aa8bfcb8112e31bed2986b5c gdkcairo: Split out a function
  b41787bc788d03aaf3dc3c734bc7e8161c1e713a gdkcairo: Don't require gtk_init() for set_source_pixbuf()
  7a9641b0f6c7ce8c76b9215a2b148df58cfbdaae testsuite: Add a test for functions that work without gtk_init()
  3d7e0f3eb1b64ae457a99b26fc8b833bdd621fb0 gdkcairo: Actually paint the pixbuf

Could you apply these patches to 3.10 stable branch?
Comment 1 Emmanuele Bassi (:ebassi) 2013-10-08 01:10:12 UTC
to be absolutely fair, though: you're using a GDK function without initializing GDK. there is no guarantee that GDK functions are free of side-effects and don't require initialization.

in short: don't do that.
Comment 2 Sunjin Yang 2013-10-08 01:21:27 UTC
(In reply to comment #1)
> to be absolutely fair, though: you're using a GDK function without initializing
> GDK. there is no guarantee that GDK functions are free of side-effects and
> don't require initialization.
> 
> in short: don't do that.

Thank you for your advice.

But I use only gdk_cairo_set_source_pixbuf() in GDK+ library for cairo drawing in 'draw' signal of ClutterCanvas, and all Clutter examples do the same thing. Should I call gdk_init_*()?

Anyway, it is just expected that patches in master branch should be merged to 3.10 stable branch.
Comment 3 Sunjin Yang 2013-10-08 01:28:04 UTC
(In reply to comment #2)
> 
> But I use only gdk_cairo_set_source_pixbuf() in GDK+ library for cairo drawing
> in 'draw' signal of ClutterCanvas, and all Clutter examples do the same thing.
> Should I call gdk_init_*()?

I means that Clutter examples use gdk_pixbuf_*() functions.