Saving a score with text line and re-opening causes crash
1. Download this file
.
2. Open in TuxGuitar 1.2.
3. Remove all instruments, except 'E. Guitar 4'.
4. 'Save'.
5. Open in MuseScore.
6. Drag Text line from palette to first note.
7. 'Save'.
8. 'Close'.
9. Open the mscz.
Result: Crash.
Note: See attached log. It is also reproducible if you skip the TuxGuitar steps.
Using MuseScore 2.0 Nightly Build (6df1e21) - Mac 10.7.5.
Attachment | Size |
---|---|
Saving a score with text line causes crash (Log).txt | 62.48 KB |
Comments
Two (or more) bugs seem to be acting together in this case.
1- When inserting a line (textline, ottava, etc..), i.e. a spanner with anchor ANCHOR_SEGMENT, the code is setting tick2 even if at tick equal to tick2 there is no actual segment (lines 226-231 of libmscore\cmd.cpp). Therefore, when saving the file, the endSpanner tag for that spanner is not written, and when loading back the file the ending position is automatically set to the end of the score (since tick2 = -1). And here comes into action the second bug:
2- When the line is read back, if a multimeasure rest is the final object of the score, as in the case of the E. Guitar4 part in this sample, the instruction at line 466 of libmscore\line.cpp
m = score()->tick2measure(t);
gives a measure m with parent = 0. This gives a system sys= 0, which causes the crash when it is accessed at line 546 of libmscore\line.cpp:
qreal y = (*sys)->>staves()->isEmpty() ? 0.0 : (*sys)->staffYpage(staffIdx());
3- A similar problem happens if you try to drop the text line over the rest in the first bar: in this case the crash happens at the same line of libmscore\line.cpp, since in this case the measure is set at line 461 (
m = score()->tick2measure(t);
) and the presence of the multimeasure rest (in the part) gives back a measure with system = 0.Given that the mutli-measure rest bug (issue ##23863) has now been fixed, is this now fixed? Or at least a non-critical bug?
Unfortunately, this is an independent bug.
This bug could probably be partially solved by using tick2measureMM(t) instead of tick2measure(t), but the problem of non-existent endSpanner segment would still remain and the textline upon reopening would span over the full score.
Is there somewhere I can get the test files without registering on the guitar-wossname site?
Hi MarkRS
I don't think you do have to register - there is a link below the sheet music saying 'Download Guitar Pro Tab'.
Normally, it probably would be preferred to upload everything pertaining to the subject for improved presentation and accessibility, but I avoid doing it with these kinds of files because I didn't author them and they are often copyrighted.
Thanks!
Clicking that button asks me to register.
You can download the gp3 file from that page by using the second button (the gray one), not the first button (i.e. the green one). It worked for me with Firefox (Firefox 26.0) under Windows 8.
See attached image.
I think the same crash happens for a file created from scratch:
Windows 8, commit 30e0623 (debug build).
marked #24209: Crash when opening attached score as a duplicate. It does have another score that reproduces an almost identical stack trace (just the numbers are slightly different)
Does this relate to #23396: Hairpins become corrupt (no end spanner / tick2 == -1), leading to crash
Also, is this particualr bug limited to scores imported from Guitar Pro? If not, would it be possible to give steps to reproduce from scratch?
I don't see a crash using the file and steps from #7. But nor does it work correctly. Upon reload, the text line is gone, and the stems have flipped on the notes, at least until a Ctrl+A or other operation that forces a relayout.
Stem direction problem should be solved in d6fcb0e4f6
Fixed in ae475eb0fd
Automatically closed -- issue fixed for 2 weeks with no activity.