Intermittent segmentation fault when connected to bluetooth audio devices

20
closed
kazetsukaimiko
kazetsukaimiko
Posted 1 year ago

Intermittent segmentation fault when connected to bluetooth audio devices #162

Expected Behavior

pavucontrol-qt should remain open when connecting to or disconnecting from bluetooth audio devices.

Current Behavior

On occasion connecting to a bluetooth device will cause the application to crash with a segmentation fault.

Steps to Reproduce (for bugs)
  1. Open pavucontrol-qt or have pavucontrol-qt open.
  2. Using some bluez shell or UI, connect an audio device.
  3. pavucontrol-qt will forcibly quit with a segfault.
  4. Upon reopen of pavucontrol-qt, it will forcibly quit with a segfault after connecting to pulseaudio.
Context

I can still use bluetooth audio devices by disabling all other sinks prior to connecting. Sometimes, pavucontrol-qt doesn't segfault and I can manage the devices. Its about 50/50. Will need guidance as to how to gather useful debugging information, console output is currently:

> pavucontrol-qt

Segmentation fault (core dumped)
System Information
  • Distribution & Version: Arch Linux
  • Kernel: 5.6.11-arch1-1
  • Qt Version: 5.15.0-1
  • libqtxdg Version: 3.5.0-2
  • lxqt-build-tools Version: 0.7.0-1
  • Package version: 0.15.0-1
McThump
McThump
Created 1 year ago

@palinek Sure! I'm not a developer, so will need to set up a test machine and figure out how to do this. Should have it to you in a couple of days.

McThump
McThump
Created 1 year ago

@palinek Is this what you need? It is from a Bullseye system but also occurs on Buster. backtrace.txt

palinek
palinek
Created 1 year ago

Partially, but you need to install the *-dbgsym packages to get reasonable info...

https://wiki.debian.org/HowToGetABacktrace

McThump
McThump
Created 1 year ago

@palinek Ah, I see. Here is a new one. backtrace2.txt

palinek
palinek
Created 1 year ago

After a while of analyzing the code, your SEGFAULT backtrace & your description ... I believe the problem is, that you don't have this commit included. When I reverted the commit and tried to connect few bluetooth loudspeakers I was able to reproduce the SEGFAULT.

@McThump, @kazetsukaimiko can you, please, test with current git master (or at least the above commit included)?

@tsujan When do you intend to release 0.16.0? (this bug is one of the "point release" candidates, IMO)

tsujan
tsujan
Created 1 year ago

@tsujan When do you intend to release 0.16.0?

In the first week of November (https://github.com/lxqt/lxqt/issues/1848).

kazetsukaimiko
kazetsukaimiko
Created 1 year ago

The AUR package for Arch https://aur.archlinux.org/packages/pavucontrol-qt-git/ doesn't build, failing with:

CMake Error at CMakeLists.txt:28 (find_package):
  Could not find a configuration file for package "lxqt-build-tools" that is
  compatible with requested version "0.7.0".

  The following configuration files were considered but not accepted:

    /usr/share/cmake/lxqt-build-tools/lxqt-build-tools-config.cmake, version: 0.5.0

The sandsmark fork doesn't have this issue: https://aur.archlinux.org/packages/pavucontrol-qt-sandsmark-git/

Sometimes I wish I knew more about C toolchains. This is one of those times.

tsujan
tsujan
Created 1 year ago

@kazetsukaimiko Just install/upgrade lxqt-build-tools.

kazetsukaimiko
kazetsukaimiko
Created 1 year ago

Ah, I had an old lxqt-build-tools-git installed. Yeah, against git master I can connect the problematic amp. Fixed for me.

McThump
McThump
Created 1 year ago

Same here. The version built from the master (/usr/local/bin/pavucontrol-qt) works when a Bluetooth audio sink device is connected. On the same machine, 0.14.1 at /usr/bin/pavucontrol-qt crashes immediately on startup.