beeware / beeware/briefcase-linux-flatpak-template
Stub binary doesn't display stack trace on crash
- Dominant language
- C
- Stars
- 4
- Forks
- 14
- Avg merge
- 5h 19m
- Merged PRs (30d)
- 6
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.
Contributor guide
Research direction
Start by locating the Linux stub application in this template and review how the Flatpak base image exposes GTK or Qt. Compare the analogous problem in beeware/briefcase-linux-system-template#37, then define the crash behavior for GUI and console apps, including console fallback when no supported toolkit is available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100