Skip to content

crash during mix disabling quantize #11709

Closed
@ywwg

Description

Bug Description

Twice now (in many hours of DJing) I have had a crash when disabling quantize on deck 1. It is very, very hard to reproduce.

#0  0x0000561aa8d934cc in void std::__insertion_sort<QList<QSharedPointer<WaveformMark> >::iterator, __gnu_cxx::__ops::_Iter_less_iter>(QList<QSharedPointer<WaveformMark> >::iterator, QList<QSharedPointer<WaveformMark> >::iterator, __gnu_cxx::__ops::_Iter_less_iter) [clone .isra.0] ()
[Current thread is 1 (Thread 0x7f42e99d8380 (LWP 117578))]
(gdb) bt
#0  0x0000561aa8d934cc in void std::__insertion_sort<QList<QSharedPointer<WaveformMark> >::iterator, __gnu_cxx::__ops::_Iter_less_iter>(QList<QSharedPointer<WaveformMark> >::iterator, QList<QSharedPointer<WaveformMark> >::iterator, __gnu_cxx::__ops::_Iter_less_iter) [clone .isra.0] ()
#1  0x0000561aa8d97004 in WOverview::updateCues(QList<CuePointer> const&) ()
#2  0x0000561aa8d9799c in WOverview::onMarkChanged(double) ()
#3  0x00007f42f24f1793 in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x0000561aa8790064 in ControlProxy::valueChanged(double) ()
#5  0x00007f42f24e741e in QObject::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f42f556c713 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#7  0x00007f42f24b9e3a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007f42f24bcf27 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007f42f2513a67 in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007f42f145bd3b in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x00007f42f14b1258 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#12 0x00007f42f14593e3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#13 0x00007f42f25130b8 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007f42f24b875b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007f42f24c0cf4 in QCoreApplication::exec() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#16 0x0000561aa86098b8 in main ()

so when I disabled quantize it updated the cues... and somewhere in there it got unhappy. This was a release build so no line numbers. Here is the only sort in that function: https://github.com/mixxxdj/mixxx/blob/main/src/widget/woverview.cpp#L455

I am wondering if somehow the marks became invalid? Could updatecues be called from more than one thread?

My only theory is that m_marksToRender is somehow changing during the call -- I don't see how else a simple qlist sort would crash. So for now I'm dropping a mutex in updateCues. (I don't see a simultaneous call to updatecues in the backtrace, there are no other interesting threads).

Version

HEAD

OS

Ubuntu 22.04

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions