musescore / musescore/MuseScore

File corruption after implode of partial measure

Open
#34,518 2 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

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

Description

Issue type

File corruption

Description with steps to reproduce
  1. extract and open corrupt_after_implode.zip
    Score after opening
  2. select first measure of piano
  3. hold shift and select first beat of second measure in oboe (now the first measure and the first beat of the second measure is selected over all systems)
    Score after selecting measures
  4. Tools > Implode
    Score after applying implode

Expected behavior: Both instrument voices are imploded into the piano voice for the first measure and the first beat of the second measure.
Actual behavior: While the implode operation technically works, the second measure is now corrupted, showing only on quarter note. Saving the file leads to a warning and Ctrl+Z reverts the operation, but leaves the measure in the corrupted state:

Score after reverting the implode operation with Ctrl+Z
Supporting files, videos and screenshots

Two more examples. The selected ranges for the implode operation were
(a) 1.1 to 2.1 (inclusive),
(b) 3.4 to 4.1 (but 4.4 technically as selecting the whole note rest expands the range in measure four to the full measure), and
(c) 5.1 to 4.1.
Image

In which versions of MuseScore Studio is this issue present?

4.0 - 4.7.4, latest nightly build

Regression

No.

Operating system

Ubuntu 24.04 LTS

Additional context

As normal implode on full measures works perfectly fine, it has something to do with selecting only partial measures. This is usually done by having the start of the range not at the first beat of a measure or the end of the range not at the last beat of a measure, so one voice with multiple notes per measure and another voice with whole notes. In the example above we can see that the selected range in the piano voice only spans part of the second measure, but the whole note rests are highlighted in blue (correct) and probably evaluated as their full length when considering what to replace. But this is only a guess.

Checklist
  • This report follows the guidelines for reporting bugs and issues
  • I have verified that this issue has not been logged before, by searching the issue tracker for similar issues
  • I have attached all requested files and information to this report
  • I have attempted to identify the root problem as concisely as possible, and have used minimal reproducible examples where possible

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.