GNOME Bugzilla – Bug 441641
SIGSEGV in gnome-volume-control
Last modified: 2008-06-01 18:46:45 UTC
Steps to reproduce: 1. crash on startup 2. 3. Stack trace: Program received signal SIGSEGV, Segmentation fault.
+ Trace 136313
Thread NaN (LWP 1301)
$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.
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?
see my original "Other information". It was both with gnome-media SVN and gst CVS (everything, core, base, ugly, bad).
(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.
oh, I see. Let me retry with the freshest thing possible. I'll update the case.
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.
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?
*** Bug 472187 has been marked as a duplicate of this bug. ***
*** Bug 475848 has been marked as a duplicate of this bug. ***
*** Bug 478213 has been marked as a duplicate of this bug. ***
*** Bug 488304 has been marked as a duplicate of this bug. ***
*** Bug 489081 has been marked as a duplicate of this bug. ***
*** Bug 491574 has been marked as a duplicate of this bug. ***
*** Bug 498378 has been marked as a duplicate of this bug. ***
*** Bug 494147 has been marked as a duplicate of this bug. ***
(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 :)
I start to convert potentially unsafe strcmp starting from r3870.