Sorry for the caps topic, but this is really freaking me out.
I am preparing an update to our App to be submitted soon, and out of the blue I get crashes while running on device (fast no exceptions). It’s the “usual” EXC_BAD_ACCESS but it is intermittent. Some builds are fine, while others crash.
The crashes occur when assyncronously loading a new scene, there are no exceptions thrown when running in Unity or as a development build. The closest I got was an OpenGL command in the XCode debugger while running “slow and safe”.
Again, this started out of the blue and there are no null reference exceptions in the code, nor can this be reliably reproduced. It seems as if Unity builds a corrupted build now and then.
I really don’t know what to do here, so if you have any information that may be helpful I would be very thankful.
Cheers!
Dan
I tried to reproduce the crash to get some more information about it. Well, guess what - I currently can’t.
The crash happened 20+ times before during a period of 1.5 hours. I have rebuilt the project (from Unity) a multitude of times (without any changes) and suddenly the crashes disappeard - and I can’t get them to reappear.
Naturally, it is nice to have them gone, but at the same time I am very worried that this can occur after deployment.
Is there any rational explanation for what happened? Is it possible that my development device got its memory corrupted temporarily?
We’ll see what happens tomorrow…I am not sure whether I want the problem to reoccur or not.
Thanks in advance for any help/info.
Most probably your code is depending on particular script initialization order and in some cases code is accessing content of uninitialized variable. There is dedicated Unity Manual troubleshooting section for tracking down such problems: Unity - Manual: Troubleshooting
Thanks for the reply, but this is not likely.
The crashes happened at the very start of asynchronous loading, well before any code in the new scene being run (I checked that). Also, I code to catch null references, so this shouldn’t be likely.
It appeared more to me as if the scene in question had gone corrupt after compile.
I was having the exact same error, the game was running fine on the iphone but crashed on the IPAD with EXC_BAD_ACCESS. The problem was that the IPAD wasn’t properly connected to the internet; it was connected to the router via wifi but when I tried accessing a page in safari, it just kept loading and the page would never display. I restarted the ipad, checked the “ask to join other networks” and it worked.
Hope this helps anyone having a similar trouble using WWW on IOS.