cava: shmem input crashes with segfault when connecting to squeezelite
Using the latest source from the github.com master branch, cava crashes on MacOS Monterey when connecting to a local squeezelite instance via shmem. Using cava without shmem / setting it to use portaudio works fine.
Seemingly random, I get
input_shmem: source: /squeezelite-ac:bc:32:7a:2d:99cava(20773,0x1080b0600) malloc: Incorrect checksum for freed object 0x7fef8303dc00: probably modified after being freed. Corrupt value: 0x4061a00000000000 cava(20773,0x1080b0600) malloc: *** set a breakpoint in malloc_error_break to debug zsh: abort cava
I hope I can give the correct information to reproduce below. Otherwise please give me hint concerning what I am doing wrong…
To Reproduce Steps to reproduce the behavior: 0. Start squeezelite with vis output
- Configure cava to use shmem with noncurses
- run cava
- wait
- See error
Expected behavior No error ;o)
Desktop (please complete the following information):
- OS: macOS
- Version 15.1
Terminal emulator
- MacOS Terminal with zsh
Additional context The latest output_vis.c of squeezelite is here (https://github.com/ralph-irving/squeezelite/blob/master/output_vis.c). Maybe that helps.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 25 (14 by maintainers)
Commits related to this issue
- fix for #418 shmem input buffer overflow the smem memory map has a bigger buffer then the fftw input. So we will have to split it up. This should fix it. — committed to karlstav/cava by karlstav 2 years ago
- #418 buffer must be frames * 2 int16_t (2 channels) — committed to karlstav/cava by karlstav 2 years ago
try it now, I was a bit quick. The buffer must of course be frames * 2 (left and right).