-
-
Notifications
You must be signed in to change notification settings - Fork 11
Description
What is the problem or limitation you are having?
If a GUI app published as a system package fails, the stack trace is output to the console. However, if the app has been started from an icon, there will be no console visible, so the app will crash silently.
An easy way to manifest this - add import numpy to your app, without adding numpy to your requirements.
Describe the solution you'd like
On macOS and Windows, the stub binary contains a handler that catches exceptions from the running app, and manifests a system dialog to display the stack trace. In the numpy example, you see an ModuleNotFoundError stack trace, allowing you to diagnose the problem.
Linux system app should have a similar handler.
We should modify the stub application so that it will generate a GTK stack trace dialogs if GTK is available, or a Qt dialog if Qt is available. The flatpak base image that is in use can provide an indication of the available GUI libraries.
Describe alternatives you've considered
Status quo - which is less than ideal.
Additional context
We will still need to handle the case of console apps, where outputting to console is appropriate. This case is handled on macOS and Windows at time of template generation.
Falling back to the status quo (console output) if a supported GUI toolkit can't be found is also an option.
See beeware/briefcase-linux-system-template#37 for an analogous problem with system packaging.