craigsapp / humlib

Humdrum data parsing library in C++
http://humlib.humdrum.org
BSD 2-Clause "Simplified" License
31 stars 8 forks source link

musicxml2hum aborts when converting file exported from a musescore file #46

Open pierre-dlsi opened 3 years ago

pierre-dlsi commented 3 years ago

The attached MusicXML file, exported from a Musescore file, makes musicxml2hum abort at the _Toolmusicxml2hum::convertOttavaToHumdrum() function.

I don't know exactly which is the culprit. May be the MusicXML file is ill-exported by Musescore. musicxml2hum aborts due to lines humlib.cpp:54401-54406 computing a 'staffindex' value equal to -1, which causes the program to abort due to an 'out_of_range' exception at line 54412. May be the use of 'atoi()' in that code produces some undefined behaviour.

exported_by_musescore.zip