3 ms·
> Earlier this week we got a bug report about the game freezing, consuming all of the available RAM, and then crashing when it ran out of RAM. It was again a mo
by bombcar 5y ago
> Earlier this week we got a bug report about the game freezing, consuming all of the available RAM, and then crashing when it ran out of RAM. It was again a modded save file so my first instinct was to blame it on a mod. Again, I had to test it. And again... it's never what you think it is.
> So, I still repeat the phrase: "Crashing on dereferencing null? Just add a null check!" as a reminder to myself and others to always look deeper into why and never stop at the basic symptom of a problem.
I feel this is a very important rule that people often forget - most anytime your "safety" code triggers, something went wrong somewhere else and it can be worth tracking it down.
- pdpi 5y agoIt's a perfect example of how useful it is to think in terms of what invariants should hold and why.