[MusicXML import] crashes MS 2.1 871c8ce
See https://musescore.org/en/node/267534.
Cause seems to be a corruption in the note start time calculation, debugging shows weird timestamps such as 298029592/-50151680.
See https://musescore.org/en/node/267534.
Cause seems to be a corruption in the note start time calculation, debugging shows weird timestamps such as 298029592/-50151680.
Comments
Importing this file leads to subtracting Fraction 25200/100800 from 126000/100800 , which causes a numeric overflow, leading to incorrect timing calculations due to the large denominators being multiplied in an int.
At least for me (OS X, Clang) int is 32 bit.
I guess we are multiplying 100800 by 100800 in this particular case, and it shouldn't really be necessary...
Correct, see pull request 3355.
Note that the Fraction implementation is still vulnerable to overflows (in lcm() and most of the operator*() functions.
In reply to (No subject) by Leon Vinken
Just checked the fix behaviour on 2.2-dev: it indeed fixes the crash and allows the file to be imported.
Fixed in branch master, commit f439497144
fix #267569 numeric overflow causes MusicXML import crash
Fixed in branch master, commit be8fbcdd38
Merge pull request #3355 from lvinken/267569-reduce-mxml-fractions
fix #267569 numeric overflow causes MusicXML import crash
Fixed in branch 2.2, commit 57fce2413a
fix #267569 numeric overflow causes MusicXML import crash
Automatically closed -- issue fixed for 2 weeks with no activity.