After some more investigation, it seems to always crash with the same call stack. See attached backtrace, thread #1 at the bottom of the file. The crashing function is called a few times previously without crashing. Thread #14 also has MuseScore-related functions, but I don't quite understand where they fit in. Thread #1 has the same call stack as the one I saw in the debugger.
Setting a break point there shows that this is called very many times. I't have expected it to be called only once on opening the playpannel, maybe some endless loop and a stack overflow
This issue indeed seems to be introduced by changes made for #275313: Reworking the Mixer UI.
Among other changes there were some changes made to awl library used for slider UI in play panel. Reverting change of this line of code fixes this issue. So we should either rework that mixer UI to avoid this change or rework play panel code to handle such signal loops properly.
Comments
Confirmed
#275313: Reworking the Mixer UI
After some more investigation, it seems to always crash with the same call stack. See attached backtrace, thread #1 at the bottom of the file. The crashing function is called a few times previously without crashing. Thread #14 also has MuseScore-related functions, but I don't quite understand where they fit in. Thread #1 has the same call stack as the one I saw in the debugger.
Strangely no (good, usefull) stack trace when running in QtCreator's debugger (MinGW Qt 5.9.7, 32bit)
Remove tempoSlider->setValue(val); from playpanel.cpp line 230. This will prevent the crash.
Hmm, that code hasn't been touched in ages, not since 2012 (initial commit to git)
I did not says this is the proper fix. It just prevents the crash.
Setting a break point there shows that this is called very many times. I't have expected it to be called only once on opening the playpannel, maybe some endless loop and a stack overflow
Right
When the slider value is set, then the relative value is changed and then the slider value is set and then ...
Indeed, AddressSanitizer confirms it is a stack overflow most probably deriving from an infinite recursion, see attached log.
This issue indeed seems to be introduced by changes made for #275313: Reworking the Mixer UI.
Among other changes there were some changes made to
awl
library used for slider UI in play panel. Reverting change of this line of code fixes this issue. So we should either rework that mixer UI to avoid this change or rework play panel code to handle such signal loops properly.In reply to This issue indeed seems to… by dmitrio95
This should fix it:
https://github.com/musescore/MuseScore/pull/4176
Fixed in branch master, commit ac5bcd58c5
fix #278194 Fix crash opening play panel
No longer emitting event if value unchanged.
Fixed in branch master, commit 704401be5d
Merge pull request #4176 from blackears/278194-crash-opening-play-panel
fix #278194 Fix crash opening play panel
Automatically closed -- issue fixed for 2 weeks with no activity.