musescore / musescore/MuseScore

MusicXML is not validated against schema anymore since Qt 6

Open
#23,726 5 comments 0 reactions 1 assignee View on GitHub

@igorkorsukov is already working on this.

Since Jul 23, 2024.

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

Description

The MusicXML import code doesn't contain a lot of error handling, because before any reading is done, the XML file was validated against the MusicXML schema. That gave guarantee that the input is sane, so not much further error handling was necessary.

But in Qt 6, the XmlPatterns module, which contained the XML schema validator, was inexplicably removed. It is not immediately clear what to use as a replacement, as there are many XML libraries of differing sizes and qualities, and only few of them contain schema validation functionality. And extra work will be necessary to make these libraries fit into our code.

As a result, there is no validation at all, so insane MusicXML files will just be passed to the MusicXML importer which is not necessarily prepared for that.

To be clear, this issue does not affect valid MusicXML files in any way; it only affects how robust MuseScore is against invalid MusicXML files.

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.