! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
panel crashes when xmms plays a song
Status:
RESOLVED: REMIND
Severity:
critical
Product:
Xfce4-panel

Comments

Description bugzilla 2005-03-22 08:05:31 CET
When I begin to play a song in XMMS, my panel crashes. This does not happen 
when I pause/resume, but does happen whenever I stop & play as well as when I 
skip back or forward in the playlist.

Reproducible: Always
Steps to Reproduce:
1. Make sure panel is running
2. Play song in XMMS

Actual Results:  
Panel disappears

Expected Results:  
Not disappeared

I'm running gentoo 2.6.11, with xfce 4.2.0, gtk+ 2.6.2, and xmms 1.2.10.
Comment 1 Jasper Huijsmans editbugs 2005-03-22 17:58:07 CET
The only reason I can think of is that it is related to the xmms plugin. Do you
use that? If not, do you have it installed?
Comment 2 bugzilla 2005-03-22 19:45:58 CET
I'm using another computer right now that also has gentoo/xfce4/xmms on it, and 
the panel does not crash. So, I'm trying to discover what differences I can. 
They both have the exact same xfce4 packages installed, which do not include the 
xmms panel plugin. They both have the same version of xmms, though my stable 
computer has some extra xmms input plugins.

The only other related difference I can think of is that I use Madman on the 
buggy computer. So, I just installed Madman on my stable computer, and it stayed 
stable.

For what it's worth, I'm also having issues with Xine not working on the buggy 
computer, and trying to run Xine also crashes the panel. Since Xine is having 
its own issues, I was going to wait on that possible bug.

Anything else you know of that I should look at?
Comment 3 bugzilla 2005-03-23 04:32:09 CET
Ah, here's something informative. The following appears on my login terminal 
whenever the panel crashes:

** (xfce-panel:1005): WARNING **: alsa_cb
Comment 4 bugzilla 2005-03-23 04:40:20 CET
Removing the Volume Control plugin from the panel stops the crashing. I tried 
switching plugin settings, selecting various devices (default, #0: Sound 
Blaster Audigy), but that didn't help.
Comment 5 Jasper Huijsmans editbugs 2005-03-23 06:44:02 CET
Aha, yes, this is an alsa issue. Perhaps you use oss or oss emulation on the
'stable' computer? It seems that certain alsa components or as it now seems
alsa-using programs kill all programs holding alsa resources (like the olume
plugin). 

I think this may be a bug in alsa. Danny, adding you to the CC, what do you think?
Comment 6 dannym editbugs 2005-03-23 20:25:37 CET
oooh what do I read ?

Someone for which alsa_cb does get called !

come here :)

seriously though,
lib/vc_alsa.c
line 407
(function alsa_cb)

should read:

if (mycb) 
  (*mycb) (which, mydata);

then it should work

I will fix every imaginable cvs branch shortly :)
Comment 7 dannym editbugs 2005-03-23 20:27:52 CET
btw what sound card do you have ?
Comment 8 bugzilla 2005-03-23 20:53:08 CET
I've got a Sound Blaster Audigy, the original plain vanilla one.

And thanks!
Comment 9 dannym editbugs 2005-03-23 21:14:28 CET
I see 


I fixed cvs head and Tag Ixfce_4_2 now.

But I need someone whose alsa_cb is actually called to test.

Thanks :)
Comment 10 Tobias Andersen 2005-03-31 23:23:21 CEST
i have the exact same problem.

the panel dies each time xmms changes song.
running xfce4-panel from panel i can see:

** (xfce4-panel:16304): WARNING **: alsa_cb

Segmentation fault

too.

i have a Soundblaster Live! card (emu10k1 module).

i am also running gentoo, linux kernel v2.6.11.5 (plain, vanilla sources).

in XMMS, i've tried both the OSS Driver (libOSS.so, v1.2.10) output plugin
and ALSA v1.2.10 output plugin. it crashes in both cases.
( I dont know why I can use both, since i use ALSA, but im no expert :) )


Comment 11 dannym editbugs 2005-04-01 16:00:24 CEST
Tobias: did you try cvs xfce4-mixer ?

I should have fixed the problem, see above. If not, I'd be grateful if you ran

gdb xfce4-mixer

and run
and bt

Thank you
Comment 12 dannym editbugs 2005-04-01 16:01:54 CEST
Tobias:
btw you can use both oss and alsa with alsa because alsa supports oss emulation 
(snd-pcm-oss kernel module). Although the mixer controls for oss are kind of 
limited.

Comment 13 dannym editbugs 2005-04-02 12:01:35 CEST
*** Bug 885 has been marked as a duplicate of this bug. ***
Comment 14 dannym editbugs 2005-04-02 13:24:15 CEST
try changing the function to this:

static int alsa_cb(snd_mixer_t *ctl, unsigned int mask, snd_mixer_elem_t *elem)
{
        const char *which;
        g_warning ("alsa_cb\n");
        if (elem && snd_mixer_elem_get_type (elem) == SND_MIXER_ELEM_SIMPLE) {
                which = snd_mixer_selem_get_name (elem);
        } else {
                which = NULL;
        }

        if (mycb)
                (*mycb) (which, mydata);

        return 0;
}
Comment 15 Benjamin Weber 2005-04-02 13:45:13 CEST
I tried the short fix 
if (mycb) 
  (*mycb) (which, mydata);

by downloading vc_alsa.c from cvs and doing a manual ebuild install, swaping
this one file. Panel still crashes.
Comment 16 dannym editbugs 2005-04-02 16:43:13 CEST
seems to be an alsa bug, unless someone can tell me what is wrong with this:
http://ifurita.kicks-ass.net/testalsa/testalsa2.c
Comment 17 dannym editbugs 2005-04-02 17:06:33 CEST
using this:
http://ifurita.kicks-ass.net/testalsa/testalsa5.c

with this:
while true ; do xmms --play ; sleep 1 ; done

still crashes. No clue whats wrong.
Comment 18 dannym editbugs 2005-04-02 17:07:01 CEST
holey backtrace is http://ifurita.kicks-ass.net/testalsa/testalsa.log
Comment 19 dannym editbugs 2005-04-02 17:08:54 CEST
(alsa-lib 1.0.8 with gentooish patch:
  GNU nano 1.3.4          File: alsa-lib-mixer.patch                            

--- src/mixer/bag.c.old 2005-03-16 14:39:05.000000000 +0900
+++ src/mixer/bag.c     2005-03-16 14:39:26.000000000 +0900
@@ -59,6 +59,7 @@
                bag1_t *b = list_entry(pos, bag1_t, list);
                if (b->ptr == ptr) {
                        list_del(&b->list);
+                       free(b);
                        return 0;
                }
        }

)

Comment 20 Erik Ahlner 2005-04-04 08:15:09 CEST
I have the same problem.. the strangest thing is that this only begun 2 days 
ago. Before that, without upgrading anything (which i know of), i have never 
had xfce4-panel crashing on me. 
my setup: 
linux 2.6.10
alsadriver 1.0.8


Following the instructions from dannym i get the following result when playing 
in xmms (and any other application that uses alsa, for example using aplay to 
notify about new mail)

----------------------------------------

Starting program: /usr/bin/xfce4-panel
(no debugging symbols found)...(no debugging symbols found)...(no debugging 
symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging 
symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging 
symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging 
symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging 
symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging 
symbols found)...
(no debugging symbols found)...[Thread debugging using libthread_db enabled]
[New Thread -1219066176 (LWP 9938)]

(xfce4-panel:9938): Gdk-CRITICAL **: gdk_draw_rectangle: assertion `GDK_IS_GC 
(gc)' failed
bt
libcurl.so.2: cannot open shared object file: No such file or directory

** (xfce4-panel:9938): WARNING **: alsa_cb


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1219066176 (LWP 9938)]
0x14ec8300 in ?? ()
(gdb) bt
#0  0x14ec8300 in ?? ()
#1  0xb703a4d1 in snd_mixer_elem_empty () from /usr/lib/libasound.so.2
#2  0x00000003 in ?? ()
#3  0x0819da68 in ?? ()
#4  0x084ffa00 in ?? ()
#5  0x08180cb0 in ?? ()
Comment 21 Jasper Huijsmans editbugs 2005-04-08 09:52:14 CEST
Ok, danny, it's now officially your bug ;-)
Comment 22 dannym editbugs 2005-04-10 21:09:31 CEST
jasper: ok *scared* ... or rather, alsa's :)
Comment 23 dannym editbugs 2005-04-10 21:19:39 CEST
people, try using this:
http://ifurita.kicks-ass.net/testalsa/testalsa5.c

with this:
while true ; do xmms --play ; sleep 1 ; done
(need to have something in the playlist, obviously. If you dont have xmms, aplay 
probably suffices too. Don't use oss stuff, though! Just alsa output!)

should result in a pretty quick and reproducable crash for some people, and no 
crash at all (never) for everyone else. If it crashes, tell me data like:
a) kernel version
b) alsa-lib version
c) alsa-driver version (if not kernel alsa)
d) distribution
e) soundcard
f) alsa settings in /etc/asound.conf
g) if you have debugging symbols, a gdb backtrace of the crash. If not, 
nevermind. I know the other one :)

Thank you !

Note that this problem also manifests without using alsa callbacks myself (i.e. 
my first assumption that it just happens when registering a callback with alsa 
was wrong), so I would classify the bug as a major bug with the alsa project 
(after I got enough info).
Comment 24 dannym editbugs 2005-04-13 07:30:43 CEST
btw, bug #906 is something related to kde stuff and alsa 1.0.9, with the same 
symptoms and similar backtrace. I wonder...

Comment 25 Sami Samhuri 2005-04-26 23:20:49 CEST
I am also experiencing this bug. OS is gentoo (stable, KEYWORDS=x86),
alsa-lib-1.0.8, kernel 2.6.11-gentoo-r6, SB Audigy (emu10k1).

/etc/asound.state: http://web.uvic.ca/~sjs/asound.state
backtrace: http://web.uvic.ca/~sjs/xfce4-panel-bt

I am unable to compile testalsa5.c with the command `gcc -o testalsa
testalsa5.c`. What is the correct command to compile this test? gcc output is:

% gcc -o testalsa testalsa5.c                           
testalsa5.c:5:21: gtk/gtk.h: No such file or directory
testalsa5.c:113: error: syntax error before "timer_vc_cb"
testalsa5.c:113: error: syntax error before "data"
testalsa5.c: In function `timer_vc_cb':
testalsa5.c:120: error: `TRUE' undeclared (first use in this function)
testalsa5.c:120: error: (Each undeclared identifier is reported only once
testalsa5.c:120: error: for each function it appears in.)
testalsa5.c: In function `main':
testalsa5.c:132: error: `GSourceFunc' undeclared (first use in this function)
testalsa5.c:132: error: syntax error before "timer_vc_cb"
%
Comment 26 dannym editbugs 2005-04-27 09:17:35 CEST
gcc -o testalsa testalsa5.c $(pkg-config --cflags --libs gtk+-2.0) -lasound
Comment 27 Sami Samhuri 2005-05-02 00:03:25 CEST
Thanks Danny, it compiled. Using testalsa5.c and playing a file in XMMS (or even
just running Xfmedia) causes it to dump core. I think this is the same as bug
#875, if I have some time I hope to be able to track down at least the source of
the problem, even if I cannot fix it.
Comment 28 dannym editbugs 2005-05-02 02:18:00 CEST
I am pretty sure that this is a bug in alsa. Maybe submit a bugreport with alsa 
mentioning this bug, the test program, and the test procedure, and the result, 
so they can have a look at it.

Unless I'm doing something completely wrong in the test program (which i now 
checked 5 times and didnt find anything), the bug is with alsa (and only some 
versions of it, so be sure to include detailed version info)
Comment 29 Sami Samhuri 2005-05-02 10:23:55 CEST
See my comment in bug #875: http://bugzilla.xfce.org/show_bug.cgi?id=875#c13

I will attempt to use the latest kernel and alsa-lib to see if the problem is
still there. If it is still present then I will do my best to register on alsa's
bug tracker and see if they can help us out.

I find it very strange that xfmedia and xfce4-mixer experience this problem, but
both the alsa output plugin for XMMS and alsamixer do not. Perhaps if I have
time I could compare alsa calls in these programs to see how they differ.
Comment 30 dannym editbugs 2005-05-02 12:03:59 CEST
The problem is that the bug doesnt happen for me and I dont know how to provoke 
it. So "comparing" the source code would involve large analysis steps.

As an alternative, can you try ripping parts of testalsa5 out and see when the 
minimum situation is where it still happens? Thanks :)
Comment 31 Sami Samhuri 2005-05-05 04:41:45 CEST
I started my summer classes yesterday so I may not get to this right away, but I
will try and isolate the problem code relatively soon.
Comment 32 dannym editbugs 2005-09-10 14:04:35 CEST
Please do not forget to look at this and give me more info.

It does not happen to me and i'm fairly sure its a alsa-lib and/or gentoo alsa
patch bug that just happens to hit xfce4 mixer. 

I'm setting to remind until someone shed a light on this.

Bug #855

Reported by:
bugzilla
Reported on: 2005-03-22
Last modified on: 2010-11-20
Duplicates (1):
  • 885 panel crashes with warning: alsa_cb message

People

Assignee:
Nick Schermer
CC List:
2 users

Version

Attachments

Additional information