Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by DannyB · Aug 30, 2013 at 12:05 PM · ioscrashunity 4upgradeexc_bad_access

Help debugging crash on iOS EXC_BAD_ACCESS

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:

  1. Upgraded Unity from 3.5.7 to 4.2.

  2. Successfully upgraded my project (all the SetActive stuff mostly)

  3. The project runs in the Editor, no errors.

  4. The project used to run with Unity 3.5.7 on the device with no problems.

  5. I am now getting a crash with EXC_BAD_ACCESS when I load my third scene.

  6. I have enabled NSZombies in Xcode to try and better understand whats going on, its still cryptic for me.

  7. 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).

  8. 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).

  9. UPDATE: Managed to get it to not crash in the simulator, still crashing on the device.

  10. 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...

  11. 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:

alt text

With NSZombies:

alt text

crash2.png (117.8 kB)
crash.png (115.8 kB)
Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image dannyskim · Aug 30, 2013 at 07:42 PM 0
Share

Have you modified the XCode project at all? If you have, did you make sure to do a build and replace when building from Unity to push the updated h / m files to XCode.

I could be mistaken, but the errors are being shown directly in your XCode console. Unrecognized selector sent to instance is stating that you're sending a method call ( i.e. selector ) to an object instance that does not have an implementation for that specific signature / selector.

$$anonymous$$essage sent to deallocated instance should be an obvious error. Something has been released and you're still trying to call methods on it.

avatar image DannyB · Aug 31, 2013 at 06:14 AM 0
Share

Thanks for commenting. I have spent the entire day yesterday in trying to figure it out, and the process involved replacing the Xcode build several times, as well as refreshing the Unity Library folder by deleting it and letting Unity rebuild from meta files. Still no luck.

I did not change anything in Xcode, and the reported error does not tell me anything, thats exactly my point... :)

$$anonymous$$y code works in the editor, it worked on the device in Unity 3.5, and since I do not have device specific code, I expect it to work on the device just the same. Something in Unity 4 changed and I have no idea how to debug it.

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by DannyB · Sep 03, 2013 at 01:35 PM

Ok,

So as it turns out, this particular crash was caused by a bug in Unity 4.2, as discussed in this forum thread.

After retaining the _DeviceID, all worked smoothly, and as it seems from the changelog, Unity 4.2.1 fixes this bug.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

17 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

GpuProgramsMetal.mm Crashing on iOS 1 Answer

Unity iOS Crashes Every Other Launch 0 Answers

Unity 5.5.0f3 IOS Crash After Screen Sleep 3 Answers

Native Crash - ___ZN19HTTPConnectionCache11enableTimerEv_block_invoke (Unknown File) 0 Answers

How do you make IOS storyboard launch screens work? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges