Lyrics: select all and "X" causes program to freeze
Reported version
3.0
Priority
P0 - Critical
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project
OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.0.1.4922, revision: 598057d
Open the attached file. Take the reset or not, the issue is still the same. Right-click on a lyric, chose "Select > All similar elements." Then press Ctrl + R to reset.
Result: The program freezes.
Attachment | Size |
---|---|
piano_song.mscz | 31.78 KB |
Fix version
3.0.3
Comments
I can confirm using the provided score and another random one I tried that was not a 2.x import, but I could not reproduce in a new score I created from scratch. Not sure what the trigger is.
The trigger is the shortcut (how?) combinated to the number of lyrics to reset.
From scratch:
1) Default score
2) Enter notes and lyrics on first system (with eg custom X offset, but not necessary in fact)
The test file at this step (here default 0 offset): lyrics 1 system.mscz
3) Right-click syllable -> All similar elements
4) Ctrl + R
First result: you note the lyrics remain highlighted a few seconds, before the program becomes again available.
5) Add notes and lyrics on another system.
The test file in this case: lyrics 2' systems.mscz
6) Repeat steps #3 and #4
Result: the program freezes and shuts down after some seconds.
You note, by testing and adding lyrics progressively (one measure on second system -> Ctrl + R, then on two measures, ditto, and three etc. ), and more and more the program suffers to recover its availability. And so, about two systems is enough, and the program gives up.
Note also: by resetting lyrics via the appropriate button in Inspector (automatic placement checked or not): no problem.
All of that time is spent updating the Inspector. Ideally, we would only want to update the Inspector once, after all of the ScoreElements' properties are changed, instead of every time a ScoreElement's placement property is changed.
I liked the original title better.
Adding these lines at the beginning of ScoreElement::undoChangeProperty() seems to solve the problem
The idea is that if there is nothing to change, then there is nothing to do. Part of the problem is that changing the placement for a single lyric will change the placement for all lyrics on that line. So by the time we move on to the next selected lyric, we have already called ScoreElement::undoChangeProperty() on that lyric, and all other lyrics on the line, and we are about to do it again. And again. And again, and so on. And updating the Inspector is expensive.
PR is here: https://github.com/musescore/MuseScore/pull/4553.
Fixed in branch master, commit 94b6b8f951
fix #281411: Lyrics: select all and reset causes program to freeze
Fixed in branch master, commit f902d05d34
Merge pull request #4553 from mattmcclinch/281411-reset-lyrics
fix #281411: Lyrics: select all and reset causes program to freeze
Is this fix really in 3.0.1? I still see it. Same issue pressing "X".
Confirmed (to still/again happening)
See https://musescore.org/en/node/282206#comment-888255 for sample score.
Issue (with Ctrl + R) fixed here. EDIT: with the test files here: https://musescore.org/en/node/281411#comment-884786
But not with the attachment: All of me 3.0.mscz
And indeed, "X" freezes, too, the program (on test files, and attachment)
And I notice the same behaviour before the first fix (January 14)
I used inspector's reset button and it hung
The operation takes several seconds to complete, during which time the application appears to have hung. But unless you kill the program, the operation does complete.
I waited several minutes. But i selected all lyrics first.
Actually it still hangs, more than a hour later
Same here. Changing the placement directly via the Inspector does succeed after several seconds, and so does Ctrl+R actually, but the reset button in the Inspector and the "X" command both freeze.
1) load the All of Me score referenced above
2) right click a lyric
3) Select / All Similar Elements
4) "X" or click reset button on placement field in Inspector
Result: freeze. I waited several minutes as well.
So, I propose fixing this by simply removing the code that flips all elements when only a single element is selected. I can see why that might have seemed a clever helpful thing to do, but it's not really needed, and it makes it impossible to flip just a single lyric when you want - see #282629: Lyrics can not be be placed above/below staff individally, only the whole verse. We already provide ways of selecting all lyrics for a given verse / voice, just use that and press "X".
https://github.com/musescore/MuseScore/pull/4684
Fixed in branch master, commit a444ee1919
fix #282629, fix #281411: flip only selected lyrics
Fixed in branch master, commit 368a691c1f
_Merge pull request #4684 from MarcSabatella/282629-flip-lyrics
fix #282629, fix #281411: flip only selected lyrics_
Fixed in branch 3.0.x, commit 90797fb5e0
_Merge pull request #4684 from MarcSabatella/282629-flip-lyrics
fix #282629, fix #281411: flip only selected lyrics_
Automatically closed -- issue fixed for 2 weeks with no activity.