- Status Closed
- Percent Complete
- Task Type Bugs
- Category Music playback
- Assigned To No-one
- Operating System Iriver H100 series
- Severity Medium
- Priority Very Low
- Reported Version
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
FS#5311 - MIDI :freeze when "header chunk size invalid"
I’m using the CVS build which is right after the commit from 7 May 07:27.
I have put the recommended sound patches, and the MIDI works on most files.
However, I have a problem with that MIDI file : http://vgmusic.com/music/console/nintendo/gameboy/lapower.mid When loading it, it displays “Header Chunk size invalid.” and then freezes, after what i have to reset the H120.
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
Aah, okay. Thank you. The freezing is a bug that needs to be fixed.
I have checked out the file and it is not regular MIDI. It should have an extension .rmi, and the header on it is in fact 'RIFF' instead the standard 'MTHD'. I hope to add support for this soon; as far as I can remember, .rmi (RIFF) is just a wrapper around a standard MIDI file, which should be the data within the RIFF data block.
Yep-
00000000 52 49 46 46 1C 10 00 00 52 4D 49 44 64 61 74 61 RIFF….RMIDdata
00000010 0F 10 00 00 4D 54 68 64 00 00 00 06 00 01 00 03 ….MThd…….
Right now I have to go work on a class project but I will look into this within the next few days.
Steve
The two things should be fixed in CVS. That file now should play and the loader should gracefully bail out if it sees something weird. As for the actual RIFF header, this is where I am a little confused. They say RIFF is Microsoft's way of prepending a 12-byte header to a MIDI file and calling the result "Windows MIDI". But all in all, there are actually 16 bytes of stuff following the 'RIFF'… so, 20 bytes total. I guess 12 bytes of stuff besides the 'RIFF' and its length field. Who knows? Right now the progra, skips 16 bytes worth of junk and sees a valid MThd header. Let me know if you have other files that refuse to play.
Thanks
Steve
The bug is solved, thanks !