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
Page layout incorrect and crash when opening file #17517
Comments
I can't reproduce the incorrect layout in 4.0.2. |
@mike-spa the crash seems to be caused by your recent changes (itemToAlign is null): |
If it helps, the score where I am seeing this crash (#17533) began life via MusicXML import around the time of the 4.0 beta, and I had to do a fair amount of cleanup of "mid-measure" dynamics that weren't attached in a meaningful way. Scanning my score, I see a couple I missed, in bar 123 low woodwinds, and sure enough deleting those allows the score to load in master. Probably it was a bug that the MusicXML import was able to add those dynamics to segments with no notes or rests, but I assume that's something you're planning to support along with the ability to attach hairpins to any beat. |
I can confirm that the horizontal justification error occurs because there exists a Segment of ChordRest type with duration = 0 (which clearly shouldn't be there). In turn, the reason why that segment exists is that it holds the "p" dynamic in the second to last measure, Cymbal staff. If you delete the "p" or move it, the segment will become empty and thus be deleted, which fixes the layout. I don't think this state can be reached by editing in Musescore, so I would assume that the problem is migration-induced. It would probably need some more investigation. Anyway, I've inserted a check to ignore these spurious segments, which protects the layout. The crash was just due to a forgotten nullcheck (also fixed). |
Issue type
UI bug
Bug description
In 4.0.2:
In the attached score (file: Concierto de aranjuez + drums-incorrect-version.mscz), the last page is not formatted correct.
Concierto de aranjuez + drums-incorrect-version.mscz.zip
Right page margins is not observed.
The previous version of the file (file: Concierto de aranjuez + drums-correct-version.mscz) is showing a correct last page.
Concierto de aranjuez + drums-correct-version.mscz.zip
To get to the incorrect formatted last page, change the SP from 1.55mm to 1.45mm.
I think there are more difference between these files, but this seems to cause the incorrect layout.
Two options to fix this have been found:
Both files, when opening in today's master build, are causing a crash.
Steps to reproduce
Open Concierto de aranjuez + drums-incorrect-version.mscz
Change the SP from 1.55mm to 1.45mm.
Screenshots/Screen recordings
See bug description
MuseScore Version
4.0.2, 4.1 master
Regression
No.
Operating system
Windows 11
Additional context
Note that the score was downloaded from ms.com, opened in MS4 and after this reset page formatting, reset all styles to default, reset shapes and positions. Next starting updating to the desired forma/layout I want to have, renamed the parts and generated the parts (and closed them).
The text was updated successfully, but these errors were encountered: