ALSA stack backtrace when using pygame


5 posts
by maccladd » Wed May 30, 2012 6:20 pm
I'm playing around with python and pygame with the kids (OK, mainly by myself...) and I've included some basic pygame screen init in a program and I get an ALSA stack backtrace and the program crashes. The stack trace doesn't end up in my program. Is pygame trying to do something with the sound subsystem and bombing out?...
Posts: 3
Joined: Wed May 30, 2012 6:11 pm
by hexelpdkk » Wed May 30, 2012 7:22 pm
I think you might need to install the sound kernel module before pygame (and sdl) initialise. I remeber having this issue, even though my pygame based program has no sound in it. Just do the following:

Code: Select all
sudo modprobe snd_bcm2835
User avatar
Posts: 128
Joined: Fri Feb 24, 2012 4:40 pm
by maccladd » Wed May 30, 2012 9:05 pm
OK, I enabled the ALSA driver as described, and I now get a different error message when I run my program:
open /dev/sequencer or /dev/snd/seq: Permission denied

My program still works though.
Posts: 3
Joined: Wed May 30, 2012 6:11 pm
by Gibble » Wed May 30, 2012 10:35 pm
I ended up running stuff as sudo to get around a similar problem. Not ideal I know, and needs a better fix, but thought I'd mention it.
Posts: 56
Joined: Wed May 09, 2012 9:52 am
by maccladd » Thu May 31, 2012 8:52 am
Yeah, I was thinking of running python under sudo, but that doesn't seem right. Just a matter of someone sorting out the correct access rights. It's just a niggle now since it only seems to crash the python interactive mode in SDE, doesn't stop the pygame screen processing and the game still runs now.
Posts: 3
Joined: Wed May 30, 2012 6:11 pm