stefandrissen / SAM-MOD-player

SAM MOD player, an Amiga MOD player for the SAM Coupé
https://www.worldofsam.org/products/sam-mod-player
15 stars 0 forks source link

Loader: Crash when advancing records #15

Closed dandoore closed 2 years ago

dandoore commented 2 years ago

When moving through records I can cause a crash.

Mod player is in Record 62. Use Shift+Back to go back to Record 1 Try and advance to record 6 - crashes after record 5

stefandrissen commented 2 years ago

I am unable to reproduce this with SimCoupe and v2.34.

It may be related to .m files being scanned for if they are a mod, any chance you can share an hdf with reproducible?

dandoore commented 2 years ago

You are bang on - it's this image that it dies on, reproducable in SimCoupe when inserted as drive 1:

SAM-C.zip

dandoore commented 2 years ago

There are two files CC.MAC and ZEUS.MAC that look likely candidates, but I guess the commit to skip small files witll fix this

stefandrissen commented 2 years ago

Yes, it is either file, if the first three sectors could not be read (to check if the internals look like a mod) the loop progresses to the next file, but forgets to pop two values from the stack. This is nicely covered up by the minimum file size check, since a 2108 byte file requires more than three sectors.

So yes, professionally covered up by f50933ff830c40af9988d23dc247047a5e0a454e