Skip to content
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

Crash on MusicXML import of score with marcato, tenuto and staccato in the same note #19186

Closed
Jojo-Schmitz opened this issue Aug 27, 2023 · 3 comments · Fixed by #20248
Closed
Assignees
Labels
crash Issues involving a crash of MuseScore MusicXML P1 Priority: High regression Regression on a prior release

Comments

@Jojo-Schmitz
Copy link
Contributor

Jojo-Schmitz commented Aug 27, 2023

Issue type

Crash or freeze

Bug description

Importing a MusicXML previously exported from MuseScore causes crash

Steps to reproduce

  1. Take the score (mscz) from https://musescore.org/en/node/354050 and open it in MuseScore
  2. Export it as MusicXML
  3. Import it in any Mu4 version

Or

  1. Take the MusicXML file (mxl) from https://musescore.org/en/node/354050 and import it in and Mu4 version

Result in either case:

Crash!

(Instead of taking the files from musescore.org you can take them from the attached)
music388-389.zip

Screenshots/Screen recordings

No response

MuseScore Version

4.1.1, should be in 4.1.0 too, Happens in 3.7 also

Regression

Yes, this used to work in MuseScore 3.x and 4.0 and now is broken

Operating system

Windows 11

Additional context

Suspected code came in via #16828, as far as I can tell the crash happens in bool MusicXMLParserNotations::skipCombine(const Notation& n1, const Notation& n2), in any of the first 3 statements

bool MusicXMLParserNotations::skipCombine(const Notation& n1, const Notation& n2)
      {
      bool placementsSpecifiedAndDifferent = n1.attribute("placement") != "" &&
                                             n2.attribute("placement") != "" &&
                                             n1.attribute("placement") != n2.attribute("placement");
      bool upMarcatoDownOther = (n1.name() == "strong-accent" && n1.attribute("type") == "up" &&
                                n2.attribute("placement") == "below") || 
                                (n2.name() == "strong-accent" && n2.attribute("type") == "up" &&
                                n1.attribute("placement") == "below");
      bool downMarcatoUpOther = (n1.name() == "strong-accent" && n1.attribute("type") == "down" &&
                                n2.attribute("placement") == "above") || 
                                (n2.name() == "strong-accent" && n2.attribute("type") == "down" &&
                                n1.attribute("placement") == "above");
      bool slurEndpoint = _slurStart || _slurStop;
      return placementsSpecifiedAndDifferent || upMarcatoDownOther || downMarcatoUpOther || slurEndpoint;
      }

Apparently MuseScore is trying to combine Marcato, Tenuto and Staccato rather than just 2 of them (Marcato and Staccato or Marcato and Tenuto)

@muse-bot muse-bot added crash Issues involving a crash of MuseScore regression_ms3 Regression from MS3 (3.6.2) labels Aug 27, 2023
@Jojo-Schmitz
Copy link
Contributor Author

Also a regression vs. 4.0, apparently

@bkunda bkunda added MusicXML P1 Priority: High regression Regression on a prior release and removed regression_ms3 Regression from MS3 (3.6.2) labels Aug 29, 2023
@rettinghaus
Copy link
Contributor

Also happens with the combination of <accent/>, <staccato/> and <strong-accent/>.

@Jojo-Schmitz
Copy link
Contributor Author

Yes, any combination of 3. Or more than 2?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash Issues involving a crash of MuseScore MusicXML P1 Priority: High regression Regression on a prior release
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

7 participants