MusicXML export: overlapping dashed text lines (<dashes>) are all exported with duplicate number="1"
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 70/100
Direzione di ricerca
Il bug si trova in ExportMusicXml::textLine in src/importexport/musicxml/internal/export/exportmusicxml.cpp, dove il ramo dei trattini cerca uno slot libero usando l'helper delle parentesi invece di quello dei trattini. Inizia leggendo quel ramo e come vengono usati m_dashes e m_brackets, poi importa il file in.musicxml di 2 battute dal report ed esportalo per confrontare gli attributi number. È completato quando due linee tratteggiate concorrenti vengono esportate con numeri distinti e i test esistenti dell'export MusicXML continuano a passare.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Issue type
Import/export issue
Description with steps to reproduce
When exporting two or more concurrent dashed text lines (<dashes>) to MusicXML, MuseScore Studio exports all of their <dashes type="start"> and <dashes type="stop"> elements with number="1" instead of distinct MusicXML number attributes (number="1", number="2", ...).
- Save the minimal 2-measure MusicXML below as
in.musicxml(Measure 1 startsrall.with<dashes type="start" number="1"/>above the staff andsmorz.with<dashes type="start" number="2"/>below the staff; Measure 2 stops both). - Import and re-export to MusicXML (
MuseScore4.exe -o out.musicxml in.musicxml, or openin.musicxmlin MuseScore Studio and choose File > Export > MusicXML). - Inspect the
<dashes>elements inout.musicxml.
Actual behavior:
out.musicxml writes number="1" on every <dashes> element:
<dashes type="start" number="1"/>
<dashes type="start" number="1"/>
...
<dashes type="stop" number="1"/>
<dashes type="stop" number="1"/>
This makes overlapping vs. nested dashed text spans ambiguous to downstream MusicXML consumers.
Expected behavior:
Concurrent <dashes> spans receive distinct number attributes (number="1" and number="2"), matching how <bracket> lines are numbered.
Supporting files, videos and screenshots
Minimal reproducible in.musicxml:
<?xml version="1.0" encoding="utf-8"?>
<score-partwise version="4.0">
<part-list>
<score-part id="P1"><part-name>Piano</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>
<direction placement="above">
<direction-type><words font-style="italic">rall.</words></direction-type>
<direction-type><dashes type="start" number="1"/></direction-type>
</direction>
<direction placement="below">
<direction-type><words font-style="italic">smorz.</words></direction-type>
<direction-type><dashes type="start" number="2"/></direction-type>
</direction>
<note>
<pitch><step>C</step><octave>5</octave></pitch>
<duration>4</duration><voice>1</voice><type>whole</type>
</note>
</measure>
<measure number="2">
<direction placement="above">
<direction-type><dashes type="stop" number="1"/></direction-type>
</direction>
<direction placement="below">
<direction-type><dashes type="stop" number="2"/></direction-type>
</direction>
<note>
<pitch><step>C</step><octave>5</octave></pitch>
<duration>4</duration><voice>1</voice><type>whole</type>
</note>
</measure>
</part>
</score-partwise>
In which versions of MuseScore Studio is this issue present?
4.7.7 (4.7.7.261109195), also present in current main (08d70c1a6ae0f5553603507c32e6db5379ad75d9)
Regression
I was unable to check
Operating system
Windows 11
Additional context
Root cause in src/importexport/musicxml/internal/export/exportmusicxml.cpp (ExportMusicXml::textLine, lines 5805–5817 on 08d70c1a6ae0f5553603507c32e6db5379ad75d9):
if (isDashes) {
n = findDashes(tl);
if (n >= 0) {
m_dashes[n] = nullptr;
} else {
n = findBracket(nullptr); // <-- calls findBracket(nullptr) instead of findDashes(nullptr)
if (n >= 0) {
m_dashes[n] = tl;
}
Because findBracket(nullptr) searches m_brackets rather than m_dashes, whenever m_brackets[0] is empty it returns 0 (number="1") for every new dashed line, overwriting m_dashes[0]. Replacing findBracket(nullptr) with findDashes(nullptr) allocates free slots in m_dashes as intended.
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
- Lingua principale
- C++
- Stelle
- 15.5k
- Fork
- 3.4k
- Merge medio
- 2g 18h
- PR unite (30g)
- 114
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
-
ninja_build.sh -t compile_commands fails: `cmake ..` points at build/ instead of the repo rootApertaneeds review regression MS4
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
I maintainer di solito rispondono entro 2 giorni
-
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 2 giorni
-
needs review
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 2 giorni
-
needs review
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
musescore/MuseScore#35683 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
The capitalization in the Transpose dialog is inconsistentForse già presa @joshuaallgaier2-cmd l’ha presa 9 giorni fa. Apertacommunity UI
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 76/100
musescore/MuseScore#35658 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di musescore/MuseScore
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
component: tabs platform: macOS
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
zen-browser/desktop#16860 ·
I maintainer di solito rispondono entro 1 giorno