willowtreeapps / willowtreeapps/vocable-android

[Spike] Think about Crash Handling

Open
#461 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
127
Forks
21
Avg merge
16m
Merged PRs (30d)
4

Description

Currently, when the app crashes due to a bug, the app is closed and the user is returned to their Home Screen.

Since this is an accessibility app, this presents a problem as the user may not be able to re-open the app easily. We would like to handle this situation so that when the app enters an unexpected state, the user is not booted from the app.

The following quote sums up a good approach if possible: "I'm thinking more like we do crash, but we figure out a way to restart the app in a crash scenario" -Paul

Possible solution: ProcessPhoenix

ProcessPhoenix combined with a global exception handler seems like it would do the trick.

If this works, be careful around the infinite restarts situation!

only time this line in an app makes sense :smile:

Runtime.getRuntime().exit(0); // Kill kill kill!

If you all do put it into a global process handler I would pass in the crash # and time of last crash and don’t restart if it’s been > 3 within the last 10 seconds or something like that. Infinite crashes and restarts would be bad

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by evaluating the Android app's global exception handler and the proposed ProcessPhoenix approach, including the suggested protection against repeated restarts; done means a concrete decision on whether crash recovery is feasible without infinite restarts.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
accessibility, mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.