Lmms: Crash in Fx-Mixer

Created on 18 Nov 2017  路  6Comments  路  Source: LMMS/lmms

I got this while preparing https://github.com/LMMS/lmms/pull/3982
With 3982 you can't trigger the crash with the method described below but I think the issue could still be there.

mixercrash.mmp.zip

To replicte crash:
Open mixercrash.mmp
Add two mixerchannels, 4 and 5
Solo channel 5
Remove unused channels.
Add new channel 4
Solo channel 4... crash!

Program received signal SIGABRT, Aborted.
0x00007ffff3ec3c37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt full
#0  0x00007ffff3ec3c37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
        resultvar = 0
        pid = 11747
        selftid = 11747
#1  0x00007ffff3ec7028 in __GI_abort () at abort.c:89
        save_stage = 2
        act = {__sigaction_handler = {sa_handler = 0x7fffffffccf0, sa_sigaction = 0x7fffffffccf0}, sa_mask = {__val = {140737488342272, 34737416, 
              140737351948023, 140733193388037, 0, 140737328865984, 140737285537072, 3, 34737416, 140737488342144, 140737351976613, 1, 2147483648, 
              140737333962688, 10, 140737333962712}}, sa_flags = -134559744, sa_restorer = 0x74512f3474712f65}
        sigs = {__val = {32, 0 <repeats 15 times>}}
#2  0x00007ffff684fc92 in qt_message_output (msgType=msgType@entry=QtFatalMsg, 
    buf=0x2120d08 "ASSERT failure in QVector<T>::operator[]: \"index out of range\", file /usr/include/qt4/QtCore/qvector.h, line 359")
    at global/qglobal.cpp:2383
No locals.
#3  0x00007ffff684fff9 in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=msgType@entry=QtFatalMsg, 
    msg=0x7ffff69bda48 "ASSERT failure in %s: \"%s\", file %s, line %d", ap=ap@entry=0x7fffffffcd58) at global/qglobal.cpp:2429
        buf = {static shared_null = {ref = {_q_value = 31}, alloc = 0, size = 0, data = 0x7ffff6cc27d8 <QByteArray::shared_null+24> "", array = ""}, 
          static shared_empty = {ref = {_q_value = 4}, alloc = 0, size = 0, data = 0x7ffff6cc27b8 <QByteArray::shared_empty+24> "", array = ""}, 
          d = 0x2120cf0}
#4  0x00007ffff6850804 in qFatal (msg=<optimized out>) at global/qglobal.cpp:2612
        ap = {{gp_offset = 40, fp_offset = 48, overflow_arg_area = 0x7fffffffce30, reg_save_area = 0x7fffffffcd70}}
#5  0x000000000051c615 in QVector<FxChannel*>::operator[] (this=0xc3a3a8, i=4) at /usr/include/qt4/QtCore/qvector.h:359
No locals.
#6  0x0000000000519e7a in FxMixer::toggledSolo (this=0xc3a360) at /home/zonkmachine/builds/lmms/lmms/src/core/FxMixer.cpp:259
        soloedChan = -1
        resetSolo = true
#7  0x00000000005a489f in FxMixerView::toggledSolo (this=0x1614fb0) at /home/zonkmachine/builds/lmms/lmms/src/gui/FxMixerView.cpp:331
No locals.
bug

All 6 comments

Bad design here... Solo should be a property of the mixer, not of the channels.
Anyway m_lastSoloed was not updated when deleting or moving channels.
https://github.com/gi0e5b06/lmms/commit/6e909bf4b17b7a6f1279ed4dd2fe50a3f041cd10

Thanks!

Tested and works. I had to adapt it a bit to Qt4/Stable-1.2.0 and left out stuff like whitespace fixes for now.

Here's the patch I tested with.
https://gist.github.com/zonkmachine/9a36ec5e58623daa34befb8edb46cde9#file-mixercrash-diff

@zonkmachine Do you want to do anything regarding this?

This one's beyond me. I tested gi0e5b06s patch and it works but I can't merge it as I don't understand it properly. I think someone with da skillz should look into the issue.

https://gist.github.com/zonkmachine/9a36ec5e58623daa34befb8edb46cde9#file-mixercrash-diff
If no one is going to look into the suggested patch I think this issue should be closed.

Done via #5272.

Was this page helpful?
0 / 5 - 0 ratings