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

pc-mixer crashes on volume change in UI #42

Closed
maxsteciuk opened this issue Nov 26, 2018 · 2 comments
Closed

pc-mixer crashes on volume change in UI #42

maxsteciuk opened this issue Nov 26, 2018 · 2 comments

Comments

Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
@maxsteciuk
Copy link
Contributor

@maxsteciuk maxsteciuk commented Nov 26, 2018

Describe the bug
When adjusting volume using UI in pc-mixer the app crashes on signal 11 (segmentation fault).
The crash occurred in kernel space so unfortunately there was no core dump captured.

UPDATE
I was able to reproduce the crash on the checked out working copy with debug enabled. Once it crashed on SIGBUS and another time on SIGSEGV

Here is captured backtrace 1:

Core was generated by `./pc-mixer'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00000008007598cb in QAbstractSlider::setRepeatAction(QAbstractSlider::SliderAction, int, int) () from /usr/local/lib/qt5/libQt5Widgets.so.5
[Current thread is 1 (LWP 101544)]
(gdb) bt
#0 0x00000008007598cb in QAbstractSlider::setRepeatAction(QAbstractSlider::SliderAction, int, int) () from /usr/local/lib/qt5/libQt5Widgets.so.5
#1 0x00000008007fdb21 in QSlider::mousePressEvent(QMouseEvent*) () from /usr/local/lib/qt5/libQt5Widgets.so.5
#2 0x00000008006b1e80 in QWidget::event(QEvent*) () from /usr/local/lib/qt5/libQt5Widgets.so.5
#3 0x00000008007fd542 in QSlider::event(QEvent*) () from /usr/local/lib/qt5/libQt5Widgets.so.5
#4 0x000000080067af71 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/local/lib/qt5/libQt5Widgets.so.5
#5 0x000000080067dcc8 in QApplication::notify(QObject*, QEvent*) () from /usr/local/lib/qt5/libQt5Widgets.so.5
#6 0x000000080160eef1 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/local/lib/qt5/libQt5Core.so.5
#7 0x000000080067b8a9 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer&, bool) () from /usr/local/lib/qt5/libQt5Widgets.so.5
#8 0x00000008006cfec6 in ?? () from /usr/local/lib/qt5/libQt5Widgets.so.5
#9 0x00000008006ced66 in ?? () from /usr/local/lib/qt5/libQt5Widgets.so.5
#10 0x000000080067af71 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/local/lib/qt5/libQt5Widgets.so.5
#11 0x000000080067c369 in QApplication::notify(QObject*, QEvent*) () from /usr/local/lib/qt5/libQt5Widgets.so.5
#12 0x000000080160eef1 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/local/lib/qt5/libQt5Core.so.5
#13 0x0000000800bf1b89 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/local/lib/qt5/libQt5Gui.so.5
#14 0x0000000800bd8f5c in QWindowSystemInterface::sendWindowSystemEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/local/lib/qt5/libQt5Gui.so.5
#15 0x0000000804af9dd8 in ?? () from /usr/local/lib/qt5/libQt5XcbQpa.so.5
#16 0x000000080160aa3e in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/local/lib/qt5/libQt5Core.so.5
#17 0x000000080160f4ee in QCoreApplication::exec() () from /usr/local/lib/qt5/libQt5Core.so.5
#18 0x000000000021ee14 in main (argc=1, argv=0x7fffffffe840) at main.cpp:74

Here is captured backtrace 2:

Thread 1 received signal SIGSEGV, Segmentation fault.
0x000000080075a9f4 in QButtonGroup::removeButton(QAbstractButton*) () from /usr/local/lib/qt5/libQt5Widgets.so.5
(gdb) bt
#0 0x000000080075a9f4 in QButtonGroup::removeButton(QAbstractButton*) () from /usr/local/lib/qt5/libQt5Widgets.so.5
#1 0x0000000800757029 in QAbstractButton::~QAbstractButton() () from /usr/local/lib/qt5/libQt5Widgets.so.5
#2 0x000000080083fe8e in QToolButton::~QToolButton() () from /usr/local/lib/qt5/libQt5Widgets.so.5
#3 0x00000008016386ba in QObjectPrivate::deleteChildren() () from /usr/local/lib/qt5/libQt5Core.so.5
#4 0x00000008006a14e2 in QWidget::~QWidget() () from /usr/local/lib/qt5/libQt5Widgets.so.5
#5 0x00000008007503de in QFrame::~QFrame() () from /usr/local/lib/qt5/libQt5Widgets.so.5
#6 0x00000008016386ba in QObjectPrivate::deleteChildren() () from /usr/local/lib/qt5/libQt5Core.so.5
#7 0x00000008006a14e2 in QWidget::~QWidget() () from /usr/local/lib/qt5/libQt5Widgets.so.5
#8 0x000000000022eba5 in DeviceWidget::~DeviceWidget (this=0x8069d4760) at DeviceWidget.cpp:20
#9 0x000000000022ebe9 in DeviceWidget::~DeviceWidget (this=0x8069d4760) at DeviceWidget.cpp:18
#10 0x00000008016386ba in QObjectPrivate::deleteChildren() () from /usr/local/lib/qt5/libQt5Core.so.5
#11 0x00000008006a14e2 in QWidget::~QWidget() () from /usr/local/lib/qt5/libQt5Widgets.so.5
#12 0x00000008006a1d5e in QWidget::~QWidget() () from /usr/local/lib/qt5/libQt5Widgets.so.5
#13 0x0000000000224f1a in MixerGUI::updateGUI (this=0x80291b1c0) at MixerGUI.cpp:35
#14 0x000000000022199b in MixerTray::loadVol (this=0x80290f380) at MixerTray.cpp:139
#15 0x000000000023292f in MixerTray::qt_static_metacall (_o=0x80290f380, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffffffd4a8) at moc_MixerTray.cpp:108
#16 0x000000080163fd0d in QMetaObject::activate(QObject*, int, int, void**) () from /usr/local/lib/qt5/libQt5Core.so.5
#17 0x0000000000233bf2 in MixerGUI::updateTray (this=0x80291b1c0) at moc_MixerGUI.cpp:223
#18 0x0000000000227914 in MixerGUI::itemChanged (this=0x80291b1c0, device=...) at MixerGUI.cpp:209
#19 0x00000000002339ab in MixerGUI::qt_static_metacall (_o=0x80291b1c0, _c=QMetaObject::InvokeMetaMethod, _id=10, _a=0x7fffffffd770) at moc_MixerGUI.cpp:140
#20 0x000000080163fd0d in QMetaObject::activate(QObject*, int, int, void**) () from /usr/local/lib/qt5/libQt5Core.so.5
#21 0x0000000000234511 in DeviceWidget::deviceChanged (this=0x80a9bb820, _t1=...) at moc_DeviceWidget.cpp:147
#22 0x000000000022f22a in DeviceWidget::updateVolumes (this=0x80a9bb820, Lvol=80, Rvol=80) at DeviceWidget.cpp:79
#23 0x000000000022f413 in DeviceWidget::RSliderChanged (this=0x80a9bb820, Rvol=80) at DeviceWidget.cpp:116
#24 0x0000000000234444 in DeviceWidget::qt_static_metacall (_o=0x80a9bb820, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0x7fffffffd9b0) at moc_DeviceWidget.cpp:92
#25 0x000000080163fd0d in QMetaObject::activate(QObject*, int, int, void**) () from /usr/local/lib/qt5/libQt5Core.so.5
#26 0x0000000800758f51 in QAbstractSlider::setValue(int) () from /usr/local/lib/qt5/libQt5Widgets.so.5
#27 0x0000000800759626 in QAbstractSlider::triggerAction(QAbstractSlider::SliderAction) () from /usr/local/lib/qt5/libQt5Widgets.so.5
#28 0x00000008007fdb0c in QSlider::mousePressEvent(QMouseEvent*) () from /usr/local/lib/qt5/libQt5Widgets.so.5
#29 0x00000008006b1e80 in QWidget::event(QEvent*) () from /usr/local/lib/qt5/libQt5Widgets.so.5
#30 0x00000008007fd542 in QSlider::event(QEvent*) () from /usr/local/lib/qt5/libQt5Widgets.so.5
#31 0x000000080067af71 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/local/lib/qt5/libQt5Widgets.so.5
#32 0x000000080067dcc8 in QApplication::notify(QObject*, QEvent*) () from /usr/local/lib/qt5/libQt5Widgets.so.5
#33 0x000000080160eef1 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/local/lib/qt5/libQt5Core.so.5
#34 0x000000080067b8a9 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer&, bool) () from /usr/local/lib/qt5/libQt5Widgets.so.5
#35 0x00000008006cfec6 in ?? () from /usr/local/lib/qt5/libQt5Widgets.so.5
#36 0x00000008006ced66 in ?? () from /usr/local/lib/qt5/libQt5Widgets.so.5
#37 0x000000080067af71 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/local/lib/qt5/libQt5Widgets.so.5
#38 0x000000080067c369 in QApplication::notify(QObject*, QEvent*) () from /usr/local/lib/qt5/libQt5Widgets.so.5
#39 0x000000080160eef1 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/local/lib/qt5/libQt5Core.so.5
#40 0x0000000800bf1b89 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/local/lib/qt5/libQt5Gui.so.5
#41 0x0000000800bd8f5c in QWindowSystemInterface::sendWindowSystemEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/local/lib/qt5/libQt5Gui.so.5
#42 0x0000000804af9dd8 in ?? () from /usr/local/lib/qt5/libQt5XcbQpa.so.5
#43 0x000000080160aa3e in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/local/lib/qt5/libQt5Core.so.5
#44 0x000000080160f4ee in QCoreApplication::exec() () from /usr/local/lib/qt5/libQt5Core.so.5
#45 0x000000000021ee14 in main (argc=1, argv=0x7fffffffe800) at main.cpp:74

Here is captured CLI output:

Output Devices Found: ("Installed devices:", "pcm0: <Realtek ALC1220 (Rear Analog 5.1/2.0)> (play/rec) default", "pcm1: <Realtek ALC1220 (Front Analog)> (play/rec)", "pcm2: <Realtek ALC1220 (Rear Digital)> (play)", "pcm3: <Intel Kabylake (HDMI/DP 8ch)> (play)", "No devices installed from userspace.")
[Detaching after fork from child process 85553]
[Detaching after fork from child process 85554]
[Detaching after fork from child process 85555]
[Detaching after fork from child process 85556]
[Detaching after fork from child process 85557]
Output Devices Found: ("Installed devices:", "pcm0: <Realtek ALC1220 (Rear Analog 5.1/2.0)> (play/rec) default", "pcm1: <Realtek ALC1220 (Front Analog)> (play/rec)", "pcm2: <Realtek ALC1220 (Rear Digital)> (play)", "pcm3: <Intel Kabylake (HDMI/DP 8ch)> (play)", "No devices installed from userspace.")
[Detaching after fork from child process 85562]
[Detaching after fork from child process 85563]
[Detaching after fork from child process 85564]
[Detaching after fork from child process 85565]
[Detaching after fork from child process 85566]
Output Devices Found: ("Installed devices:", "pcm0: <Realtek ALC1220 (Rear Analog 5.1/2.0)> (play/rec) default", "pcm1: <Realtek ALC1220 (Front Analog)> (play/rec)", "pcm2: <Realtek ALC1220 (Rear Digital)> (play)", "pcm3: <Intel Kabylake (HDMI/DP 8ch)> (play)", "No devices installed from userspace.")
[Detaching after fork from child process 85567]
[Detaching after fork from child process 85568]
[Detaching after fork from child process 85569]
[Detaching after fork from child process 85570]
[Detaching after fork from child process 85571]
Output Devices Found: ("Installed devices:", "pcm0: <Realtek ALC1220 (Rear Analog 5.1/2.0)> (play/rec) default", "pcm1: <Realtek ALC1220 (Front Analog)> (play/rec)", "pcm2: <Realtek ALC1220 (Rear Digital)> (play)", "pcm3: <Intel Kabylake (HDMI/DP 8ch)> (play)", "No devices installed from userspace.")

To Reproduce
Steps to reproduce the behavior:

  1. Go to pc-mixer UI
  2. Adjust volume up and down using slider UI
  3. Observe it crashing
  4. Check /var/log/messages

Expected behavior
pc-mixer does not crash

log

Nov 25 20:32:23 kernel: pid 2150 (pc-mixer), uid 1001: exited on signal 11 (core dumped)

OS Version:
Trident Pre-Release 11/23

@maxsteciuk maxsteciuk changed the title pc-mixer crashes due to segfault pc-mixer crashes on volume change in UI Nov 26, 2018
@maxsteciuk
Copy link
Contributor Author

@maxsteciuk maxsteciuk commented Nov 29, 2018

So far I narrowed down the issue to the point where UI mouse event registered for Slider Widget is emitted on DeviceWidget that is being deallocated.

SIGSEGV or SIGBUS happened along the following lines

#0 0x0000000801637bac in QObject::thread() const () from /usr/local/lib/qt5/libQt5Core.so.5
#1 0x0000000801609e26 in QBasicTimer::start(int, QObject*) () from /usr/local/lib/qt5/libQt5Core.so.5
#2 0x00000008007fdb21 in QSlider::mousePressEvent(QMouseEvent*) () from /usr/local/lib/qt5/libQt5Widgets.so.5

This is the emit invocation which if commented out crash doesn't occur

emit deviceChanged( ui->label_device->text() );

@beanpole135
Copy link
Member

@beanpole135 beanpole135 commented Jan 18, 2019

This should be fixed by commit: q5sys/pc-mixer@5ff7c2c

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