LMMS Version: 1.2.0-rc8
In case you need the project file (does this also need the samples...?) i can upload that of course.
btw: last time i used lmms was a couple of years ago, really nice progress :)
Do you mean the playback position line, a vertical line with a triangle? Also, could you upload the project file?
Yes it's the playback position line. I'm getting a segmentation fault. It's not that easy anymore to reproduce the problem, maybe i changed something in the project. It still happens, but it needs some more (fast?) dragging around of the playback position line. I think what's important is dragging the playback position to the beginning of the song, maybe even further. Oh and i have to play the song a bit, doing it right after it played doesn't make this crash happen.
Here is a video of me reproducing it: https://streamable.com/9vow0
The project file: uno.zip
Confirmed. Here's part of the stack trace:
#0 0x00005555556d13d4 in PlayHandle::PlayHandle(PlayHandle::Types, int) ()
#1 0x00005555556c9d5e in NotePlayHandle::NotePlayHandle(InstrumentTrack*, int, int, Note const&, NotePlayHandle*, int, NotePlayHandle::Origins) ()
#2 0x00005555556ca2f2 in NotePlayHandleManager::acquire(InstrumentTrack*, int, int, Note const&, NotePlayHandle*, int, NotePlayHandle::Origins) ()
#3 0x000055555569de6e in InstrumentFunctionNoteStacking::processNote(NotePlayHandle*) ()
#4 0x0000555555802a09 in InstrumentTrack::playNote(NotePlayHandle*, float (*) [2]) ()
#5 0x00005555556c9736 in NotePlayHandle::play(float (*) [2]) ()
For some reason this is null in the constructor, I'm going to investigate this issue.
Thanks for helping and that fast replying!
Okay, I found the reason.
When stacking or arpeggio is turned on, the mixer worker thread creates a new NotePlayHandle for sub-notes. Since there are multiple instruments with stacking enabled, Multiple worker threads may call NotePlayHandleManager::acquire simultaneously.
However, NotePlayHandleManager::acquire only uses read lock unless the pool is empty. It means two threads may try to take one from the pool if there's the only one available.
https://github.com/LMMS/lmms/blob/a685049627483cd71a5286a355861e0a00affacc/src/core/NotePlayHandle.cpp#L573-L581
I guess #4443 may fix this issue, but that's for future versions(likely 1.3.0 or so). I will try to find a way to address this issue for 1.2.