pulling an external soundcard out from under ALSA hangs mixxx

Bug #364803 reported by Nick
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Mixxx
Triaged
Critical
Unassigned

Bug Description

I got an external soundcard and told Mixxx to use it for headphone cueing. Then I pulled the soundcard and Mixxx kept playing. Then I went into the prefs and saw that the soundcard was still listed there. I clicked "Ok" and the UI froze and mixxx got stuck in a loop of this:

Expression 'AlsaStop( stream, 0 )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2373
Expression 'AlsaRestart( self )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2415
Expression 'PaAlsaStream_HandleXrun( self )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2952
Expression 'snd_pcm_drop( stream->playback.pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2181
Expression 'AlsaStop( stream, 0 )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2373
Expression 'AlsaRestart( self )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2415
Expression 'PaAlsaStream_HandleXrun( self )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2952
Expression 'snd_pcm_drop( stream->playback.pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2181
Expression 'AlsaStop( stream, 0 )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2373
Expression 'AlsaRestart( self )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2415
Expression 'PaAlsaStream_HandleXrun( self )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2952
Expression 'snd_pcm_drop( stream->playback.pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2181
Expression 'AlsaStop( stream, 0 )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2373
Expression 'AlsaRestart( self )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2415
Expression 'PaAlsaStream_HandleXrun( self )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2952

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Probably still an issue. Can somebody test?

Changed in mixxx:
status: New → Confirmed
Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

As of trunk r2648, it's much improved. While the console shows the same messages, it only does so once, but the output still just stutters. The GUI remains responsive however and if you go into the sound prefs and hit Query Devices, the output goes quiet and all selected devices change to "None." If you then select one and click OK, Mixxx resumes playback.

So ideally, we'd need to somehow auto-detect a missing sound device and on detection, automatically re-query devices, selecting "None" for the now-missing one and leaving the others as they were.

Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

Update: what I said above applies when the removed device is the master output. If it's the headphone one, the master one continues playing! Still, we should detect and recover from unplugged devices otherwise the prefs pane is no longer accurate.

RJ Skerry-Ryan (rryan)
Changed in mixxx:
importance: Undecided → Critical
tags: added: crsah
tags: added: crash
removed: crsah
Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

I'm marking this Fix Committed since Mixxx no longer hangs when you remove an external sound card on-the-fly. It could more gracefully handle the situation, but that's another, much-lower-priority bug.

Changed in mixxx:
status: Confirmed → Fix Committed
Revision history for this message
RAWRR (rawrr) wrote :

Re-validated in the newest windows version.

Changed in mixxx:
status: Fix Committed → Confirmed
Revision history for this message
RAWRR (rawrr) wrote :

The night before last at the end of my set while the last song was playing I pulled my external headphone soundcard to put it away and Mixxx totally hung, just stopped. It started again when I plugged it back in. I was using 1.11 beta2 pre 3314 build and the ASIO driver.

This bug still exists.

Revision history for this message
tomtom (thomas-8) wrote :

Bug exists also on last 1.11-pre (20.03.2013) Tested with USB-Microphone on Linux Mint.

Revision history for this message
Jonathan Bastnagel (jonthebagel) wrote :

I've also had this issue, however, it seems to occur when I'm assigning Inputs for the Digital Vinyl Control.

information type: Public → Public Security
jus (jus)
information type: Public Security → Public
Revision history for this message
Tuukka Pasanen (pasanen-tuukka) wrote :

Can this be ALSA-Pulseaudio-Portaudio brigde thing?

danger zack (dangerzack)
Changed in mixxx:
status: Confirmed → Fix Released
Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

We're going to need developer confirmation before we mark this fixed.

Changed in mixxx:
status: Fix Released → Confirmed
Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

On what OS did you test and with which sound card, @danger zack?

danger zack (dangerzack)
Changed in mixxx:
status: Confirmed → Fix Released
jus (jus)
Changed in mixxx:
status: Fix Released → Confirmed
Revision history for this message
Daniel Schürmann (daschuer) wrote :
tags: added: portaudio
Changed in mixxx:
status: Confirmed → Triaged
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/5146

lock status: Metadata changes locked and limited to project staff
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.