Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mixxx segfaults when device unplugged #14358

Open
SamWhited opened this issue Feb 17, 2025 · 5 comments
Open

Mixxx segfaults when device unplugged #14358

SamWhited opened this issue Feb 17, 2025 · 5 comments

Comments

@SamWhited
Copy link

SamWhited commented Feb 17, 2025

Bug Description

If my Arturia KeyLab 88 is unplugged while Mixxx is running, the program segfaults and exists. This happens with both Mixxx 2.5 from the Arch repos and 2.6 (built from fef7062). I see nothing in the logs before it happen (except the usual "Segmentation fault (core dumped)"), Mixxx just freezes up and then after a few seconds it dies.

Unfortunately I can't get a stack trace, the debug symbols take up more space than I have left on my drive. Hopefully someone else with a controller can try this and get a trace. I couldn't find an open or closed issue for this, but I found a few places online where people were asking about it so hopefully it's not just me?

Version

2.5, 2.6

OS

Linux 6.13.2-arch1-1

@SamWhited SamWhited added the bug label Feb 17, 2025
@daschuer
Copy link
Member

Which sound API and Linux distro you are using?
A backyrace even without symbols installed is helpful and no this case.

@SamWhited
Copy link
Author

Distro is Arch, sound has only mains setup running through pipewire channels 1 and 2, however this happens regardless of what I have selected (if I select an external soundcard directly for example). I don't really remember how to get a trace and it was a huge pain last time, hopefully someone who does C++ regularly can reproduce this and get better results, but if I can figure it out again I'll see what i can do.

@SamWhited
Copy link
Author

Got one, maybe this has the info you need?

gdb.txt

@daschuer
Copy link
Member

Yes it was already helpfull. The seems to be unrelated to Sound. The segfault happens in libportmidi from Pm_Read()

It looks like a function pointer has become null.
https://github.com/PortMidi/portmidi/blob/806aa16c7d3c85f6084e6b10299ce4a0da66edac/pm_common/portmidi.c#L575
Mabe midi->dictionary->poll but I don't undertsand how. It looks like I can't. Maybe one layser deeper.

Do you know if ALSA is called directly or a Pipewire layers ist also involved?

A solution would be to detect unplugging and stop polling.

@SamWhited
Copy link
Author

Do you know if ALSA is called directly or a Pipewire layers ist also involved?

I don't know, sorry, I don't really know anything about the Linux audio stack. I know Arch uses Pipewire by default, so I assume it's being used, but I don't know how I'd check this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants