Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Native crash when loading achievements

Discussion in 'iOS and tvOS' started by rzubek, Apr 18, 2018.

  1. rzubek

    rzubek

    Joined:
    Aug 21, 2014
    Posts:
    72
    We keep seeing random crashes when using Unity APIs for iOS GameCenter. This happens very randomly, across various devices with iOS 11.2.x and 11.3.

    It looks like a null pointer exception when it's trying to call back after loading achievements.

    This doesn't seem to be an error in our app logic - the callback in game code is super simple, and works for most of sessions. Any ideas?

    The game was built with Unity 2017.3.0p2 or 2017.4.1f1 LTS and XCode 9.2 on Unity Cloud Build. Crash logs:

    Code (CSharp):
    1. 0   .                                  0x0000000000000000 <unknown>
    2. 1   project                        0x0000000105daf2e8 il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**)
    3. 2   project                        0x00000001057f66f8 scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool)
    4. 3   project                        0x00000001057fd288 ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool)
    5. 4   project                        0x000000010557afec InvokeGameCenterCallback(char const*, ScriptingArguments const&)
    6. 5   project                        0x0000000105578ad0 void GameCenter::TriggerCallback<ScriptingObjectPtr, ScriptingArrayPtr>(char const*, ScriptingObjectPtr const&, ScriptingArrayPtr const&)
    7. 6   project                        0x0000000105578730 __39+[AchievementWrapper loadAchievements:]_block_invoke
    8. 7   GameCenterFoundation           0x000000019e46acbc __39-[GKDispatchGroup notifyOnQueue:block:]_block_invoke.63
    9. 8   libdispatch.dylib              0x00000001834f0b24 _dispatch_call_block_and_release
    10. 9   libdispatch.dylib              0x00000001834f0ae4 _dispatch_client_callout
    11. 10  libdispatch.dylib              0x00000001834fd6e0 _dispatch_main_queue_callback_4CF$VARIANT$mp
    12. 11  CoreFoundation                 0x0000000183ba7070 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
    13. 12  CoreFoundation                 0x0000000183ba4bc8 __CFRunLoopRun
    14. 13  CoreFoundation                 0x0000000183ac4da8 CFRunLoopRunSpecific
    15. 14  GraphicsServices               0x0000000185aa7020 GSEventRunModal
    16. 15  UIKit                          0x000000018daa578c UIApplicationMain
    17. 16  project                        0x0000000104a43650 main
    18. 17  libdyld.dylib                  0x0000000183555fc0 start
    (Edited to clarify the crash is after loading achievements specifically)
     
    Last edited: Apr 20, 2018
  2. AG_VR

    AG_VR

    Joined:
    Dec 19, 2017
    Posts:
    5
    We got exactly the same issue using Unity 5.6.5p3.
    The crash never happened when testing.
    Few times after app publication, I'm recieving crash reports with null pointer on LoadAchievements callback from devices running on iOS 11+
     
  3. mafff

    mafff

    Joined:
    Jan 16, 2015
    Posts:
    16
    Same problem using Unity 2018.3.0f2
     
  4. unity_hgBN-5fN8jGyWw

    unity_hgBN-5fN8jGyWw

    Joined:
    May 8, 2019
    Posts:
    2
    We still got this issue with Unity 2018.2.2. The crash appears on almost iOS version
     
  5. charles_xl

    charles_xl

    Joined:
    Oct 4, 2016
    Posts:
    87
    @rzubek did you ever find a solution for this? we're experiencing the same