I am slowly making progress with my time-wasting application. I’m getting it to do some stuff, but I just wasted like 4 hours with random crashes and one hard reboot of my computer because apparently Xcode doesn’t catch infinite loops, but instead lets the simulator suck up all existing CPU power.
The worst thing was that the crashes gave no error message at all. Sometimes the crashes were because an array index out of bounds (which it reports with an error sometimes and sometimes not) and one time it crashed seemly randomly and it took me like an hour to figure out that I was accidentally “dividing by zero” when running this piece of code
arc4random() % (5-l)
Where l was a variable for the length of a word. This length can be 5, so sometimes i was trying to do modulus zero. Which apparently crashes the app without errors…
Anyhoooo! Tomorrow I’m going to study more, I swear.
-
DeXimE
-
http://tetrisrockstar.com/ Fredrik




