GNOME Bugzilla – Bug 709602
segfault on gdk_cairo_set_source_pixbuf() without gtk_init()
Last modified: 2014-08-03 15:51:30 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?
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.
(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.
(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.