pivumeter
pivumeter copied to clipboard
Segmentation Fault in get_channel_level
Well, my problem looks identical to the issue in #16 but since I am already using the asound.conf file listed there (which removes dmix), I'm not sure how best to proceed.
I have a Pimoroni Pirate Radio, with Raspian Buster installed (Linux raspberrypi 5.10.63+ #1457). I'm running "pianobar" (version 2020.11.28) which lets me use it to stream Pandora radio. Pianobar segfaults after a couple of minutes. I got a core dump, and the backtrace looks identical to the one in issue #16:
(gdb) backtrace
#0 get_channel_level (channel=0, offset=<optimized out>, size1=53960, size2=1853429792,
max_decay=3496476, max_decay_temp=<optimized out>, level=<optimized out>,
level=<optimized out>) at src/pivumeter.c:116
#1 0xadd06494 in level_update (scope=<optimized out>) at src/pivumeter.c:171
#2 0xaf105efc in ?? () from /lib/arm-linux-gnueabihf/libasound.so.2
So I disabled pivumeter (just by renaming the asound.conf file, since I don't know the right way to disable it), and pianobar doesn't crash now. Any ideas on how to keep pivumeter from seg faulting?
Unfortunately not, I think the architecture of ALSA and the way it loads plugins, plus what it expects of them, means this project was somewhat doomed from the start- at least fixing the segfaulting issue has been somewhat out of my grasp.
There is light at the end of the tunnel, though, Raspberry Pi OS started including Pulse Audio which I'm given to understand would be much better suited to this kind of thing.
There's a Pulse Audio VU Meter already - http://manpages.ubuntu.com/manpages/bionic/man1/pavumeter.1.html which suggests it's possible.
Already tried some discovery and it looks... promising... less likely to bring the whole audio subsystem down, for sure: https://twitter.com/Gadgetoid/status/1455873779444461571?s=20