Great comments everyone! Really nice hearing from all these devs experienced with writing crash free apps that never crash with inscrutable tracebacks which after days of investigation turn out to be caused by a DisplayLink driver.<p>It’s refreshing to see your users never angrily contact you to fix crashes you can’t fix and that your only answer is not “sorry you will have to just relaunch the app”<p>Your unfounded assumptions are a delight, indeed I must be doing something wrong and maybe just didn’t put in the work into fixing these errors, and after 6 years of developing the same app and looking at the Sentry dashboard every day and talking to users through email/Discord/Twitter/Reddit/forums and looking at their video recordings and deciphering their explanations and sending them betas and custom utilities that definitely reproduce how the crash is not a user error… sorry, what was I saying?<p>God damn it man, it’s this thing every day here.<p>I just wanted to share a readily made solution for people that are in desperate need of it and have exhausted all other possibilities. I’m not trying to make everyone create crash loops and bringing systems to a grind.
One should be careful about what they put in a signal handler. Doing complex things like calling into Foundation, especially in a signal handler that indicates something has really gone wrong, is probably not a good idea.
Or maybe you've been signed up for free fuzzing by your local government security service. Restarting the app so they can continue probing is only courteous.
Reminds my how Basecamp use to restart their Rails app 400 times/day.<p><a href="https://dhh.dk/posts/31-myth-2-rails-is-expected-to-crash-400-timesday" rel="nofollow noreferrer">https://dhh.dk/posts/31-myth-2-rails-is-expected-to-crash-40...</a>
"My software crashes so often that it's worth the time to automate restarting it" is what I'd expect of a windows user. Has macOS really gotten that bad over the last few years? I remember being forced to use it a long time ago and while it was very limited and special, nothing ever crashed or was visibly buggy.
I'm not really a fan of auto-restart on crash. In some cases, it could cause damage.<p>I consider a crash -<i>any</i> crash, to be my fault. This includes things like yanking out the power cord (which probably will just stop the program counter, as opposed to careening off into the weeds).<p>No matter how abusive the user is, no matter how out-of-band their behavior, my software should <i>never</i> crash.<p>I love crashes. They tend to be easy to fix (of course, thread collisions are another matter). If I can reliably reproduce a crash, I can usually fix it in a few minutes.<p>In iOS, Apple makes it impossible to quit an app. I have heard of developers deliberately forcing a crash to do that, but, if Apple catches you doing it, they'll yank the app. They won't approve apps they can get to crash. In fact, they have, in the past, found crashes that I missed.<p>Just better off, writing software that can handle always-on, and that doesn't crash.