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 441641 - SIGSEGV in gnome-volume-control
SIGSEGV in gnome-volume-control
Status: RESOLVED FIXED
Product: gnome-media
Classification: Deprecated
Component: gnome-volume-control
2.18.x
Other All
: Normal critical
: ---
Assigned To: gnome media maintainers
gnome media maintainers
: 472187 475848 478213 488304 489081 491574 494147 498378 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-05-27 18:44 UTC by Fabien Tassin
Modified: 2008-06-01 18:46 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20



Description Fabien Tassin 2007-05-27 18:44:05 UTC
Steps to reproduce:
1. crash on startup
2. 
3. 


Stack trace:
Program received signal SIGSEGV, Segmentation fault.

Thread NaN (LWP 1301)

  • #0 strcmp
    from /lib/tls/i686/cmov/libc.so.6
  • #1 gnome_volume_control_track_add_option
    at track.c line 471
  • #2 gnome_volume_control_element_change
    at element.c line 306
  • #3 gnome_volume_control_element_new
    at element.c line 111
  • #4 gnome_volume_control_window_new
    at window.c line 243
  • #5 main
    at main.c line 206
  • #1 gnome_volume_control_track_add_option
    at track.c line 471
$1 = (const gchar *) 0x0    <======== bingo
(gdb) p opt->data
$2 = (gpointer) 0x8191728
(gdb) p {char[10]}opt->data
$3 = "Mic\000�020\031\b1"
(gdb) l
466       /* optionmenu */
467       active_opt = gst_mixer_get_option (mixer, GST_MIXER_OPTIONS (track));
468       ctrl->options = gtk_combo_box_new_text ();
469       for (opt = options->values; opt != NULL; opt = opt->next, i++) {
470         gtk_combo_box_append_text (GTK_COMBO_BOX (ctrl->options), opt->data);
471         if (!strcmp (active_opt, opt->data)) {
472           gtk_combo_box_set_active (GTK_COMBO_BOX (ctrl->options), i);
473         }
474       }
475
(gdb) p track
$4 = (GstMixerTrack *) 0x8079110
(gdb) p *track
$5 = {parent = {g_type_instance = {g_class = 0x8166d18}, ref_count = 2, qdata = 0x0}, label = 0x81910e8 "Input Source", flags = 0, num_channels = 0, min_volume = 0, max_volume = 0}
(gdb) p mixer
$6 = (GstMixer *) 0x815c070
(gdb) p *mixer
$7 = <incomplete type>

Other information:
This is with:
gnome-media-2.18.0+svn3629-20070527
gstreamer0.10-0.10.12.1+cvs20070524
gst-plugins-base0.10-0.10.12.1+cvs20070524
using gnome 2.19.2.
Comment 1 Tim-Philipp Müller 2007-05-27 20:48:02 UTC
Could you please try with a current gst-plugins-base from CVS to make sure this isn't due to some alsamixer/GstMixer changes that were reverted again?
Comment 2 Fabien Tassin 2007-05-27 20:59:05 UTC
see my original "Other information". It was both with gnome-media SVN and gst CVS  (everything, core, base, ugly, bad).
Comment 3 Tim-Philipp Müller 2007-05-27 21:52:21 UTC
(In reply to comment #2)
> see my original "Other information". It was both with gnome-media SVN and gst
> CVS  (everything, core, base, ugly, bad).

It says 'gst-plugins-base0.10-0.10.12.1+cvs20070524'. The changes I was talking about were reverted on 25-05-2007.
Comment 4 Fabien Tassin 2007-05-27 22:02:06 UTC
oh, I see. Let me retry with the freshest thing possible. I'll update the case.
Comment 5 Fabien Tassin 2007-05-28 00:58:30 UTC
Plain gnome-media 2.18.0 with CVS 20070528 of both gstreamer and gst-plugins-base:
gnome-volume-control crashes as described.

Same thing with gnome-media 2.18.0+svn3629-20070528.

I don't why it should be better as this part of the code is identical.
strcmp(NULL, foo) will always die.

--- gst-mixer/src/track.c.orig  2007-05-28 02:44:55.000000000 +0200
+++ gst-mixer/src/track.c       2007-05-28 02:54:25.000000000 +0200
@@ -469,5 +469,5 @@
   for (opt = options->values; opt != NULL; opt = opt->next, i++) {
     gtk_combo_box_append_text (GTK_COMBO_BOX (ctrl->options), opt->data);
-    if (!strcmp (active_opt, opt->data)) {
+    if (active_opt != NULL && !strcmp (active_opt, opt->data)) {
       gtk_combo_box_set_active (GTK_COMBO_BOX (ctrl->options), i);
     }


this is the minium workaround. I don't know why gst_mixer_get_option() returns NULL but at least it avoids the crash.
Comment 6 Ronald Bultje 2007-05-28 12:12:59 UTC
It looks like no option is active, which looks like an alsa bug. I don't mind the workaround, but it _is_ an alsa bug that should be reported upstream for advice on what to do on the long run. tim, can you take care of that?
Comment 7 Marc-Andre Lureau 2007-08-31 21:12:07 UTC
*** Bug 472187 has been marked as a duplicate of this bug. ***
Comment 8 Susana 2007-09-15 12:06:16 UTC
*** Bug 475848 has been marked as a duplicate of this bug. ***
Comment 9 Diego Escalante Urrelo (not reading bugmail) 2007-09-19 06:59:33 UTC
*** Bug 478213 has been marked as a duplicate of this bug. ***
Comment 10 André Klapper 2007-10-20 16:15:29 UTC
*** Bug 488304 has been marked as a duplicate of this bug. ***
Comment 11 Marc-Andre Lureau 2007-10-27 17:38:13 UTC
*** Bug 489081 has been marked as a duplicate of this bug. ***
Comment 12 palfrey 2007-10-30 11:32:40 UTC
*** Bug 491574 has been marked as a duplicate of this bug. ***
Comment 13 palfrey 2007-11-20 19:42:32 UTC
*** Bug 498378 has been marked as a duplicate of this bug. ***
Comment 14 Marc-Andre Lureau 2008-01-19 19:27:59 UTC
*** Bug 494147 has been marked as a duplicate of this bug. ***
Comment 15 Marc-Andre Lureau 2008-05-28 13:25:49 UTC
(In reply to comment #5)
> --- gst-mixer/src/track.c.orig  2007-05-28 02:44:55.000000000 +0200
> +++ gst-mixer/src/track.c       2007-05-28 02:54:25.000000000 +0200
> @@ -469,5 +469,5 @@
>    for (opt = options->values; opt != NULL; opt = opt->next, i++) {
>      gtk_combo_box_append_text (GTK_COMBO_BOX (ctrl->options), opt->data);
> -    if (!strcmp (active_opt, opt->data)) {
> +    if (active_opt != NULL && !strcmp (active_opt, opt->data)) {
>        gtk_combo_box_set_active (GTK_COMBO_BOX (ctrl->options), i);
>      }
> 

I am going to apply this patch.

I guess we should close this bug after, and hope that somebody reported it in ALSA :)
Comment 16 Marc-Andre Lureau 2008-06-01 18:46:45 UTC
I start to convert potentially unsafe strcmp starting from r3870.