Rosegarden fails to load certain (rare) MIDI files, instead giving the "Attempt to get more bytes than expected on track" error. This happens because a few obscure MIDI files have an extra unused padding byte at the very end, thus, by Rosegarden's bookkeeping, after the last event on the track is read there is still a byte left on the track, causing Rosegarden to keep reading, expecting a complete event to be found. This will always fail since a single byte cannot accommodate any event along with its deltatime. Attached is a patch which, instead of reading events strictly until there are no bytes in the track left, allows 1 byte to be left unread; this byte is taken to be padding and is skipped.
Committed revision 13604.