OPL3BankEditor icon indicating copy to clipboard operation
OPL3BankEditor copied to clipboard

Can't load AIL bank fm_banks/opl_files/sample.opl

Open jpcima opened this issue 7 years ago • 6 comments

It's failing at this point with a size check, with insLen of value 226.

https://github.com/Wohlstand/OPL3BankEditor/blob/6c0d2404844e4127717b4108dcdeced489cc3df4/src/FileFormats/format_ail2_gtl.cpp#L173-L177

jpcima avatar Aug 30 '18 23:08 jpcima

Huh? Is it's a single instrument that has ultimately big size? It's nosense! Gotta to check after I'll apply high-tone patch (I have found a quicker way to don't modify instrument structure!) on libADLMIDI...

Wohlstand avatar Aug 30 '18 23:08 Wohlstand

Anyway, yeah, it's need to extend size of idata structure into 25, and when taking ultimately big value of chunk length, skip unnecessary shit that is out of range... Or... Is it's possible an offset caused by miss-seek?

Wohlstand avatar Aug 30 '18 23:08 Wohlstand

Disregard my old comment about a too small buffer, as I missed a line of code insLen -= 2. I can make the reading pass by taking the 24 head bytes and skipping the rest; however it's to check if the result are going to be valid instruments.

jpcima avatar Aug 30 '18 23:08 jpcima

Let's check how XPlay (XMIDI player from AIL2 set) deals with it:

xplay-src.zip

Wohlstand avatar Aug 31 '18 01:08 Wohlstand

I have made the quick experiment, and it have opened the bank, but, the junk crap have appeared in "Bank 1"

Wohlstand avatar Aug 31 '18 01:08 Wohlstand

Still need to analyze the thing...

Wohlstand avatar Aug 31 '18 01:08 Wohlstand

Closing as abandoned. If something needed, pleas re-open.

Wohlstand avatar Nov 25 '23 03:11 Wohlstand