Can't start FretsOnFire - pygame.error: No available audio device

Bug #250334 reported by komputes
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
fretsonfire (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Binary package hint: fretsonfire

Using Ubuntu 8.04.1 with kernel v. 2.6.24-19-generic, I tried downloading Frets On Fire (package fretsonfire 1.2.451.dfsg-2 in universe repo) and FretsOnFire-1.2.512 from sourceforge.net. Running either one from the terminal gives me the following error:

$ fretsonfire
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
Traceback (most recent call last):
  File "./FretsOnFire.py", line 64, in <module>
    engine = GameEngine(config)
  File "/usr/share/games/fretsonfire/game/GameEngine.py", line 149, in __init__
    self.audio.open(frequency = frequency, bits = bits, stereo = stereo, bufferSize = bufferSize)
  File "/usr/share/games/fretsonfire/game/Audio.py", line 49, in open
    pygame.mixer.init()
pygame.error: No available audio device

I have checked my audio devices and they work properly with Audio/Video files. I do not know much about this package other than it's a game like Guitar Hero.

Revision history for this message
komputes (komputes) wrote :

The game seems to start in both Gutsy and Intrepid (Alpha 2) but not Hardy. I couldn't use it properly in Intrepid since I don't have sound yet, but in Gutsy it plays ok.

I am not sure because it's the first time I use it but shouldn't the music be playing in the background even if I don't press the keys? In Gutsy, it will only play the music if I get the keys right (a little different from when I played GH). I'm not sure if this second issue is a bug?

Revision history for this message
Hew (hew) wrote :

Fretsonfire 1.2.512.dfsg-3 is now in Intrepid. Could you please test if the problem still exists in this latest version? Note that as long as the issue is fixed in Intrepid, the issue is fixed. Thanks in advance.

With respect to the music going quiet when you miss notes, this is intentional. I believe it's also a setting you can change if you like.

Changed in fretsonfire:
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Hew (hew) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!

Changed in fretsonfire:
status: Incomplete → Invalid
Revision history for this message
komputes (komputes) wrote :

This is fine. It seems that I am no longer experiencing this particular issue.

Revision history for this message
Amit Soni (amitsoni) wrote :

I am experiencing the same problem.

Changed in fretsonfire:
status: Invalid → New
Revision history for this message
Hew (hew) wrote :

amitnu: Do you get this problem with fretsonfire 1.2.512.dfsg-3 on Intrepid? If so, please attach a log of your traceback.

Changed in fretsonfire:
status: New → Incomplete
Revision history for this message
Amit Soni (amitsoni) wrote :

I am trying version 1.2.512 on hardy. How to get the log of traceback.

Revision history for this message
Hew (hew) wrote :

That version doesn't exist for Hardy. You will need to test with Intrepid. You should be able to do this with an Intrepid LiveCD. If you cannot test with a development version of Intrepid, you can test once Intrepid is released.

You can run fretsonfire with the following command, which will save the output in a file called fretsonfire.log :

fretsonfire >& fretsonfire.log

Revision history for this message
Amit Soni (amitsoni) wrote :

So does it mean that I can't run this on hardy or I have to run some other version of it on hardy.
BTW the log file says the following:

ALSA lib pcm_dmix.c:996:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:996:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:996:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:996:(snd_pcm_dmix_open) unable to open slave
Traceback (most recent call last):
  File "/home/skyostil/src/cx_Freeze-3.0.3/initscripts/Console.py", line 27, in ?
  File "src/FretsOnFire.py", line 68, in ?
  File "src/GameEngine.py", line 149, in __init__
  File "src/Audio.py", line 49, in open
pygame.error: No available audio device

Revision history for this message
Hew (hew) wrote :

The latest version of fretsonfire is 1.2.512.dfsg-3, and this version is only available on Intrepid. It is not available on Hardy. In order to test this version, you will need to use fretsonfire on Intrepid. You should be able to test either with a proper Intrepid installation, or simply by trying the LiveCD.

I accept that you are experiencing this problem on Hardy. However, as a new version is available with Intrepid, it is important that you test with this latest version in case the problem has been fixed. I am using Intrepid, and fretsonfire works fine for me.

Revision history for this message
Amit Soni (amitsoni) wrote :

I am now on Interpid(beta). Not able to run FoF. Following is the error log.

Traceback (most recent call last):
  File "/home/skyostil/src/cx_Freeze-3.0.3/initscripts/Console.py", line 27, in ?
  File "src/FretsOnFire.py", line 68, in ?
  File "src/GameEngine.py", line 149, in __init__
  File "src/Audio.py", line 49, in open
pygame.error: No available audio device

The line "ALSA lib pcm_dmix.c:996:(snd_pcm_dmix_open) unable to open slave" has disappeared, as you would have seen. Please help me in this regard. I hate going to XP to play this game. Thank you.

Revision history for this message
Hew (hew) wrote :

Thanks for your effort with testing, the pygame.error problem is still there. It looks like fretsonfire crashes when it cannot detect an audio device. It should instead load the game and display a helpful message. I have marked this bug as triaged.

Does sound work in the rest of your system? Please test with System -> Preferences -> Sound, in particular, the ALSA and Pulseaudio settings. You may want to try starting fretsonfire with ALSA and Pulseaudio to see if it works with one but not the other.

Changed in fretsonfire:
status: Incomplete → Triaged
Revision history for this message
Amit Soni (amitsoni) wrote :

Actually, I had some problems regarding sounds just after installing Intrepid. But currently my system sound is perfect, thanks to the post: "http://ubuntuforums.org/showthread.php?t=866965". Sound playback in Auto detect mode.

BTW, how do we start FoF with ALSA and Pulseaudio particularly. Thanks anyway.

Revision history for this message
Hew (hew) wrote :

Setting the system to ALSA or Pulseaudio is done with System -> Preferences -> Sound. Please answer each of these questions:

1) Change "Sound Events" and "Music and Movies" to "Pulseaudio". Press Test. Does the sound play?
2) Load fretsonfire. Does it work, or does the same crash occur?
3) Change "Sound Events" and "Music and Movies" to "ALSA". Press Test. Does the sound play?
4) Load fretsonfire. Does it work, or does the same crash occur?

Thanks again.

Revision history for this message
Amit Soni (amitsoni) wrote :

I am totally messed. Following are the results.

1) Change "Sound Events" and "Music and Movies" to "Pulseaudio". Press Test. Does the sound play?
-- Changed to "Pulseaudio". Restarted Pulseaudio using- "pulseaudio -k; pulseaudio". But test sound won't play.

2) Load fretsonfire. Does it work, or does the same crash occur?
-- fretsonfire won't load. Restarted pulseaudio, fretsonfire loaded. First a black screen comes then the brown one. I can hear the background music of fretsonfire. Yes, I can hear instead of the failed test (But any other sound file won't play on this configuration). At this time my computer is totally hanged, hanged like hell. I can't do anything (anything) on that tty7. I went to tty1 and used "Alt+Printscreen+REISUB" to reboot my computer.

3) Change "Sound Events" and "Music and Movies" to "ALSA". Press Test. Does the sound play?
-- Killed Pulseaudio. Changed to "ALSA". Test sounds plays.

4) Load fretsonfire. Does it work, or does the same crash occur?
-- fretsonfire loaded. First a black screen comes then the brown one. I "cannot" hear the background music of fretsonfire. But other sound file plays fine on this configuration. This time also my computer is totally hanged, hanged like hell. I can't do anything on that tty7. I went to tty1 to reboot my computer.

I tried to log the output when I ran FretsonFire second time as: ./FretsOnFire 2>log; but the log file was empty.

Revision history for this message
Hew (hew) wrote :

Your testing confirms that your sound issues are not specific to fretsonfire. Please seek support for your issue in Launchpad Answers, the Ubuntu Forums or #ubuntu. If you believe your problem is a bug, please report a bug against linux and follow the steps at https://wiki.ubuntu.com/DebuggingSoundProblems .

This fretsonfire bug is still valid as a missing sound device should not cause the program to crash.

Revision history for this message
Daniel Bonniot de Ruisselet (bonniot-users) wrote :

I tried changing "Sound Events" and "Music and Movies" to both pulseaudio and alsa. Both worked with the test (and my sound system generally works). However in all cases I get the same trace:

Traceback (most recent call last):
  File "./FretsOnFire.py", line 68, in <module>
    engine = GameEngine(config)
  File "/usr/share/games/fretsonfire/game/GameEngine.py", line 149, in __init__
    self.audio.open(frequency = frequency, bits = bits, stereo = stereo, bufferSize = bufferSize)
  File "/usr/share/games/fretsonfire/game/Audio.py", line 49, in open
    pygame.mixer.init()
pygame.error: No available audio device

Using version 1.2.512.dfsg-3 on updated Intrepid.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.