Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #289562: add missing blockSignals() calls on updating Mixer controls #5060

Merged
merged 1 commit into from
May 24, 2019

Conversation

dmitrio95
Copy link
Contributor

Fixes https://musescore.org/en/node/289562, or, at least, the symptoms of this issue.

Why this fix works

Not blocking signals from port and channel sliders on updating their values made instrumentsChanged flag in MasterScore be set to true every time these values were updated. MuseScore::endCmd() triggers such an update every time if both Mixer exists and that flag is set to true. Fortunately a bit later endCmd sets this flag to false again but this doesn't manage to happen if the score has just been opened. The workaround by pressing Escape button before adding an instrument mentioned here works exactly because it makes endCmd() be called and, thus, resets the mentioned flag to false.

Why the issue appeared only in 3.1-RC

The issue became much more visible after merging #5011 which caused Mixer object be created regardless of being actually displayed. In fact, the issue exists at least from 3.0.4 version (probably 3.0.3 but I tested it only on 3.0.4). In order to reproduce the issue on the versions before 3.1-RC one should open a Mixer window before executing steps 4-5 from this comment.

Although this fix works the more fundamental problem is probably having a somewhat invalid instruments and channels state at the moment when MuseScore::endCmd() gets executed on updating a score here. Without that the signals blocking issue fixed here would cause only a small negative performance effect rather than a crash. This more fundamental issue should probably be addressed later but this patch should also be good to apply regardless of that.

@anatoly-os anatoly-os merged commit a0ed18c into musescore:master May 24, 2019
@dmitrio95 dmitrio95 deleted the 289562-add-instrument-crash branch April 26, 2020 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants