Every few minutes I get an engine crash (probably after a few alsa underruns)
ALSA lib pcm.c:7963:(snd_pcm_recover) underrun occurred
Expression 'err' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3350
Expression 'ContinuePoll( self, StreamDirection_In, &pollTimeout, &pollCapture )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3891
Expression 'PaAlsaStream_WaitForFrames( stream, &framesAvail, &xrun )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 4269
I have a self-compiled version of the core. This happens even with no plugins loaded at startup.
I experience the same on "dev" version I compiled on Debian.
Saving settings ./settings.json
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
^ That's not the same issue @leopard86 is having.
@maricn do you experience a crash after this? Alsa underruns are not scary, maybe you will just hear some glitches, the problem is if these will crash your app.
I still experience these crashes with the latest dev, but maybe it's my machine. I can run VCV for hours if not connected to the audio card, but after I connect to Alsa some underruns occur in one or two minutes and then boom.
BTW: maybe I could ask for help in the linux audio mailing list?
I have audio glitches - clicking sound when underrun occurs, and usually experience crash after some time. I just built it last night, so didn't have a chance to properly play around yet..
@maricn ok then maybe post your console output right after a crash.
My issue maybe better fits to #131. Attaching details there too.
Basically, I also experience a crash every couple of minutes. That is, application hangs, so I interrupt it:
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
Expression 'err' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3350
Expression 'ContinuePoll( self, StreamDirection_In, &pollTimeout, &pollCapture )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3891
Expression 'PaAlsaStream_WaitForFrames( stream, &framesAvail, &xrun )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 4269
^CMakefile:49: recipe for target 'run' failed
make: *** [run] Interrupt
It's been going on ea47c915 build, v0.4.0, and current master.
OS: Debian jessie.
aplay: version 1.0.28 by Jaroslav Kysela perex@perex.cz
Advanced Linux Sound Architecture Driver Version k3.16.0-4-amd64.
I wrote to the linuxaudio and the portaudio mailing list but so far I got no one replying.
BTW: I think this should be merged with #131
Increasing the buffer size reduces the number of underruns and this increases the "longevity" before the crash, but it is not a guarantee of success on the long run.
hi, I had the same problem in my software and posted on the portaudio mailing list: apparently this is due to ALSA's pulseaudio wrapper alsa-pulse.
Here's the mail: https://lists.columbia.edu/pipermail/portaudio/2018-January/001342.html
There is a WIP for a native pulseaudio backend https://app.assembla.com/spaces/portaudio/git/merge_requests/3719213
Closing this issue. Audio related problems in Linux will be covered in #1317
Most helpful comment
@maricn ok then maybe post your console output right after a crash.