Skip to content

Print every exception before sending it across IPC#32

Merged
haroldadmin merged 2 commits intomainfrom
fixes/print-exceptions
Mar 21, 2022
Merged

Print every exception before sending it across IPC#32
haroldadmin merged 2 commits intomainfrom
fixes/print-exceptions

Conversation

@haroldadmin
Copy link
Copy Markdown
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