pulling an external soundcard out from under ALSA hangs mixxx

Bug #364803 reported by Nick on 2009-04-21
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Mixxx
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

RJ Ryan (rryan) wrote :

Probably still an issue. Can somebody test?

Changed in mixxx:
status: New → Confirmed

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.

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 Ryan (rryan) on 2011-10-05
Changed in mixxx:
importance: Undecided → Critical
tags: added: crsah
tags: added: crash
removed: crsah

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
RAWRR (rraawwrrrr) wrote :

Re-validated in the newest windows version.

Changed in mixxx:
status: Fix Committed → Confirmed
RAWRR (rraawwrrrr) 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.

tomtom (thomas-8) wrote :

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

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) on 2014-12-12
information type: Public Security → Public
Tuukka Pasanen (pasanen-tuukka) wrote :

Can this be ALSA-Pulseaudio-Portaudio brigde thing?

danger zack (dangerzack) on 2015-12-19
Changed in mixxx:
status: Confirmed → Fix Released

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

Changed in mixxx:
status: Fix Released → Confirmed

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

danger zack (dangerzack) on 2015-12-23
Changed in mixxx:
status: Confirmed → Fix Released
jus (jus) on 2015-12-23
Changed in mixxx:
status: Fix Released → Confirmed
Daniel Schürmann (daschuer) wrote :
tags: added: portaudio
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers