Hi,
I know this was asked a lot with different causes. I have read all that I could find on the subject, but I am still stuck - so any help would be greatly appreciated.
Here is the story:
- Upgraded Unity from 3.5.7 to 4.2.
- Successfully upgraded my project (all the
SetActive
stuff mostly) - The project runs in the Editor, no errors.
- The project used to run with Unity 3.5.7 on the device with no problems.
- I am now getting a crash with
EXC_BAD_ACCESS
when I load my third scene. - I have enabled NSZombies in Xcode to try and better understand whats going on, its still cryptic for me.
- I have tried attaching MonoDevelop debugger, but I didn’t see anything I can use (I am not usually using MonoDevelop so I could be missing some debug technique).
- The exact same thing happened to me with another project, when upgraded to an older Unity 4 version (and this was the reason I avoided upgrading for so long).
- UPDATE: Managed to get it to not crash in the simulator, still crashing on the device.
- UPDATE: I have created an “export package” for my entire project, and reloaded it into a new blank project. At first, it seemed to be working, but then I realized it still crashes, only at a different place now…
- UPDATE: I since managed to eliminate the crash, it is caused by a bug in Unity 4.2 where DewviceID is not retained. I have learned it from this forum thread, and I am waiting for either Unity support or a more advanced user to post an authoritative fix for us to implement in the DeviceSettings.mm file (for DeviceID, VendorID, and ADID)
Finally, here are two screenshots: One, without NSZombies (generating EXC_BAD_ACCESS
) and one with NSZombies (generating EXC_BREAKPOINT
- needless to say, I did not place any breakpoint…)
Without NSZombies:
With NSZombies: