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 697851 - gnome-settings-daemon 3.8.0 crash on volume change notification
gnome-settings-daemon 3.8.0 crash on volume change notification
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: media-keys
3.8.x
Other Linux
: Normal major
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2013-04-12 05:42 UTC by Patrick Nicolas
Modified: 2013-04-12 11:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
media-keys: Fix crash when changing the volume (1.34 KB, patch)
2013-04-12 11:31 UTC, Bastien Nocera
committed Details | Review

Description Patrick Nicolas 2013-04-12 05:42:02 UTC
Hello,
when pressing volume up or volume down key, gnome-settings-daemon segfaults.

Backtrace is
Core was generated by `/usr/libexec/gnome-settings-daemon'.
Program terminated with signal 11, Segmentation fault.
  • #0 update_dialog
    at gsd-media-keys-manager.c line 1053
  • #0 update_dialog
    at gsd-media-keys-manager.c line 1053
  • #1 do_sound_action
    at gsd-media-keys-manager.c line 1248
  • #2 do_action
    at gsd-media-keys-manager.c line 1978
  • #3 on_accelerator_activated
    at gsd-media-keys-manager.c line 2128
  • #4 ffi_call_unix64
    from /usr/lib64/libffi.so.6
  • #5 ffi_call
    from /usr/lib64/libffi.so.6
  • #6 g_cclosure_marshal_generic
    from /usr/lib64/libgobject-2.0.so.0
  • #7 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #8 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #9 g_signal_emitv
    from /usr/lib64/libgobject-2.0.so.0
  • #10 shell_key_grabber_proxy_g_signal
    at shell-key-grabber.c line 1018
  • #11 ffi_call_unix64
    from /usr/lib64/libffi.so.6
  • #12 ffi_call
    from /usr/lib64/libffi.so.6
  • #13 g_cclosure_marshal_generic
    from /usr/lib64/libgobject-2.0.so.0
  • #14 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #15 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #16 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #17 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #18 ??
    from /usr/lib64/libgio-2.0.so.0
  • #19 ??
    from /usr/lib64/libgio-2.0.so.0
  • #20 g_main_context_dispatch
    from /usr/lib64/libglib-2.0.so.0
  • #21 ??
    from /usr/lib64/libglib-2.0.so.0
  • #22 g_main_loop_run
    from /usr/lib64/libglib-2.0.so.0
  • #23 gtk_main
    from /usr/lib64/libgtk-3.so.0
  • #24 main
    at main.c line 512

The error comes from "port" variable which is null:
(gdb) p port
$1 = (const GvcMixerStreamPort *) 0x0

in static void update_dialog, port is not checked:
        port = gvc_mixer_stream_get_port (stream);
        if (g_strcmp0 (gvc_mixer_stream_get_form_factor (stream), "internal") != 0 ||
            g_strcmp0 (port->port, "analog-output-speaker") != 0) {
Comment 1 David Henningsson 2013-04-12 11:26:23 UTC
It is valid for for a stream not to have a port, but unusual.

It could happen with network sinks, e g.
Comment 2 Bastien Nocera 2013-04-12 11:31:58 UTC
Created attachment 241342 [details] [review]
media-keys: Fix crash when changing the volume

For certain streams, we will have no port assigned, so don't
crash accessing the port's name.
Comment 3 Bastien Nocera 2013-04-12 11:35:53 UTC
Attachment 241342 [details] pushed as 45fd511 - media-keys: Fix crash when changing the volume
Comment 4 Bastien Nocera 2013-04-12 11:39:30 UTC
Fixed in gnome-3-8 and master