Author Topic: Crash with specific ALSA recording device  (Read 134 times)


  • Posts: 2502
Crash with specific ALSA recording device
« on: 29 Mar '21 - 16:44 »
I've come across a strange issue with a specific ALSA device on Ubuntu. I couldn't reproduce it on my desktop machine but it's easily reproducible with a fresh Ubuntu 20.04 installation in VirtualBox. The device in question is called "Plug-in for channel upmix (4,6,8)". Trying to use this as a recording device instantly crashes the application when starting to record. Using a different recording device before trying this specific one one may cause it to fail to open instead.
Interestingly, the stock rectest example doesn't show this issue but it only took a few modifications to trigger the crash there as well (using BASS_RecordInit instead of BASS_RecordSetInput). I have attached my modified example program.
I guess the expected outcome would be that recording from this device simply fails to start.

Stack trace:
Code: [Select]

Ian @ un4seen

  • Administrator
  • Posts: 23626
Re: Crash with specific ALSA recording device
« Reply #1 on: 30 Mar '21 - 16:22 »
It's crashing in the first ALSA snd_pcm_readi function call. No ALSA calls are failing before that, so there unfortunately doesn't seem to be any way to know that it's going to crash. ALSA's own arecord tool also crashes when trying to use that device (running "arecord -D upmix -f S16_LE -c 2 -r 44100").


  • Posts: 2502
Re: Crash with specific ALSA recording device
« Reply #2 on: 30 Mar '21 - 17:03 »
Thanks for investigating. I guess we will simply ignore this device in our device selection list then, as it wouldn't be a useful recording source anyway.