subspace / space-acres

Space Acres is an opinionated GUI application for farming on Subspace Network
53 stars 20 forks source link

Automatically restart on crashes #134

Open nazar-pc opened 4 months ago

nazar-pc commented 4 months ago

Since the architecture of Space Acres is to run parent process and then spin up a child process that is an actual app (in order to support restarts, on Linux/macOS to improve logging mechanism, etc.), it is already possible to detect crashes.

What Space Acres does in case of a crash right now is to just exit parent process, but it would be more helpful to just restart an app (with backoff mechanism of course) and show a warning in the app that it crashed and user should check logs. In case of running out of memory this would result in a much better experience than just exiting everything.

NOTE: This doesn't address errors that result in soft crashes where child application doesn't technically exit.