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

Proper exception handling #560

Open
1 task done
fruityloops1 opened this issue Jan 28, 2025 · 0 comments
Open
1 task done

Proper exception handling #560

fruityloops1 opened this issue Jan 28, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@fruityloops1
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

What feature are you suggesting?

Citra's code base by default attempts to completely ignore all invalid writes, invalid reads, invalid PC addresses, and other exceptions that happen in user space. This makes some games more ""stable"" by having certain crashes ignored and the game still runs fine. In all other cases, the state of the code that has generated the exception is obviously not going to work anymore if you try to continue running it, and will just loop generating the same exception to be ignored over and over again, clogging the log and leaving the emulator in a confusing, frozen state as it attempts to keep running this code that has already crashed.
The feature request would be the following:

  • Implement proper crash handling (add a dolphin-esque popup detailing the crash that allows you to exit the emulation or ignore the exception, and also have a look at the full crash information with all of the registers)
  • Implement arm11 exception handlers (function pointer in the TLS that is usually called by the kernel with a pre-configured stack when an exception occurs)
  • Implement signals for the GDB stub that match the exception types (similar to luma's gdb)

Why would this feature be useful?

Without this feature, crashes are confusing for the end user, and literally undebuggable for homebrew/mod developers. It would also allow for custom crash handlers to run, instead of being ignored. This is more accurate and transparent.
(has this ever been addressed before? yuzu had the same problem…)

@fruityloops1 fruityloops1 added the enhancement New feature or request label Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant