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

Game grashes when paused for too long #6

Open
luksamuk opened this issue Jan 7, 2025 · 3 comments
Open

Game grashes when paused for too long #6

luksamuk opened this issue Jan 7, 2025 · 3 comments
Assignees
Labels
bug Something isn't working Engine Changes involving engine code (mostly C or MIPS assembly)

Comments

@luksamuk
Copy link
Owner

luksamuk commented Jan 7, 2025

When the game is paused, if it remains that way for too long, it crashes. The game simply freezes.

I managed to reproduce this bug and I think it might be related to something in screen_level.c's code and BGM callbacks. Perharps this could be reproduced with a looping BGM on a new test screen.

@luksamuk luksamuk added the bug Something isn't working label Jan 7, 2025
@luksamuk luksamuk added this to Sonic XA Jan 7, 2025
@luksamuk luksamuk added the Engine Changes involving engine code (mostly C or MIPS assembly) label Jan 7, 2025
@luksamuk luksamuk moved this to Backlog in Sonic XA Jan 7, 2025
@luksamuk luksamuk moved this from Backlog to Ready in Sonic XA Jan 7, 2025
@luksamuk luksamuk self-assigned this Jan 8, 2025
@luksamuk luksamuk moved this from Ready to In progress in Sonic XA Jan 8, 2025
@luksamuk
Copy link
Owner Author

luksamuk commented Jan 9, 2025

Some more information on this bug.

  • I was currently able to reproduce it by playing Surely Wood Zone on Mednafen for about 16 minutes.
  • It crashed when the samples counter was equal to 3250, which is the loop point for the song.
  • I'm not sure if this can be reproduced on PCSX-Redux, since it might crash the entire emulator.
  • It seems more like an infinite loop of some sort. Could be the case that the song is trying to loop within its own callback.
  • Soft-resetting on Mednafen works.

I will now try to reproduce this again with other levels, but it really seems like I might have to delegate the music looping to the update routine instead of using the CD callback itself.

@luksamuk
Copy link
Owner Author

luksamuk commented Jan 9, 2025

Just reproduced this bug on Playground Act 1, at 32:30. Same issue: Game hangs at 4000 samples, which is the looping point for the music.

So IT IS a problem with the CD callback, but simulation might be easier on places with quicker songs such as Surely Wood.

@luksamuk
Copy link
Owner Author

luksamuk commented Jan 9, 2025

Another crash: Eggmanland Zone, samples at 2829 (loop point is 2830). Crashet at 2:27. Might be the easiest way to simulate this. Plus, since Eggmanland is supposed to take more time to beat, this is really, really bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Engine Changes involving engine code (mostly C or MIPS assembly)
Projects
Status: In progress
Development

No branches or pull requests

1 participant