MusicXML import hangs on `<other-notation>` without a `smufl` attribute (regression from 3.x)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
Direzione di ricerca
Inizia in src/importexport/musicxml/internal/import/importmusicxmlpass2.cpp, in MusicXmlParserNotations::otherNotation(); l’issue indica che l’omissione dell’elemento dipende dall’attributo smufl. Controlla la gestione vicina dell’importazione MusicXML ed esegui il file minimo fornito con il comando di importazione. Il lavoro è completato quando il file viene importato senza bloccarsi in assenza di smufl e la forma con smufl continua a essere gestita.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
Importing a valid MusicXML file that contains <other-notation> without a smufl attribute never finishes. <other-notation> is part of the MusicXML 4.0 schema, and smufl is optional (type is the only required attribute). MuseScore 3.6.2 imports the same file.
To reproduce
- Save the file below as
other-notation-minimal.musicxml(one measure, one note; it validates against the MusicXML 4.0 XSD).
<?xml version="1.0" encoding="UTF-8"?>
<score-partwise version="4.0">
<part-list>
<score-part id="P1"><part-name>Voice</part-name></score-part>
</part-list>
<part id="P1">
<measure number="1">
<attributes>
<divisions>1</divisions>
<key><fifths>0</fifths></key>
<time><beats>4</beats><beat-type>4</beat-type></time>
<clef><sign>G</sign><line>2</line></clef>
</attributes>
<note>
<pitch><step>C</step><octave>4</octave></pitch>
<duration>4</duration>
<type>whole</type>
<notations>
<other-notation type="single">x</other-notation>
</notations>
</note>
</measure>
</part>
</score-partwise>
- Open it in MuseScore Studio 4.7.7, or run
MuseScore4.exe -o out.pdf other-notation-minimal.musicxml. - The import does not finish (I killed it after 40 s; the process does not exit by itself).
Expected
The file imports, ignoring the element, or importing it as the smufl form does. The same file with <other-notation type="single" smufl="articStaccatoAbove">x</other-notation> imports normally.
What I found
- The hang happens for every form tried without
smufl:type="single"with and withoutnumber, an empty element, text content,type="start"/"stop"pairs, and next to other<notations>children.<other-technical>,<other-ornament>and<other-direction>do not hang. - Reading the source at tag v4.7.7 (
src/importexport/musicxml/internal/import/importmusicxmlpass2.cpp):MusicXmlParserNotations::otherNotation()(line 9668) callsm_e.skipCurrentElement()only insideif (!smufl.empty()). Withoutsmuflthe element is not consumed, so the reader is out of step with the document afterwards. That the desync causes the hang is my inference; I did not find the looping code.mainhas the same code (line 9749 when I read it). - 3.6.2 (
importmxmlpass2.cpp) has noother-notationbranch, so its genericskipLogCurrElem()skips the element. - Suggested fix: call
m_e.skipCurrentElement()in theelsecase too (or after theif), so the element is always consumed.
Environment
MuseScore Studio 4.7.7 (4.7.7-261109195), Windows 11, command-line and the same behaviour expected from the GUI (the GUI was not tested).
- Lingua principale
- C++
- Stelle
- 15.5k
- Fork
- 3.5k
- Merge medio
- 2g 19h
- PR unite (30g)
- 124
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di musescore/MuseScore
-
Edit string data dialog opens empty, with no strings and 0 frets, from "Instrument/Staff properties"Forse già presa @igorkorsukov l’ha presa 2 giorni fa. ApertaP2 regression nightly UX/interaction
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
musescore/MuseScore#35829 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
MusicXML export: overlapping dashed text lines (<dashes>) are all exported with duplicate number="1"Apertacommunity MusicXML
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
MusicXML import loses explicit slur direction when the stop precedes the start in document orderApertaneeds review
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
needs review
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
needs review
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
musescore/MuseScore#35683 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di musescore/MuseScore
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100
azahar-emu/azahar#2944 ·
I maintainer di solito rispondono entro 1 giorno
-
[request] md4qt/5.5.0Apertaupstream update
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
conan-io/conan-center-index#31637 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Niko1221/Strata#7777 · 1 reazione ·
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
I maintainer di solito rispondono entro 1 giorno