Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loader: Crash when advancing records #15

Closed
dandoore opened this issue Nov 15, 2021 · 4 comments
Closed

Loader: Crash when advancing records #15

dandoore opened this issue Nov 15, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@dandoore
Copy link

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

@dandoore dandoore changed the title Crash when advancing records Loader: Crash when advancing records Nov 15, 2021
@stefandrissen
Copy link
Owner

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

  • I copied 2.34 to record 62
  • booted
  • shift + cursor left 7 times to get to record 1
  • cursor right 6 times
  • no problem

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

@stefandrissen stefandrissen added the bug Something isn't working label Nov 15, 2021
@dandoore
Copy link
Author

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

SAM-C.zip

@dandoore
Copy link
Author

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
Copy link
Owner

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 f50933f

stefandrissen added a commit that referenced this issue Nov 22, 2021
First three sectors of file read to check if internals look like a mod.
When too small, a few pops are forgotten resulting in a crash.
An earlier change, discarding files smaller than 2108 bytes already
covered this bug up.

Fixs #15

Also some initial work on moving mod format constants out to mod.i.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants