Search Unity

Unity and iOS crash logs

Discussion in 'Editor & General Support' started by zbyhoo, Jan 10, 2014.

  1. zbyhoo

    zbyhoo

    Joined:
    Nov 18, 2013
    Posts:
    14
    It is normal that during game development you have to analyse crash logs, but it's very hard to get any information from them if crash symbolication doesn't work.

    I want to know what is the way to make Xcode work when it comes to crash logs symbolication. Usually I get the following crash description (I'm pasting only crashed thread):
    Code (csharp):
    1.  
    2. Thread 0 Crashed:
    3. 0   <my_games_name>                 0x0123d88c 0xa3000 + 18458764
    4. 1   <my_games_name>                 0x0165a650 0xa3000 + 22771280
    5. 2   <my_games_name>                 0x010fbbac 0xa3000 + 17140652
    6. 3   <my_games_name>                 0x0182b774 0xa3000 + 24676212
    7. 4   <my_games_name>                 0x018cd7c4 0xa3000 + 25339844
    8. 5   <my_games_name>                 0x018cd948 0xa3000 + 25340232
    9. 6   <my_games_name>                 0x018d1bbc 0xa3000 + 25357244
    10. 7   <my_games_name>                 0x018d3ad0 0xa3000 + 25365200
    11. 8   <my_games_name>                 0x0183b8f0 0xa3000 + 24742128
    12. 9   <my_games_name>                 0x0183c188 0xa3000 + 24744328
    13. 10  <my_games_name>                 0x01857f48 0xa3000 + 24858440
    14. 11  <my_games_name>                 0x011a526c 0xa3000 + 17834604
    15. 12  <my_games_name>                 0x0024b0b8 0xa3000 + 1736888
    16. 13  <my_games_name>                 0x0032b9b0 0xa3000 + 2656688
    17. 14  <my_games_name>                 0x00329cc4 0xa3000 + 2649284
    18. 15  <my_games_name>                 0x00260554 0xa3000 + 1824084
    19. 16  <my_games_name>                 0x00260454 0xa3000 + 1823828
    20. 17  <my_games_name>                 0x013e162c 0xa3000 + 20178476
    21. 18  <my_games_name>                 0x01472ca0 0xa3000 + 20774048
    22. 19  <my_games_name>                 0x01472c6c 0xa3000 + 20773996
    23. 20  <my_games_name>                 0x0147331c 0xa3000 + 20775708
    24. 21  <my_games_name>                 0x01466de0 0xa3000 + 20725216
    25. 22  <my_games_name>                 0x01467318 0xa3000 + 20726552
    26. 23  <my_games_name>                 0x014758f8 0xa3000 + 20785400
    27. 24  <my_games_name>                 0x013ca8e4 0xa3000 + 20084964
    28. 25  <my_games_name>                 0x01445d04 0xa3000 + 20589828
    29. 26  <my_games_name>                 0x01296b70 0xa3000 + 18824048
    30. 27  <my_games_name>                 0x012408d4 0xa3000 + 18471124
    31. 28  QuartzCore                      0x2fbcc9ca CA::Display::DisplayLinkItem::dispatch() + 94
    32. 29  QuartzCore                      0x2fbcc774 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 340
    33. 30  IOMobileFramebuffer             0x327c676a IOMobileFramebufferVsyncNotifyFunc + 102
    34. 31  IOKit                           0x2e464a72 IODispatchCalloutFromCFMessage + 246
    35. 32  CoreFoundation                  0x2d742e1e __CFMachPortPerform + 134
    36. 33  CoreFoundation                  0x2d74d9dc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
    37. 34  CoreFoundation                  0x2d74d976 __CFRunLoopDoSource1 + 342
    38. 35  CoreFoundation                  0x2d74c14a __CFRunLoopRun + 1394
    39. 36  CoreFoundation                  0x2d6b6c22 CFRunLoopRunSpecific + 518
    40. 37  CoreFoundation                  0x2d6b6a06 CFRunLoopRunInMode + 102
    41. 38  GraphicsServices                0x323aa27e GSEventRunModal + 134
    42. 39  UIKit                           0x2ff5a044 UIApplicationMain + 1132
    43. 40  <my_games_name>                 0x000aa15c 0xa3000 + 29020
    44. 41  libdyld.dylib                   0x38421ab4 start + 0
    45.  
    In the best case scenario Xcode translates methods symbols to:
    Code (csharp):
    1. ___lldb_unnamed_function86553$$<my_games_name> + 200
    I tried different Xcode project settings from this post: http://www.markj.net/ios-crash-reports-unity3d-symbolicate/
    I also tried to symbolicate manually with these instructions: https://coderwall.com/p/ezdcmg
    I tried enabling custom crashes (CrashReport.h: #define ENABLE_CUSTOM_CRASH_REPORTER 1)

    No luck so far.
    I'm using Unity 4.3.1, Xcode 5.0.2, Maverics 10.9.1.

    Can anyone help me? I would really like to have meaningful information from Unity crash logs.
     
  2. zbyhoo

    zbyhoo

    Joined:
    Nov 18, 2013
    Posts:
    14
    No one has encountered these problems? Do you always have clean, readable iOS crash logs from Unity?
     
  3. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,484
    Sorry can't help but wanted to ask about crash logs.

    Did you get yours from Organizer?

    I can see some crash logs in the Device Logs section but the latest ones are not there, i.e I've had crashes today but the logs are all from yesterday.
     
  4. zbyhoo

    zbyhoo

    Joined:
    Nov 18, 2013
    Posts:
    14
    It happened to me also couple of times. Maybe you have installed some third party crash handlers, i.e. from TestFlight and they messing something around.
    There is also define in CrashReporter.h (in Xcode project generated by Unity) called ENABLE_CUSTOM_CRASH_REPORTER. Try setting it to 1 and maybe it will help.

    Try to disconnect device and connect it again couple of times, maybe Organizer will detect some new crash logs if they exists at all.
     
  5. zbyhoo

    zbyhoo

    Joined:
    Nov 18, 2013
    Posts:
    14
  6. Iamdain

    Iamdain

    Joined:
    Feb 3, 2010
    Posts:
    90
    Zbyhoo, your script looks great but when I run it it just creates an empty file. Console output is:
    If I put an echo in to track the while loop it seems it only runs once. Any idea why this might be?
     
  7. zbyhoo

    zbyhoo

    Joined:
    Nov 18, 2013
    Posts:
    14
    What is your command to execute this script?
    I see on my blog that I've made a mistake, correct usage is the one in example, and should be:
    symbolicate_crash.sh <archive_dir> <app_name> <crash_log> [<output_file>]
     
  8. zbyhoo

    zbyhoo

    Joined:
    Nov 18, 2013
    Posts:
    14
    Thanks to a guy (mbeard8906) who commented my blog post I updated my script to not having some hard coded paths, so maybe my script will work for you now.

    One more thing, you should have installed on your computer at least Xcode 5 version. Fresh install of Xcode 6 is missing a tool that I'm using to symbolicate crash logs.
     
  9. peixiaohu

    peixiaohu

    Joined:
    Feb 28, 2015
    Posts:
    5
    my unity app run on ios , often crash . but dont create a crash log. why ?

    please help....
     
unityunity