MIDI File stops importing at 61%

I have a midi file that refuses to import (gets stuck at 61% in the progress bar)
any ideas?
attached bellow:
gnossiennes sketch.mid (34.8 KB)

I show it stuck at 71%, but RAM use suddenly jumpts to 54% and CPU to 100%.


It looks like there is something odd about this MIDI file.
When I opened it with APPlayMIDI, it showed a playing duration of over 888 hours!

I also was able to open it with WavePad Audio Editor. When I scrolled to the end of the play window, the duration displayed was 6 minutes and 52 seconds. Similarly for VLC.
There is actually just over 3 minutes of music in the file.

It successfully imports into Sibelius, MuseScore 3 and MuseScore 4.
Here is the MIDI file after importing and then exporting from each of those three applications
The file size and the duration of the file differ between the Sibelius and the MuseScore versions.

GnSk from Sib.mid (27.6 KB)

GnSk from MS3.mid (21.4 KB)

GnSk from MS4.mid (21.4 KB)

Wow, this is so weird. never happened to me before. I exported this midi from Studio One.

Dumping out the MIDI file as text, it’s easy to see the problem:

1, 1151999880, Marker_t, "Start"

You have a marker with text “Start” at tick 1151999880. Remove that and re-export the MIDI file and everything will be well.

I think Dorico will eventually open the MIDI file, but only after creating tens of thousands of empty bars, which is what’s taking so much time. Much quicker to just fix the MIDI file in your sequencer!