Linked staff becomes unlinked (causing corruption) after delete of part
Ubuntu 14.04, GIT commit: 3543170
I guess these steps caused *other* problems in 2.0.2, but the specific problem here is new with the recent changes to linked staves:
1) My First Score
2) generate parts (File / Parts, New All, OK)
3) add linked staff to staff in score (Edit / Instruments, select staff, add linked staff)
4) add note to staff in score and verify links work in both score and part, but part has only the original staff
5) delete the part (File / Parts, select part, Delete)
6) add a note to staff, see that it is not reflected in the formerly linked staff
I find that if I make changes to the measure where I added the first note (step 4), the change isn't linked, but otherwise things seem OK. If I enter a note into a enw measure, however, the full measure rest is deleted from the formerly linked staff, creating a corrupt score.
I guess that latter symptom tells me that the full measures rest thremselves are still linked even though the staves are not (and Edit / Instruments does appear to confirm the staves are no longer linked).
, and eventually corruption results
Comments
Actually, the object debuggers tell me the full measure rests have three links - one to self, one to the other staff in the score, and one still to the deleted part. Whereas the notes and rests in the measure I modified at step 4) are completely unlinked. So if it weren't for the full measures remaining linked - including to the deleted part - this would really just be a case of linked staves becoming unlinked. That's *almost* a feature :-).
A variation, without parts, but with the same symptoms.
1) "My First Score"
2) "I" -> Add two linked staves -> Ok
3) "I" -> Remove the first staff -> Ok
4) Enter notes in the second staff (treble clef)
Result: corruption (whole rests are deleted) in the "new" first staff, bass clef.
I think I have a fix. I will push it on master. More tests are welcome.
Then we will decide if we push this one and the previous PR https://github.com/musescore/MuseScore/pull/2397 to 2.0.3...
Fixed in branch master, commit 4f8cd13198
fix #99796: Linked staff becomes unlinked (causing corruption) after delete of part
Better, but unfortunately, I see an issue with Undo:
With steps similar in comment #2:
1) "My First Score"
2) "I" -> Add two linked staves -> Ok
3) "I" -> Remove the first staff -> Ok
4) Enter a whole note in the first staff.
5) Undo
Result: corruption (the linked note is deleted AND its rest too) in the second linked staff
FWIW, this was true for 2.0.2 as well. Not sure if it is for the same reason (my fix for #50826: Add system text and undo causes crash in score with multiple parts) or not, but lasconic's PR https://github.com/musescore/MuseScore/pull/2462 does seem to fix this case, without breaking the #50826: Add system text and undo causes crash in score with multiple parts, the original steps here in this bug report, or the new ones given above. Whether it still fixes all the other bugs with linked staves I can't say.
This mentioned issue above #50826: Add system text and undo causes crash in score with multiple parts was fixed on March 18, 2015.
But the issue related in comment #5 occurs some days before, around the 14/15 March.
- For sum, I notice that this Nightly works: e96036e
- Not this one: d0e6b72
So, it might be related indeed to this commit: https://github.com/musescore/MuseScore/commit/fa0415be94f9367b9d7391780…
For fix: #50826: Add system text and undo causes crash in score with multiple parts
I am just undecided on one point.
As said, this issue was fixed (by this patch) on March 18: https://musescore.org/en/node/50826#comment-239916 while I see this same day this commit: https://github.com/musescore/MuseScore/commit/89accfaf18ff35e1efb8a37b1…
A bit mixed for the moment about the dates and the commits. Hope better understanding shortly. Or, it's the same fix with a different title of commit? A bit confused for now, sorry. It is late or rather very early in the day!
Fixed in branch master, commit ca474ecd10
fix #99796 again, unlink the requested element, not another one
Fixed in branch master, commit 176a6d7e81
Merge pull request #2462 from lasconic/fix-99796-again
fix #99796 again, unlink the requested element, not another one
Sorry Lasconic, despite your efforts and great progress, not everything is solved :(
I can reproduce a crash easily again from scratch:
Steps (with 176a6d7 / Win7)
1) "My First Score"
2) "I" -> Add two linked staves -> Ok
3) Generate parts -> New all -> Ok
4) "I" -> Remove the staff 2 (bass clef) -> Ok
5) "N" -> enter a note
Result: crash
Sorry, active.
For the record, I can't reproduce the crash with same steps in comment #10 on March 17, 2016 with this nightly: 86c8f02
So, this one: 176a6d7 has broken something which had been fixed in the second half of February 2016 (this issue described above was present in the 2.0.2 already)
More precision soon.
Yes, broken the fix of the 26 February: https://github.com/musescore/MuseScore/commit/8bf08c232818e04150481ceb2…
Indeed, I get a crash with this one: bec7074
Not with this one: c6ccf18
(and so, as reported, again a crash with this one: 176a6d7)
EDIT: More basically, this issue is now reactived: #94911: Crash after deletion of a linked staff in a score with parts
I leave open this issue, because I get crashes (five for now, see below eg) with different operations from those described on comment # 10.
Mainly on Undo after adding / deleting linked staves.
Unfortunately, there is something imponderable or random (or perhaps related to the Auto Save?) Consequently, I am not able yet to reproduce on command.
And a file also, with a corrupted measure (I've never been able to reproduce this issue, but we can see the "configuration" of the score) : test piano.mscz
I managed to get a new crash.
Basically, I use the following steps:
1) My First Score
2) In Instruments dialog, I add a piano
3) I add a linked staff -> ok
4) "I" again: I delete the center staff (bass clef)
5) I enter some quarter notes into 4-8 measures, randomly in the differents staves.
6) Undo, partial or total
7) If nothing happens, I repeat steps #3 (add a linked staff) et #4 (delete a staff), and continue a new time the steps #5 and #6
Most of the time, it works well. And sometimes (very few), I get a crash or a corrupted measure on Undo
Unfortunately, it's still inconsistently, almost unpredictable, and always after a certain time (a time certain) following many entry operations of notes and cancellations. Never quickly. This is why it reminded me to the auto save (but perhaps misconception on my part)
I also managed to get a new corrupt score. This one: My_First_Score1.mscz
This may be a new fact, that might be interesting (?), to advance this issue.
When I reload the file, and I am invited to restore the previous session, to my surprise, it is the "Selection" palette which appears (with all the unchecked radio buttons). While, as usual, I always work with the displayed main palette
This happened two or three times in the tests on this issue. And, from memory, I do not remember any similar cases.
Addendum:
And when, after the "event" described above, I open the 2.0.2, I notice that the main palette is empty!
Reverts well by switching to Advanced or Basic workspace. Or, by deleting my customized workspace and re-creating a new one.
See a sketch for possible further work on trying to solve this very complex bug:
https://github.com/musescore/MuseScore/pull/2473
and related comments on GitHub.
Sorry that I could not perform a deeper work on this (too little free time at the moment).
Ciao,
ABL
I commited several more changes on master about this issue. I believe it's fixed in master. I would love more tests to see if we include it in 2.0.3 or not.
I can not reproduce for now the issues with steps described in initial message, and in comments #2, #5 and #15.
I continued further other tests (add, delete linked staves/ add, delete parts/ undo, redo): for now, all tests have withstood to this shock treatment, violent, rather!
I'm not saying that I have not missed something, but it's definitely better (if not totally solved?), and it would be a shame to not include in the 2.0.3. But only the opinion of a tester.
Other tests today I hope.
Any news? I think I will merge all the linked staves fixes in the 2.0.3 branch.
I can't say I've tested as thoroughly as cadiz1, and we'll need to test more once in 2.0.3 to make sure the code isn't depending on something else that is only in the master, but from what I can see, we should go ahead.
Fixed in branch 2.0.3, commit 9e89dfc8d4
fix #99796: Linked staff becomes unlinked (causing corruption) after delete of part
Fixed in branch 2.0.3, commit 17634f881f
fix #99796 again, unlink the requested element, not another one
Automatically closed -- issue fixed for 2 weeks with no activity.