LMMS / lmms

Cross-platform music production software
https://lmms.io
GNU General Public License v2.0
8.09k stars 1.01k forks source link

Failed Assert (TCO order) #3956

Closed gi0e5b06 closed 6 years ago

gi0e5b06 commented 6 years ago
ASSERT: "std::is_sorted(tcos.begin(), tcos.end(), TrackContentObject::comparePosition)" in file lmms/src/core/TrackContainer.cpp, line 276

I was just editing when playing, moving patterns around and under the marker.

#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:58
#1  0x00007ffff3cf837a in __GI_abort () at abort.c:89
#2  0x00007ffff47ac3f7 in QMessageLogger::fatal(char const*, ...) const ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007ffff47a789e in qt_assert(char const*, char const*, int) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00005555556df9cb in TrackContainer::automatedValuesFromTracks (tracks=..., time=..., tcoNum=tcoNum@entry=-1)
    at lmms/src/core/TrackContainer.cpp:276
#5  0x00005555556cc5ec in Song::automatedValuesAt (this=<optimized out>, time=..., tcoNum=-1)
    at lmms/src/core/Song.cpp:855
#6  0x00005555556ccc18 in Song::processAutomations (this=this@entry=0x555555e3e5a0, tracklist=..., timeStart=...)
    at lmms/src/core/Song.cpp:461
#7  0x00005555556cd9c2 in Song::processNextBuffer (this=this@entry=0x555555e3e5a0)
    at lmms/src/core/Song.cpp:412
#8  0x00005555556a3f65 in Mixer::renderNextBuffer (this=0x555555e96e20)
    at lmms/src/core/Mixer.cpp:430
#9  0x00005555556a4524 in Mixer::fifoWriter::run (this=0x555555e90690)
    at lmms/src/core/Mixer.cpp:1106
#10 0x00007ffff47c5c38 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007ffff7bc06da in start_thread (arg=0x7fff91631700) at pthread_create.c:456
#12 0x00007ffff3dc9d7f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105
zonkmachine commented 6 years ago

Q_ASSERT() introduced here: https://github.com/LMMS/lmms/pull/3481 @lukas-w

tukkek commented 6 years ago

I believe I just experienced that too in 1.2.0-rc5. It happened when the timeline cursor reached the end of the song (while still playing it) - and I believe I had a loop marker set too (but now I can't be sure since LMMS crashed).

PhysSong commented 6 years ago

Reproduced. This can happen when TrackContentObject::movePosition is called while the Mixer is processing. Simply wrapping the change requestChangeInModel and doneChangeInModel fixes this bug.