musescore / musescore/MuseScore

Legacy note-line endpoint placement is lost when creating parts or saving and reopening

Open
#34,853 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P2
Dominant language
C++
Stars
15.1k
Forks
3.3k
Avg merge
2d 2h
Merged PRs (30d)
91

Description

Issue type

Engraving bug (incorrect score output)

Description and steps to reproduce

Note-anchored lines imported from an older score lose their endpoint placement when copied into a part or when the score is saved and reopened as MSCX. Their appearance changes without resetting their shapes and positions.

  1. Open note-line.mscz (ZIP), the existing official vtest/scores/note-line.mscz fixture.
  2. Observe the four note-anchored lines.
  3. Open Parts, select Flute, and choose Open selected.
  4. Compare the line endpoints with those in the master score. The line in measure 4 also shifts relative to its beginning text.

Actual: the new part uses different endpoint placement. Independently, a native full-score MSCX save/reopen also changes the placement in the master and its part.

Expected: both copying and saving preserve the imported placement until the user explicitly resets it.

Videos

The desktop recordings show the part-creation path; the MSCX roundtrip is covered separately by the native regression test.

Before

https://github.com/user-attachments/assets/2b18c2de-2298-44cb-ae29-b99683f25527

With the candidate fix

https://github.com/user-attachments/assets/ab97bd7f-4c41-4daa-bd16-b046ec879063

Version and environment

Reproduced on official main 48dcc3d469d7b61d8fb371ba84edba0bc6ba1c06. Ubuntu 24.04.2, Qt 6.10.2, GCC 14, Debug/AddressSanitizer, software rendering under Xvfb. First affected release is not established.

Additional context

Legacy conversion sets NoteLineEndPlacement::LEFT_EDGE to retain the old appearance. The copy constructor omits that member, and the current writer/reader do not persist its noteLinePlacement property, so it falls back to OFFSET_ENDS.

The native regression checks all four lines, direct clones, an actual excerpt, and full-score MSCX save/reopen with the excerpt. It also checks the default placement after an explicit property reset. It fails on the unmodified main baseline; the candidate fix passes all 59 Engraving_PartsTests.

PR #24992 introduced the new note-line representation and explicitly preserved the appearance of older scores until reset. Related #33741 concerns cross-staff endpoint editing after reloading; this narrower reproduction does not establish that it is the same defect or that the candidate resolves it.

Candidate fix: #34854.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the note-line.mscz fixture and the native regression test described in the issue, then inspect the note-line copy constructor and MSCX writer/reader. Done means the four imported lines retain endpoint placement in the master score and excerpt, while explicit property reset still uses the default placement; the relevant Engraving_PartsTests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.