common segfault on exit if controller connected

Bug #1946581 reported by Owen Williams
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Committed
High
Owen Williams

Bug Description

this is on main. I've been getting segfaults when I quit mixxx for a while now and I finally got a corefile to see what is happening.

#0 0x000055fec4189005 in QtPrivate::indexOf<DlgPrefController*, DlgPrefController*>(QList<DlgPrefController*> const&, DlgPrefController* const&, int)
    (from=0, u=<synthetic pointer>: 0x55fece266ac0, list=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h:1042
#1 QList<DlgPrefController*>::indexOf(DlgPrefController* const&, int) const (from=0, t=<synthetic pointer>: 0x55fece266ac0, this=0x55fece118be8)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h:1026
#2 DlgPrefControllers::slotHighlightDevice(DlgPrefController*, bool) (this=0x55fece118af0, pControllerDlg=0x55fece266ac0, enabled=<optimized out>)
    at /home/owen/src/github/mixxx/src/controllers/dlgprefcontrollers.cpp:198
#3 0x00007f56a68d95c7 in () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#4 0x000055fec4536dc3 in Controller::openChanged(bool) (this=this@entry=0x7f56040300c0, _t1=<optimized out>, _t1@entry=false)
    at /home/owen/src/github/mixxx/cbuild/mixxx-lib_autogen/include/moc_controller.cpp:170
#5 0x000055fec455d485 in Controller::setOpen(bool) (open=false, this=0x7f56040300c0) at /home/owen/src/github/mixxx/src/controllers/controller.h:135
#6 PortMidiController::close() (this=0x7f56040300c0) at /home/owen/src/github/mixxx/src/controllers/midi/portmidicontroller.cpp:111
#7 0x000055fec455db25 in PortMidiController::~PortMidiController() (this=0x7f56040300c0, __in_chrg=<optimized out>)
    at /home/owen/src/github/mixxx/src/controllers/midi/portmidicontroller.cpp:39
#8 PortMidiController::~PortMidiController() (this=0x7f56040300c0, __in_chrg=<optimized out>) at /home/owen/src/github/mixxx/src/controllers/midi/portmidicontroller.cpp:41
#9 0x000055fec419d34c in PortMidiEnumerator::~PortMidiEnumerator() (this=0x7f560407a970, __in_chrg=<optimized out>)
    at /home/owen/src/github/mixxx/src/controllers/midi/portmidienumerator.cpp:101
#10 0x000055fec419d5cd in PortMidiEnumerator::~PortMidiEnumerator() (this=0x7f560407a970, __in_chrg=<optimized out>)
    at /home/owen/src/github/mixxx/src/controllers/midi/portmidienumerator.cpp:108
#11 0x000055fec4170432 in ControllerManager::slotShutdown() (this=0x55fec5a23310) at /home/owen/src/github/mixxx/src/controllers/controllermanager.cpp:173
#12 0x00007f56a68cf10c in QObject::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x00007f56a9a54783 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007f56a68a17ba in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007f56a68a47e1 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#16 0x00007f56a68fbba7 in () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007f56a55bd8eb in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#18 0x00007f56a5610d28 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#19 0x00007f56a55bb023 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007f56a68fb204 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x00007f56a68a011b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#22 0x00007f56a66b5182 in QThread::exec() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#23 0x00007f56a66b6341 in () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#24 0x00007f56a61da450 in start_thread (arg=0x7f5620ff9640) at pthread_create.c:473
#25 0x00007f56a60fcd53 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

We are calling into the preferences dialog during destruction, which is Bad. I'm guessing something about our code changed that the prefs dialog is being destructed before the midi devices are closed.

Revision history for this message
ronso0 (ronso0) wrote :
Changed in mixxx:
status: New → Fix Committed
milestone: none → 2.4.0
assignee: nobody → Owen Williams (ywwg)
importance: Undecided → High
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/10553

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.