|Summary:||gtk_quit_add removed in GTK+ 3.0|
|Product:||libcanberra||Reporter:||Craig Keogh <cskeogh>|
|Component:||Unspecified||Assignee:||Lennart Poettering <lennart>|
|Status:||NEW ---||QA Contact:|
|Priority:||medium||CC:||a9016009, cskeogh, guillaume.desmottes, jjardon, pochu27|
|i915 platform:||i915 features:|
Patch that uses g_atexit instead
Description Craig Keogh 2011-01-04 20:50:04 UTC
gtk_quit_add removed in GTK+ 3.0 as per this GTK+ commit: http://git.gnome.org/browse/gtk+/commit/?id=7e7d8c4ccc5f269bc998dc59d8af4973fe567d1b libcanberra 0.26 uses it here: src/canberra-gtk-module.c:967: gtk_quit_add(1, quit_handler, NULL); Interestingly libcanberra 0.26 compiles fine, but when attempt to run gnome-session: gnome-session: symbol lookup error: /opt/gnome/lib64/gtk-3.0/modules/libcanberra-gtk-module.so: undefined symbol: gtk_quit_add Setting as blocker as prevents gnome-session running and subsequently blocks testing of GNOME 3.0. Adjust if I'm misinformed.
Comment 1 Vibha Yadav 2011-01-05 04:56:56 UTC
Created attachment 41663 [details] [review] Patch This is affecting Evolution - mail client too. It is not able to come up and throws warning as, /home/gtk3-branch/opt/gnome/bin/evolution: symbol lookup error: /home/gtk3-branch/opt/gnome/lib/gtk-3.0/modules/libcanberra-gtk-module.so: undefined symbol: gtk_quit_add Program exited with code 0177. I have removed the gtk_quit_add api call and then it seems evolution is working fine.
Comment 2 Craig Keogh 2011-01-11 14:30:32 UTC
GNOME 3.0 via JHBuild patches libcanberra as follows: http://git.gnome.org/browse/jhbuild/plain/patches/libcanberra-quit-add.patch Patch by Matthias Clasen.
Comment 3 Lennart Poettering 2011-01-13 10:11:23 UTC
Nah, that patch is not acceptable. We must be able to flush the sound event queue before we go down. If gtk_quit_add() got removed some replacement in glib or gtk must be used. As long as that doesn't exist this bug cannot be fixed properly and I will not merge this patch.
Comment 4 Rodrigo Moya 2011-01-17 08:56:26 UTC
Created attachment 42123 [details] [review] Patch that uses g_atexit instead
Comment 5 Lennart Poettering 2011-01-17 09:48:03 UTC
Unfortunately atexit() isn't really suitable either since it is not clear from which thread context and in which order it is called. While atexit() will work for this in the trivial cases, it won't in the general cases, since the code we execute during this shutdown routine is relying on some other libraries which must be initialized still but which is not guaranteed by atexit(). This shutdown code must be called from GLib/Gtk context in some way. And unless some gtk_quit_add()-like feature is readded into Glib or Gtk this cannot be fixed properly. GCC destructors/C++ static destructors are equally unusable for this.
Comment 6 Lennart Poettering 2011-01-17 10:02:47 UTC
I have now filed a bug against gtk3 about this: https://bugzilla.gnome.org/show_bug.cgi?id=639770
Comment 7 Lennart Poettering 2011-02-24 15:49:28 UTC
BTW lc .27 disable the gtk_quit_add(9 for now, but this does not actually fix the problem and event sounds will be eaten unless gtk3 is fixed.