36 points · by alin23 · 3y ago · 52 comments
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”
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?
God damn it man, it’s this thing every day here.
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.
Your application may crash due to:
- hangs / spins - memory corruption - programmer error / faulty logic (think loooping infinitely) - thermals / memory usage
Let launchd handle restarting your application by allowing the user a “Relaunch” button
https://dhh.dk/posts/31-myth-2-rails-is-expected-to-crash-40...
This is not good for battery life. I'm not sure how to heuristically detect hangs in a power-friendly way.
But when I'm not connected to an SMB drive, I don't think I've had a single crash in years.
I have no idea if it's something in the SMB driver itself that's crashing, or assumptions inside of application logic that fail in certain SMB scenarios.
All io access needs to be recoverable or catchable for your app not to crash. You’d be surprised how much background fs activity there can be in apps (or indirectly triggered by apps!) all the time.
So many areas where rust makes me deal with a result or option that are easy to take for granted. It’s a strong reminder of the number of things we should be treating as possible error cases
I'm building a macos app now, and only because I wasn't catching fs access error did I realize I needed to handle folder access carefully when using bookmarks in core data.
But from a dev perspective, that's probably a driver level issue because that's where you want to handle or propagate errors instead of crashing.
Maybe the better question would be if the OS SDK is to a state that doing naughty things is easier to do, but again, that's not the OS
This is insulting even for windows users.
I don't recall ever having an issue that was fixed by restarting an application though. If it doesn't work, I read the error message to figure out why it doesn't work and fix that. No "just try again, it might work this time" like on windows, which I enjoy.
I consider a crash -any 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).
No matter how abusive the user is, no matter how out-of-band their behavior, my software should never crash.
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.
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.
Just better off, writing software that can handle always-on, and that doesn't crash.
It used to be that a single tech support call cost us any profit from 3 copies of the product.
Things are different now though - the frameworks on platforms have orders of magnitude more surface and complexity. And most small companies don’t offer 1-1 support anymore.
Swift helps a lot. It has a lot of safety in it. I haven’t had a memory leak in ages.
Also, Xcode has gotten really good at letting me know when I have a future crash.