MusicXML import - attempting to fix badly read triplets causes crash
Reported version
3.0
Priority
P1 - High
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
No
Workaround
Yes
Project
Steps:
Import the xml file
in the third bar, on the third beat, click on the little "3" digit (the upper one)
press delete -> crash
(the musicXML file was exported from a music OCR software)
Attachment | Size |
---|---|
O_Mati_vznesena.xml | 239.71 KB |
Fix version
3.3.0
Comments
Which build are you using (see Help / About, click the button next to "Revision" and paste here).
I don't see a crash in current build.
In reply to Which build are you using … by Marc Sabatella
Picture added to show exactly what to click on (what thing to select before you press delete key)
It crashes when I use this:
OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.0.0, revision: 6ba431b
also crashes with the newest one I've just downloaded and with 2.3.2
OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.0.0.4424, revision: 01e2f04
Using commit a9203cb, the crash is 100% reproducible for me. Divide by zero on "if (f > l)" on line 307 in libmscore/edit.cpp.
The offending triplet is indeed malformed: duration is set to 1/0, baseline is empty. Assume a MusicXML import issue.
Dividing by 0 is not good indeed, but not as critical as other issues. So need to be fixed asap after release. Workaround is to edit and fix the malformed triplet in the musicxml file.
In reply to Dividing by 0 is not good… by Anatoly-os
This issue is not as serious as it looks:
- it happens only for a malformed tuplet (in which case the MusicXML importer fails to correctly initialise all tuplet data structures)
- it happens only the first time after loading the MusicXML file (saving in MuseScore format and then loading the MuseScore file solves the issue)
Furthermore, the fix is not entirely trivial and will take some time to correctly implement
In reply to This issue is not as serious… by Leon Vinken
After investigating the various ways in which a malformed MusicXML tuplet crashes MuseScore, my conclusion is:
- the structural solution should be to always create a complete tuplet (filling with rests if necessary) even if the tuplets are incomplete or malformed in the MusicXML file
- this is not just "non-trivial", but actually a quite a complex change, requiring a redesign of the note handling in the MusicXML importer
- nevertheless I feel this is worthwhile, as the note handling code currently is overly complex and should be improved
In reply to After investigating the… by Leon Vinken
Structural solution implemented, pull request 4950 (https://github.com/musescore/MuseScore/pull/4950).
Fixed in branch master, commit dbd64797ce
fix #279828 - MusicXML import - attempting to fix badly read triplets causes crash
includes major tuplet handling redesign
Fixed in branch master, commit b6d30457a9
_Merge pull request #4950 from lvinken/tuplet-calc-fractions-004
fix #279828 - MusicXML import - attempting to fix badly read triplets…_
Automatically closed -- issue fixed for 2 weeks with no activity.