Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 Ecco · Jun 09, 2011 at 08:18 AM · debugcrash logsymbol

Why does Unity for iPhone disable debug symbols by default and how should we turn it back on?

I recently ran into the problem of submitting an app to Apple that used Unity and iOS 4.3 as base SDK. It ran perfectly on our own devices but it crashed immediately after launch on Steve's iphone. They added a couple of crash logs for me to check out.

Of course to symbolicate the crash log I need DWARF symbols, but apparently Unity by default turns off generating debug info (why?). I switched it on in my project settings and rebuilt the app. Fortunately the UUID hadn't changed so I should be able to use the newly generated symbols with the crash log, right?

Turns out the dSYM files didn't contain any debug info at all. After some inspection I found out that Unity adds some extra linker flags "-Wl,-S,-x". This strips the binary of debug symbols before xcode exports the dSYM folder. Removing this flag unfortunately changes the UUID of the app, so using these symbols to make sense of the crash log that was sent might be a bad idea.

I since found out that I wasn't the only one with the problem so I just resubmitted our game with iOS 4.2. But it has left me wondering why Unity by default makes it impossible for us to make sense of crash logs. Is there some other way we should be debugging our apps?

And why does Unity set those specific flags? Could I not remove those flags and just enable "Strip Debug Symbols During Copy" option to do the same thing but at the appropriate stage?

I hope someone can shed some light on this

Comment
Add comment · Show 1
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 Umai · Aug 06, 2013 at 02:28 AM 0
Share

I switched it on in my project settings and rebuilt the app

How do you turn the debug symbols on?

3 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Mantas-Puida · Jul 04, 2011 at 11:45 AM

These flags save you couple of megabytes on distribution size. When you need to analyze crash just rebuild app without that flag. Code symbol locations will remain the same.

Comment
Add comment · Show 3 · 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
avatar image Ecco · Jul 04, 2011 at 12:05 PM 0
Share

Thanks for the answer! Just want to make sure: removing the -S option changes the UUID of the binary, can you really still guarantee the symbol locations are the same? Also, does stripping the symbols in a post processing step (like xcode does by default) not do exactly the same as the -S linker option?

avatar image markofjohnson · Sep 04, 2012 at 10:47 PM 0
Share

Except when dealing with IAP crack and receipt verification... the app from the app store and a debug install are not the same. I'm left with a stack trace and can't symbolicate it. And that dsym information is stored locally, it doesn't come out with the app store release does it?

avatar image capyvara · Mar 24, 2013 at 01:29 AM 1
Share

I've been able to correctly generate the dSY$$anonymous$$ and still keep the distribution size the same by setting the following configuration on project settings (for Release):

  • Build Options: Debug Information Format: "DWARF with dSY$$anonymous$$ file"

  • Deployment: Deployment Postprocessing: Yes, Strip Symbols During Copy: Yes, Strip Linked Product: Yes, Use Separate Strip: Yes

  • Linking: Remove "-Wl,-S,-x" from Other Linker Flags

  • Apple LLV$$anonymous$$ (or GCC) Code Generation: Generate Debug Symbols: Yes

You can use this code to automatically adjust your project after Unity generates it: https://gist.github.com/Capyvara/5230032

Shipped a couple games with this approach and it seems to be working nicely so far.

avatar image
0

Answer by jonas-echterhoff · Jun 09, 2011 at 09:16 AM

I do not know about the reasoning of why these flags are set, but the crash with iOS SDK 4.3 is a known issue currently being investigated. We sent an email to all iOS developers about this:

Dear Unity iOS Developers,

Unfortunately, many (and probably all) Unity iOS applications built with iOS SDK 4.3 are crashing during the App Store Review process while still running successfully on developer's devices. We have contacted Apple regarding this issue and received confirmation that this is of highest priority to them. Our iOS team is working on a solution as well, but due to complex nature of the problem it will take longer than expected to properly resolve. A currently known workaround is to keep using iOS SDK 4.2.

Many users reported that applications built with Xcode 3.2.5 + iOS SDK 4.2 successfully pass the Apple App Store review process currently. OS SDK 4.2 is not publicly available on the iOS Developer site anymore, but it still can be downloaded via direct link. We want to assure you that building final applications with iOS SDK 4.2 provides all the features the Unity iOS run-time supports and is proven to work fine with devices running older generation iOS (3.x-4.2.x) as well as the newer devices running iOS 4.3.x (like iPad 2).

Please feel free to contact us if you have issues releasing your application to the App Store.

Regards,

The Unity Team

Comment
Add comment · Show 1 · 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
avatar image Ecco · Jun 09, 2011 at 12:26 PM 0
Share

Yeah unfortunately I found this out afterwards :(

avatar image
0

Answer by markofjohnson · Sep 26, 2013 at 05:37 AM

Symbolicated iOS crash reports from Unity games explained: http://www.markj.net/ios-crash-reports-unity3d-symbolicate/

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

6 People are following this question.

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

Related Questions

Crash dumps and debug symbols (oh my) 0 Answers

Can someone explain to me why this raycast doesn't fire straight? 1 Answer

my button cant do anything but write a debug log 0 Answers

Is it possible to extend the playing and debugging process? 0 Answers

Random Blank Loaded Scene 1 Answer


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