amaroK crashing

Help with creation, editing, or playback of sounds, images, or video. Amarok, audacious, mplayer, grip, cdparanoia and anything else that makes a sound or plays a video.
Post Reply
User avatar
nitro322
l33t
l33t
Posts: 605
Joined: Wed Jul 24, 2002 2:06 am
Location: USA
Contact:

amaroK crashing

Post by nitro322 »

I have a problem with amaroK crashing. This happens during song changes, though it seems random as to when it actually crashes. Eg, it may crash after only playing 2 songs, or it may not crash until after 20. When I run amarok from the command line, I always get this error message when it crashes:

amarokapp: pcm.c:938: snd_pcm_state: Assertion `pcm' failed.

Has anyone ever seen that before? I tried search Google, but couldn't find anything useful. Any help would really be appreciated.

I'm currently running amaroK 1.4.1-r2, using the MySQL database backend. I've also tried 1.3.8, 1.3.9, and 1.4.0, but I have crashing issues with all of them.
markey
n00b
n00b
Posts: 32
Joined: Mon Sep 12, 2005 12:08 pm

Post by markey »

Looks like an ALSA issue. Try upgrading ALSA and xine-lib.

Also disable crossfading in Amarok, and kill all running sound servers (artsd and friends). Possibly your dmix isn't working right.
Mark Kretschmann -- Amarok developer
User avatar
nitro322
l33t
l33t
Posts: 605
Joined: Wed Jul 24, 2002 2:06 am
Location: USA
Contact:

Post by nitro322 »

Thanks for the suggestions, markey. I tried rebuilding xine-lib (1.1.2-r2 is the only version in portage, so nothing to upgrade to), but no luck. I could not upgrade ALSA because I'm running the kernel version. I've tried to run the standalone version numerous times in the past and have always had trouble with it, so I'd prefer to stick to something halfway stable for now.

Crossfading was already disabled, and I do not run any sound servers (I use KDE, but have everything setup to use ALSA directly).

I'm not sure what you mean by dmix. I'd be happy to look into it, though. What do I need to check?
User avatar
nitro322
l33t
l33t
Posts: 605
Joined: Wed Jul 24, 2002 2:06 am
Location: USA
Contact:

Post by nitro322 »

Does anyone else have any suggestions? Has anyone even seen this error message before? I'm still having the same issue, and ran out of ideas to fix it long ago. :-)

Any suggestions would be most welcome. Thanks.
User avatar
nitro322
l33t
l33t
Posts: 605
Joined: Wed Jul 24, 2002 2:06 am
Location: USA
Contact:

Post by nitro322 »

Ok, how about changing directions here... Since this crash always occurs during a song change, perhaps it's trying to play an invalid file. If I can determine which file it's about to start playing when it crashes, maybe I can figure something out by investigating that file.

The problem, though, is that I need amaroK to print out the track name it's about to start playing before it actually begins playing. Does anyone know how I can do this? Is it possible to tell amaroK to log this information? Is it possible to have it display this information on the command line somehow?

Again, any suggestions would be much appreciated. Thanks.
User avatar
Flameeyes
Retired Dev
Retired Dev
Posts: 189
Joined: Wed Mar 30, 2005 3:22 pm
Location: London, Europe
Contact:

Post by Flameeyes »

The crash (that's not much of a crash but rather a failed assertion) is from inside alsa-lib. Which version of alsa-lib are you using? Which version of the kernel drivers (cat /proc/asound/version)? If they are misaligned, it might be that.

Another problem might be if ALSA cannot access your soundcard hardware, if it's using hardware mixing for instance (VIA82Cxxx cards have, for instance, a 4-way hardware mixing.. but often you use more than 4 acquired streams).

If you have an asound.conf, please tell me and copy-paste here if it's not too long.

I would suggest to use external driver anyway, if you have any kind of trouble with that, it's usually simpler to diagnose than the in-kernel drivers problems.
You want to know what I'm working on right now? Just follow my blog.
User avatar
Flameeyes
Retired Dev
Retired Dev
Posts: 189
Joined: Wed Mar 30, 2005 3:22 pm
Location: London, Europe
Contact:

Post by Flameeyes »

Oh forgot to say, try to follow the backtraces guide to see where the problem happens, so that I can try to dig the code and find which assertion fails and why :)

If you try 1.0.13_rc1, make sure you enable the debug useflag, or the assertions will be disabled so it won't crash but might behave strangely.
[/url]
You want to know what I'm working on right now? Just follow my blog.
User avatar
nitro322
l33t
l33t
Posts: 605
Joined: Wed Jul 24, 2002 2:06 am
Location: USA
Contact:

Post by nitro322 »

Thanks, for the response, flameeyes. I don't currently have access to this particular box, but I should tomorrow. I'll post the results of your suggestions as soon as I can.
User avatar
nitro322
l33t
l33t
Posts: 605
Joined: Wed Jul 24, 2002 2:06 am
Location: USA
Contact:

Post by nitro322 »

Ok, to answer the questions in your first post.

kernel version info:

Code: Select all

$ uname -a
Linux dogzilla 2.6.17-gentoo-r4 #1 SMP PREEMPT Thu Aug 10 18:52:53 CDT 2006 i686 AMD Athlon(tm) MP 2400+ GNU/Linux
$ cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.11rc4 (Wed Mar 22 10:27:24 2006 UTC).
ALSA version info:

Code: Select all

$ esearch -cI alsa
[ I] media-libs/alsa-lib (1.0.11-r1):  Advanced Linux Sound Architecture Library
[ I] media-plugins/xmms-alsa (1.2.10-r2):  Xmms Plugin: xmms-alsa
[ I] media-sound/alsa-headers (1.0.11):  Header files for Advanced Linux Sound Architecture kernel modules
[ I] media-sound/alsa-utils (1.0.11):  Advanced Linux Sound Architecture Utils (alsactl, alsamixer, etc.)
I can't necessarily rule out the hardware mixing issue, but I think it's unlikely. I have an Audigy2, so it should be able to handle just about as many simultaneous streams as I can through at it. :) Also, I've never head this issue with XMMS, or any other application that plays audio, only amaroK.

I don't have an asound.conf, but I do have a .asoundrc, if that's what you mean. I use it to setup proper 5.1 mixing:

Code: Select all

$ cat ../.asoundrc
pcm.proper51 {
    type route
    slave.pcm surround51
    slave.channels 6
    ttable.0.0 1
    ttable.1.4 1
    ttable.2.1 1
    ttable.3.2 1
    ttable.4.3 1
    ttable.5.5 1
}
I also have /etc/asound.state, but I'm assuming you don't want that. If you think it'll help, though, I'll be happy to post it as well.

Any ideas? :)

Also, as I stated above, I've had bad experience trying to run the standalone version of ALSA, so if possible I'd prefer to use the kernel driver, as it seems to simply work (in general) much more reliably for me. Of course, I'd certainly be willing to give it another try for testing. Just let me know.

I'll also work on getting the backtraces information to you. I've already enabled bugging for amaroK, but it didn't tell me anything useful. Of course, that was before you pointed out that the error was coming from alsa-lib.
User avatar
Flameeyes
Retired Dev
Retired Dev
Posts: 189
Joined: Wed Mar 30, 2005 3:22 pm
Location: London, Europe
Contact:

Post by Flameeyes »

With an Audigy, it should just use hardware mixing and be done with that, so it's not the case at all.

If you can, I'd ask you to try the alsa-driver drivers. And knowing the past with audigy and similar cards, it's better if you do a revdep-rebuild --soname libasound.so.2 to rebuild everything linked to alsa, it might have changed ABI in the mean time.
You want to know what I'm working on right now? Just follow my blog.
User avatar
nitro322
l33t
l33t
Posts: 605
Joined: Wed Jul 24, 2002 2:06 am
Location: USA
Contact:

Post by nitro322 »

I just upgraded to alsa-driver, using version 1.0.12, and I actually have sound. Off to a good start, at least. :)

It'll take some time before I can determine whether or not this resolves amaroK issue. As I said previously, it crashes on a seemingly random basis, so I'll just need to let it play for a while and see what it does.

I'll report back in a couple days. Thanks for the suggestions, Diego.
Post Reply