lmms icon indicating copy to clipboard operation
lmms copied to clipboard

Segfault when moving a fader in the mixer

Open M4rotte opened this issue 2 years ago • 1 comments

Hi,

Didn’t find any issue that could match the bug, sorry if it exists already.

I don’t know how to reproduce but that’s an error I haven’t seen before.

The song was playing and I wanted to move all the faders to zero, I moved a few and then this error popped when moving one:

Thread 1 "lmms" received signal SIGSEGV, Segmentation fault.
0x00007ffff7f6d5a7 in ?? () from /lib/x86_64-linux-gnu/libQt5Xml.so.5
(gdb) bt full
#0  0x00007ffff7f6d5a7 in  () at /lib/x86_64-linux-gnu/libQt5Xml.so.5
#1  0x00007ffff7f6d6a2 in  () at /lib/x86_64-linux-gnu/libQt5Xml.so.5
#2  0x00007ffff7f6ea99 in  () at /lib/x86_64-linux-gnu/libQt5Xml.so.5
#3  0x00007ffff7f6d5f4 in  () at /lib/x86_64-linux-gnu/libQt5Xml.so.5
#4  0x00007ffff7f6e959 in  () at /lib/x86_64-linux-gnu/libQt5Xml.so.5
#5  0x00005555557ba008 in lmms::DataFile::~DataFile() (this=0x5555644e3ab0, __in_chrg=<optimized out>) at /usr/local/src/lmms/include/DataFile.h:67
#6  0x00005555558833ce in lmms::ProjectJournal::CheckPoint::~CheckPoint() (this=0x5555644e3aa8, __in_chrg=<optimized out>) at /usr/local/src/lmms/include/ProjectJournal.h:105
#7  0x0000555555883f67 in QVector<lmms::ProjectJournal::CheckPoint>::erase(lmms::ProjectJournal::CheckPoint*, lmms::ProjectJournal::CheckPoint*)
    (this=0x55555697de80, abegin=0x5555644e3aa8, aend=0x5555644e3ae0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qvector.h:928
        moveBegin = 0x5555644e3ae0
        moveEnd = 0x5555644e50c0
        itemsToErase = 1
        itemsUntouched = 0
#8  0x000055555588374a in QVector<lmms::ProjectJournal::CheckPoint>::remove(int, int) (this=0x55555697de80, i=0, n=1) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qvector.h:474
#9  0x0000555555882fdb in lmms::ProjectJournal::addJournalCheckPoint(lmms::JournallingObject*) (this=0x55555697de70, jo=0x55555e502f10)
    at /usr/local/src/lmms/src/core/ProjectJournal.cpp:124
        dataFile = {<QDomDocument> = {<QDomNode> = {impl = 0x7fff7000b8b0}, <No data fields>}, _vptr.DataFile = 0x555555bec470 <vtable for lmms::DataFile+16>, m_fileName = {d = 0x5555639c9820}, m_content = {<QDomNode> = {impl = 0x55557a2958c0}, <No data fields>}, m_head = {<QDomNode> = {impl = 0x5555656c97e0}, <No data fields>}, m_type = lmms::DataFile::Type::JournalData, m_fileVersion = 27}
#10 0x00005555558549f7 in lmms::JournallingObject::addJournalCheckPoint() (this=0x55555e502f10) at /usr/local/src/lmms/src/core/JournallingObject.cpp:62
#11 0x0000555555a04ec2 in lmms::gui::Fader::mousePressEvent(QMouseEvent*) (this=0x555564c322a0, mouseEvent=0x7fffffffd360) at /usr/local/src/lmms/src/gui/widgets/Fader.cpp:166
        thisModel = 0x55555e502ef0
#12 0x00007ffff79a4db8 in QWidget::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007ffff7962fae in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007ffff796b552 in QApplication::notify(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007ffff66b16f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#16 0x00007ffff796965e in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) ()
    at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007ffff79bdbd8 in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007ffff79c0f60 in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007ffff7962fae in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#20 0x00007ffff66b16f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x00007ffff6b3d3ed in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /lib/x86_64-linux-gnu/libQt5Gui.so.5
#22 0x00007ffff6b11cac in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Gui.so.5
#23 0x00007ffff22fbeca in  () at /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#24 0x00007ffff55d47a9 in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007ffff55d4a38 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#26 0x00007ffff55d4acc in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#27 0x00007ffff6709836 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#28 0x00007ffff66b017b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#29 0x00007ffff66b82d6 in QCoreApplication::exec() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#30 0x00005555557b77fc in main(int, char**) (argc=1, argv=0x7fffffffe168) at /usr/local/src/lmms/src/core/main.cpp:1018
        coreOnly = false
        fullscreen = true
        exitAfterImport = false
        allowRoot = false
        renderLoop = false
        renderTracks = false
        fileToLoad = {d = 0x7ffff6797b20 <QArrayData::shared_null>}
--Type <RET> for more, q to quit, c to continue without paging--
        fileToImport = {d = 0x7ffff6797b20 <QArrayData::shared_null>}
        renderOut = {d = 0x7ffff6797b20 <QArrayData::shared_null>}
        profilerOutputFile = {d = 0x7ffff6797b20 <QArrayData::shared_null>}
        configFile = {d = 0x7ffff6797b20 <QArrayData::shared_null>}
        app = 0x555556416580
        qs = {interpolation = lmms::AudioEngine::qualitySettings::Interpolation::SincFastest, oversampling = lmms::AudioEngine::qualitySettings::Oversampling::X2}
        os = {m_sampleRate = 44100, m_bitRateSettings = {m_bitRate = 160, m_isVariableBitRate = false}, m_bitDepth = lmms::OutputSettings::BitDepth::Depth16Bit, m_stereoMode = lmms::OutputSettings::StereoMode::JointStereo, m_compressionLevel = 0.625}
        eff = lmms::ProjectRenderer::ExportFileFormat::Wave
        pos = {d = 0x5555566048e0}
        sparam = {sched_priority = 50}
        sa = {__sigaction_handler = {sa_handler = 0x1, sa_sigaction = 0x1}, sa_mask = {__val = {0, 0, 0, 0, 0, 18446744073709551608, 1, 140737488347496, 140737488347512, 93825007790944, 4160551332, 47, 93824997733248, 49, 18446744073709551448, 93825007790944}}, sa_flags = 4, sa_restorer = 0x7fffffffdc60}
        destroyEngine = false
        ret = 0

M4rotte avatar Dec 02 '23 14:12 M4rotte

IIRC, I believe the updateFaders function was throwing data races all the time on ThreadSanitizer.

Maybe #6839 will fix this? Not too sure, but there's a good enough reason to think it will.

sakertooth avatar Dec 04 '23 19:12 sakertooth