Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Come up with a way to handle panics #324

Open
YaLTeR opened this issue Sep 7, 2020 · 0 comments
Open

Come up with a way to handle panics #324

YaLTeR opened this issue Sep 7, 2020 · 0 comments

Comments

@YaLTeR
Copy link

YaLTeR commented Sep 7, 2020

An example application that shows an error dialog with a backtrace and exits when a panic occurs within GUI code.

This is an issue I've been thinking about for some time and couldn't come up with an obvious solution for. It's unreasonable to forbid panics, but it's bad UX when the application inexplicably closes.

The problem is further complicated by the fact that the panic could occur in odd places such as GObject methods (constructed, etc.) and callbacks on another thread.

Since currently unwinding through C frames (GTK included) is undefined, an approach that comes to mind is to show a blocking dialog from within the panic hook and then abort once the dialog is closed. I'm not familiar enough with GTK to know if that can be done though. How do other languages handle critical errors in GTK applications?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant