Skip to content

Crash if lyrics text is empty or contains line breaks #31986

Description

@mercuree

Issue type

Crash or freeze

Description with steps to reproduce

  1. Create empty project from treble clef template and fill two measures with quarter notes
  2. Create text document, add some text and two line breaks, copy its content with line breaks
  3. Add lyrics to the first note in measure 2 and copy/paste text with line breaks
  4. Save/close/reopen the file
  5. Add lyrics to the first note in measure 1, type dash (or space bar) several times until Musescore crashes

After saving the file in step 4, it appears to be in an invalid state (contains empty <text/> element)
Other interactions with the lyrics are possible that will also lead to a crash.

Supporting files, videos and screenshots

  1. Crash with empty lyrics. File contains empty <text/> element.
EmptyLyricsCrash.mp4
  1. Crash with a file, saved in Musescore 4.6.5. File contains <text> element with line break.
EmptyLyricsCrash465.mp4

In which versions of MuseScore Studio is this issue present?

At least since 4.1.1. I was unable to reproduce it in 4.0.2.

Regression

Yes, this used to work in a previous version of MuseScore 4.x

Operating system

windows 10

Additional context

This issue is based on a report from https://musescore.org/en/node/388983

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

Metadata

Metadata

Assignees

Labels

P1Priority: HighcrashIssues involving a crash of MuseScoreregression MS4Regression on a prior release

Type

Fields

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions