android-rs-glue icon indicating copy to clipboard operation
android-rs-glue copied to clipboard

Show a popup if the main thread panics

Open tomaka opened this issue 9 years ago • 2 comments

The app freezing or showing a black screen is not very useful and does not indicate what's wrong.

This should probably be done by overriding the default panic handler instead of using catch_panic, so that the user can override this behavior if wanted.

tomaka avatar Sep 01 '16 18:09 tomaka

Unfortunately since we're calling start manually, there's no way to either override the panic handler or to use catch_panic.

In my opinion the best thing to do is try detect the words thread <main> panicked in stderr, and open a popup when it happens.

tomaka avatar Sep 08 '16 09:09 tomaka

Reference: https://developer.android.com/guide/topics/ui/dialogs.html#AlertDialog

tomaka avatar Jul 25 '17 18:07 tomaka