Reputation: 101
Game used to work fine; I believe it was after upgrading Unity to 4.5 that the error appeared. The game Shows an image in the first scene, which is displayed correctly. After changing scene, though, the game crashes.
On the XCode debugger I keep seeing the message "EXC_BREAKPOINT (code=EXC_ARM_BREAKPOINT, subcode=0x7ffdefe)"
The console displays the following messages:
2014-07-05 16:10:22.996 MyGame[5934:707] <Google> Test ads are only available on iOS 6+.
Unhandled Exception: UnityEngine.UnityException: WWW is not finished downloading yet
at UnityEngine.WWW.get_responseHeaders () [0x00000] in <filename unknown>:0
at GoogleAnalytics.LogScreen (System.String title) [0x00000] in <filename unknown>:0
at LogoGlow.Start () [0x00000] in <filename unknown>:0
(Filename: /Applications/buildAgent/work/d63dfc6385190b60/artifacts/iPhonePlayer-armv7Generated/UnityEngineDebug.cpp Line: 49)
In the Unity editor, I get the "WWW is not finished downloading yet" error, but the game runs just fine (only without ads), and I am able to run it perfectly on Android.
I'm sorry for the lack of information, but its the first time I use Unity/Xcode and I haven't been able to find anything useful online :/
Upvotes: 1
Views: 3204
Reputation: 101
Whelp, I fixed it by changing the Script Call Optimization option on the player settings in Unity to "Slow and Safe". Thanks for the help though!
Upvotes: 2
Reputation: 1094
One thing that is important to keep in mind is that Unity3D will continue to run a project even when there are runtime errors. It may not mean that everything will run as expected, but sometimes the subtle differences can be hard to see. It is not uncommon for an error to not cause a hangup in Unity, but to cause a crash on your iOS device.
So what I would is go back to your Unity script and start exactly where the Xcode log suggested, i.e., at LogoGlow.Start(). I know this is a pain, but comment out every line in that Start() method, and add them back in one by one, each time running it until the error occurs in Unity. Then, try to determine what it is that you're doing before the download finishes that you shouldn't be doing. I can't see your code, but are you yielding on your www download? (yield www;)
If you want to post the relevant code from your Unity script, it may help a bit. But I would just reiterate that this type of scenario is not uncommon when building for iOS.
Upvotes: 3