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

Print every exception before sending it across IPC #32

Merged
merged 2 commits into from Mar 21, 2022

Conversation

haroldadmin
Copy link
Owner

This PR fixes the issue where very large stacktraces override the original exception in WhatTheStack.

  • WhatTheStack uses a multi-process setup to show the exception screen after a crash
  • The thrown exception is parsed in the host application's process, and then sent across to a different process that runs WhatTheStackService.
  • Android places a limit on the size of IPC messages. Some exceptions lead to very large stack traces (such as StackOverflowException), which cause this limit to be exceeded.
  • In such cases, the process of transferring the parsed exception data to another process causes another exception to be thrown, which then overwrites the original exception.

It's not easy to workaround the IPC message size limitation. This PR adds code to log the original exception to make it's information is available through the logcat.

Fixes #31

@haroldadmin haroldadmin added the bug Something isn't working label Mar 18, 2022
@haroldadmin haroldadmin merged commit dbe12fe into main Mar 21, 2022
@haroldadmin haroldadmin deleted the fixes/print-exceptions branch March 21, 2022 03:40
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

Successfully merging this pull request may close these issues.

Large exceptions (such as stack overflow error) can crash the library, eating the original exception
1 participant