Crash on change sound for channel added via instrument change
Reported version
3.0
Priority
P0 - Critical
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
No
Project
1) default empty score
2) add an instrument change text from the palette somewhere within the score
3) open mixer
4) open the piano column to show both channels
5) select the second (new) channel
6) change sound using details dropdown
Result: crash, in Channel::firePropertyChanged
Comments
What do you mean by details dropdown? Changing patch for the new channel doesn't produce a crash for me as well as changing other properties regarding that channel.
https://github.com/musescore/MuseScore/pull/4188
It is indeed a bit finicky to reproduce. I do mean the Patch. For me it's reproducible every time if I follow those steps precisely, bit crash does go away if I get creative and doing other things in there somewhere, like moving a slider. I guess it is a memory management issuI and hence symptoms can appear aottle random?
Above fix is invalid. This one should work:
https://github.com/musescore/MuseScore/pull/4198
I believe this is happening due to listeners not being detached when objects are deleted. I'm using the Qt system now for maintaining listeners, so this will hopefully be more robust. It is tricky, though, to mix Qt with non-Qt code.
Also, I was getting this issue sometimes with moving the volume sliders. This is more an unstable UI issue than something specific to patches.
Another option to fix the issue: https://github.com/musescore/MuseScore/pull/4237
Fixed in branch master, commit c55a7b1064
fix #278499: manage channel listeners properly to avoid invalid pointers
Fixed in branch master, commit 2ad0757abc
Merge pull request #4237 from dmitrio95/278499-notifiers
fix #278499: manage channel listeners properly to avoid invalid pointers
Automatically closed -- issue fixed for 2 weeks with no activity.