Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Bug Crash DebugStringToFilePostprocessedStacktrace

Discussion in 'iOS and tvOS' started by C-Gabriel, Dec 2, 2023.

  1. C-Gabriel

    C-Gabriel

    Joined:
    Jan 27, 2016
    Posts:
    119
    Hi,

    We're seeing this crash a lot on iOS in Firebase (25% crash rate) and it seems to happen while the app is in the background. Android seems fine. We have no idea what might be causing it, but it might be related to sending some events via UnityWebRequest when the app goes in the background (some SDKs maybe)

    Unity 2022.3.14f1

    upload_2023-12-2_15-52-22.png

    Code (CSharp):
    1. Crashed: com.apple.main-thread
    2. 0  libsystem_kernel.dylib         0xa01c __pthread_kill + 8
    3. 1  libsystem_pthread.dylib        0x5680 pthread_kill + 268
    4. 2  libsystem_c.dylib              0x27dd0 raise + 32
    5. 3  UnityFramework                 0x1bbf088 DebugStringToFilePostprocessedStacktrace(DebugStringToFileData const&) + 222 (String.h:222)
    6. 4  UnityFramework                 0x1bbf550 DebugStringToFile(DebugStringToFileData const&) + 222 (String.h:222)
    7. 5  UnityFramework                 0x1800968 UnityWebRequestManager::Register(UnityWebRequest*) + 222 (String.h:222)
    8. 6  UnityFramework                 0x180084c UnityWebRequest::UnityWebRequest(MemLabelId) + 251 (UnityWebRequest.cpp:251)
    9. 7  UnityFramework                 0x5ca6fd4 _GLOBAL__sub_I_External_il2cpp_builds_libil2cpp_os_Posix_2.cpp.cold.1 + 36 (External_il2cpp_builds_libil2cpp_os_Posix_2.cpp:36)
    10. 8  UnityFramework                 0x5885aac _GLOBAL__sub_I_External_il2cpp_builds_libil2cpp_os_Posix_2.cpp.cold.1 + 36 (External_il2cpp_builds_libil2cpp_os_Posix_2.cpp:36)
    11. 9  UnityFramework                 0x5884760 _GLOBAL__sub_I_External_il2cpp_builds_libil2cpp_os_Posix_2.cpp.cold.1 + 36 (External_il2cpp_builds_libil2cpp_os_Posix_2.cpp:36)
    12. 10 UnityFramework                 0x5878e74 _GLOBAL__sub_I_External_il2cpp_builds_libil2cpp_os_Posix_2.cpp.cold.1 + 36 (External_il2cpp_builds_libil2cpp_os_Posix_2.cpp:36)
    13. 11 UnityFramework                 0x29b0d74 il2cpp::vm::Runtime::InvokeWithThrow(MethodInfo const*, void*, void**) + 606 (Runtime.cpp:606)
    14. 12 UnityFramework                 0x29b0cbc il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**) + 600 (Runtime.cpp:600)
    15. 13 UnityFramework                 0x1617a68 scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool) + 290 (ScriptingApi_Il2Cpp.cpp:290)
    16. 14 UnityFramework                 0x1624f8c ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool) + 298 (ScriptingInvocation.cpp:298)
    17. 15 UnityFramework                 0x1627b34 ScriptingInvocation::InvokeChecked(ScriptingExceptionPtr*) + 72 (ScriptingInvocation.h:72)
    18. 16 UnityFramework                 0x1676698 SerializableManagedRef::CallMethod(Object&, ScriptingMethodPtr) + 60 (ScriptingNativeTypes.h:60)
    19. 17 UnityFramework                 0x1634260 MonoBehaviour::WillDestroyComponent() + 81 (MonoBehaviour.h:81)
    20. 18 UnityFramework                 0x14478b0 GameObject::WillDestroyGameObject() + 111 (GameObject.cpp:111)
    21. 19 UnityFramework                 0x15237c4 PreDestroyRecursive(GameObject&, unsigned long*) + 612 (dynamic_array.h:612)
    22. 20 UnityFramework                 0x1524054 DestroyObjectHighLevel_Internal(Object*, bool) + 517 (GameObject.h:517)
    23. 21 UnityFramework                 0x151cbb4 CleanupAllObjects() + 431 (SaveAndLoadHelper.cpp:431)
    24. 22 UnityFramework                 0x151d28c CleanupEngine() + 585 (SaveAndLoadHelper.cpp:585)
    25. 23 UnityFramework                 0x152da3c PlayerCleanup(bool) + 701 (Player.cpp:701)
    26. 24 UnityFramework                 0x1c62828 UnityCleanup + 222 (LibEntryPoint.mm:222)
    27. 25 UnityFramework                 0xfcb8 -[UnityAppController applicationWillTerminate:] + 527 (UnityAppController.mm:527)
    28. 26 UIKitCore                      0xe1023c -[UIApplication _terminateWithStatus:] + 196
    29. 27 UIKitCore                      0x139000 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 112
    30. 28 UIKitCore                      0x5f9d6c -[_UISceneLifecycleMultiplexer forceExitWithTransitionContext:scene:] + 164
    31. 29 UIKitCore                      0xe0aea4 -[UIApplication workspaceShouldExit:withTransitionContext:] + 164
    32. 30 FrontBoardServices             0x47fc4 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke_2 + 72
    33. 31 FrontBoardServices             0xe19c -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 168
    34. 32 FrontBoardServices             0x47f64 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke + 128
    35. 33 libdispatch.dylib              0x4300 _dispatch_client_callout + 20
    36. 34 libdispatch.dylib              0x7d48 _dispatch_block_invoke_direct + 284
    37. 35 FrontBoardServices             0xa520 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 52
    38. 36 FrontBoardServices             0xa4a0 -[FBSMainRunLoopSerialQueue _targetQueue_performNextIfPossible] + 240
    39. 37 FrontBoardServices             0xa378 -[FBSMainRunLoopSerialQueue _performNextFromRunLoopSource] + 28
    40. 38 CoreFoundation                 0x3731c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
    41. 39 CoreFoundation                 0x36598 __CFRunLoopDoSource0 + 176
    42. 40 CoreFoundation                 0x34dac __CFRunLoopDoSources0 + 340
    43. 41 CoreFoundation                 0x33a88 __CFRunLoopRun + 828
    44. 42 CoreFoundation                 0x33668 CFRunLoopRunSpecific + 608
    45. 43 GraphicsServices               0x35ec GSEventRunModal + 164
    46. 44 UIKitCore                      0x22c2b4 -[UIApplication _run] + 888
    47. 45 UIKitCore                      0x22b8f0 UIApplicationMain + 340
    48. 46 UnityFramework                 0x138bc -[UnityFramework runUIApplicationMainWithArgc:argv:] + 96 (main.mm:96)
    49. 47 [App Name]                     0x7cac main + 28 (main.mm:28)
    50. 48 ???                            0x1cff2edcc (Missing)
     
  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,738
    This crash should be fixed in latest Unity versions.
    This isn't app going to background, it is terminating (possibly OS lacks resources and decided to shut it down). Sending UnityWebRequest during shut down is a bad idea - it will be aborted, very likely before it was sent.
     
  3. marcus-qiiwi

    marcus-qiiwi

    Joined:
    Jul 29, 2013
    Posts:
    22
    We see the same crash in Unity 2022.3.14f1

    Code (CSharp):
    1. Crashed: com.apple.main-thread
    2. 0  libsystem_kernel.dylib         0xa01c __pthread_kill + 8
    3. 1  libsystem_pthread.dylib        0x5680 pthread_kill + 268
    4. 2  libsystem_c.dylib              0x27dd0 raise + 32
    5. 3  UnityFramework                 0x1a5d670 DebugStringToFilePostprocessedStacktrace(DebugStringToFileData const&) + 222 (String.h:222)
    6. 4  UnityFramework                 0x1a5db38 DebugStringToFile(DebugStringToFileData const&) + 222 (String.h:222)
    7. 5  UnityFramework                 0x16db9a8 UnityWebRequestManager::Register(UnityWebRequest*) + 222 (String.h:222)
    8. 6  UnityFramework                 0x16db88c UnityWebRequest::UnityWebRequest(MemLabelId) + 251 (UnityWebRequest.cpp:251)
    9. 7  UnityFramework                 0x1717784 CrashReporting::CrashReporter::SendReport(CrashReporting::CrashReport&) + 461 (CrashReporter.cpp:461)
    10. 8  UnityFramework                 0x1716d88 CrashReporting::CrashReporter::HandleLog(DebugStringToFileData const&, LogType, bool) + 342 (CrashReporter.cpp:342)
    11. 9  UnityFramework                 0x1a5d7dc CallbackArray3<DebugStringToFileData const&, LogType, bool>::Invoke(DebugStringToFileData const&, LogType, bool) + 405 (CallbackArray.h:405)
    12. 10 UnityFramework                 0x1a5d288 DebugStringToFilePostprocessedStacktrace(DebugStringToFileData const&) + 1026 (LogAssert.cpp:1026)
    13. 11 UnityFramework                 0x1531e24 Scripting::LogExceptionFromManaged(ScriptingExceptionPtr, int, char const*, bool, Scripting::LogExceptionFromMangedSettings const*) + 935 (Scripting.cpp:935)
    14. 12 UnityFramework                 0x153093c Scripting::LogException(ScriptingExceptionPtr, int, char const*, bool) + 947 (Scripting.cpp:947)
    15. 13 UnityFramework                 0x152ff04 ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool) + 310 (ScriptingInvocation.cpp:310)
    16. 14 UnityFramework                 0x1532ac4 ScriptingInvocation::InvokeChecked(ScriptingExceptionPtr*) + 72 (ScriptingInvocation.h:72)
    17. 15 UnityFramework                 0x1581118 SerializableManagedRef::CallMethod(Object&, ScriptingMethodPtr) + 60 (ScriptingNativeTypes.h:60)
    18. 16 UnityFramework                 0x153ecbc MonoBehaviour::RemoveFromManager() + 372 (MonoBehaviour.cpp:372)
    19. 17 UnityFramework                 0x133c434 GameObject::ActivateAwakeRecursivelyInternal(DeactivateOperation, AwakeFromLoadQueue&) + 220 (GameObject.cpp:220)
    20. 18 UnityFramework                 0x133c3bc GameObject::ActivateAwakeRecursivelyInternal(DeactivateOperation, AwakeFromLoadQueue&) + 213 (GameObject.cpp:213)
    21. 19 UnityFramework                 0x133c3bc GameObject::ActivateAwakeRecursivelyInternal(DeactivateOperation, AwakeFromLoadQueue&) + 213 (GameObject.cpp:213)
    22. 20 UnityFramework                 0x133c3bc GameObject::ActivateAwakeRecursivelyInternal(DeactivateOperation, AwakeFromLoadQueue&) + 213 (GameObject.cpp:213)
    23. 21 UnityFramework                 0x133c3bc GameObject::ActivateAwakeRecursivelyInternal(DeactivateOperation, AwakeFromLoadQueue&) + 213 (GameObject.cpp:213)
    24. 22 UnityFramework                 0x133c3bc GameObject::ActivateAwakeRecursivelyInternal(DeactivateOperation, AwakeFromLoadQueue&) + 213 (GameObject.cpp:213)
    25. 23 UnityFramework                 0x133c3bc GameObject::ActivateAwakeRecursivelyInternal(DeactivateOperation, AwakeFromLoadQueue&) + 213 (GameObject.cpp:213)
    26. 24 UnityFramework                 0x133c3bc GameObject::ActivateAwakeRecursivelyInternal(DeactivateOperation, AwakeFromLoadQueue&) + 213 (GameObject.cpp:213)
    27. 25 UnityFramework                 0x133c3bc GameObject::ActivateAwakeRecursivelyInternal(DeactivateOperation, AwakeFromLoadQueue&) + 213 (GameObject.cpp:213)
    28. 26 UnityFramework                 0x133c3bc GameObject::ActivateAwakeRecursivelyInternal(DeactivateOperation, AwakeFromLoadQueue&) + 213 (GameObject.cpp:213)
    29. 27 UnityFramework                 0x133c3bc GameObject::ActivateAwakeRecursivelyInternal(DeactivateOperation, AwakeFromLoadQueue&) + 213 (GameObject.cpp:213)
    30. 28 UnityFramework                 0x133c4dc GameObject::ActivateAwakeRecursively(DeactivateOperation) + 247 (GameObject.cpp:247)
    31. 29 UnityFramework                 0x133c998 GameObject::Deactivate(DeactivateOperation) + 519 (GameObject.cpp:519)
    32. 30 UnityFramework                 0x141d4a0 DestroyObjectHighLevel_Internal(Object*, bool) + 1840 (GameObjectUtility.cpp:1840)
    33. 31 UnityFramework                 0x14153d8 CleanupAllObjects() + 431 (SaveAndLoadHelper.cpp:431)
    34. 32 UnityFramework                 0x1415aac CleanupEngine() + 585 (SaveAndLoadHelper.cpp:585)
    35. 33 UnityFramework                 0x1429f6c PlayerCleanup(bool) + 701 (Player.cpp:701)
    36. 34 UnityFramework                 0x1b03b44 UnityCleanup + 222 (LibEntryPoint.mm:222)
    37. 35 UnityFramework                 0x14008 -[UnityAppController applicationWillTerminate:] + 527 (UnityAppController.mm:527)
    38. 36 UIKitCore                      0xe1023c -[UIApplication _terminateWithStatus:] + 196
    39. 37 UIKitCore                      0x139000 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 112
    40. 38 UIKitCore                      0x5f9d6c -[_UISceneLifecycleMultiplexer forceExitWithTransitionContext:scene:] + 164
    41. 39 UIKitCore                      0xe0aea4 -[UIApplication workspaceShouldExit:withTransitionContext:] + 164
    42. 40 FrontBoardServices             0x47fc4 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke_2 + 72
    43. 41 FrontBoardServices             0xe19c -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 168
    44. 42 FrontBoardServices             0x47f64 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke + 128
    45. 43 libdispatch.dylib              0x4300 _dispatch_client_callout + 20
    46. 44 libdispatch.dylib              0x7d48 _dispatch_block_invoke_direct + 284
    47. 45 FrontBoardServices             0xa520 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 52
    48. 46 FrontBoardServices             0xa4a0 -[FBSMainRunLoopSerialQueue _targetQueue_performNextIfPossible] + 240
    49. 47 FrontBoardServices             0xa378 -[FBSMainRunLoopSerialQueue _performNextFromRunLoopSource] + 28
    50. 48 CoreFoundation                 0x3731c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
    51. 49 CoreFoundation                 0x36598 __CFRunLoopDoSource0 + 176
    52. 50 CoreFoundation                 0x34dac __CFRunLoopDoSources0 + 340
    53. 51 CoreFoundation                 0x33a88 __CFRunLoopRun + 828
    54. 52 CoreFoundation                 0x33668 CFRunLoopRunSpecific + 608
    55. 53 GraphicsServices               0x35ec GSEventRunModal + 164
    56. 54 UIKitCore                      0x22c2b4 -[UIApplication _run] + 888
    57. 55 UIKitCore                      0x22b8f0 UIApplicationMain + 340
    58. 56 UnityFramework                 0x17c58 -[UnityFramework runUIApplicationMainWithArgc:argv:] + 96 (main.mm:96)
     
  4. C-Gabriel

    C-Gabriel

    Joined:
    Jan 27, 2016
    Posts:
    119
    I totally agree, but it's not our SDK and we don't even have access to most of the code. To me it doesn't seem to be fixed in the latest Unity versions since we're using Unity 2022.3.14f1, which is the latest 2022LTS version.
     
  5. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,738
    Right, it dies trying to start UnityWebRequest when it's support has already been shut down.
    Isn't there a way to disable the messages? Even though it's third party sdk, it should give you some control over what it does. And it's a bug in that SDK, sending requests on quit is bogus unless you have control over quit sequence, which is not the case for anyone on mobiles.
     
  6. C-Gabriel

    C-Gabriel

    Joined:
    Jan 27, 2016
    Posts:
    119
    I don't think there's a way to prevent the SDK from send the event. I totally understand what you're saying but if there's an analytics SDK, it also makes sense to try and send an event when the session ends or when the app is closes
     
  7. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,738
    Report a bug for it with a repro project.
     
  8. C-Gabriel

    C-Gabriel

    Joined:
    Jan 27, 2016
    Posts:
    119
    we honestly haven't managed to reproduce it locally yet, despite it happening so often. Have you managed to reproduce it @marcus-qiiwi ?
     
  9. Alan-Liu

    Alan-Liu

    Joined:
    Jan 23, 2014
    Posts:
    396
    The crash happens because Unity sends reports while the application is quiting. I submitted a bug report with a minimal reproducible project: IN-62719. It can reproduce the following crash on Windows in Unity 2022.3.14:
    To avoid it, you can disable Cloud Diagnostics before the application quits, for example:
    Code (CSharp):
    1. using System;
    2. using System.Collections;
    3. using System.Collections.Generic;
    4. using UnityEngine;
    5. using UnityEngine.CrashReportHandler;
    6.  
    7. public class Test : MonoBehaviour
    8. {
    9.     private void Awake()
    10.     {
    11.         // WORKAROUND: enable the following code to avoid the crash
    12. #if false
    13.         Application.quitting += () =>
    14.         {
    15.             CrashReportHandler.enableCaptureExceptions = false;
    16.         };
    17. #endif
    18.     }
    19.  
    20.     private void OnDestroy()
    21.     {
    22.         // Causes the application crashes
    23.         throw new InvalidOperationException();
    24.     }
    25.  
    26.     public void OnClick()
    27.     {
    28.         Application.Quit();
    29.     }
    30. }
    31.  
    Update:
    The public link on issuetracker: https://issuetracker.unity3d.com/is...on-is-thrown-with-cloud-diagnostics-activated
     
    Last edited: Dec 18, 2023
    C-Gabriel likes this.
  10. Shefich

    Shefich

    Joined:
    May 23, 2013
    Posts:
    144
    I still have too many such crashes. Workaround doesn't work(I added debug.log in order to check that script goes to that point and it gives the log). The issue still exist.
    Unity 2022.3.20.
     
  11. Alan-Liu

    Alan-Liu

    Joined:
    Jan 23, 2014
    Posts:
    396
    Can you post the full stack trace of the crash?
     
  12. royi-mat

    royi-mat

    Joined:
    Jan 23, 2021
    Posts:
    7
    we get this as well with unity 2022.3.18

    stack trace:

    Crashed: com.apple.main-thread
    0 libsystem_kernel.dylib 0x9fbc __pthread_kill + 8
    1 libsystem_pthread.dylib 0x5680 pthread_kill + 268
    2 libsystem_c.dylib 0x27dd0 raise + 32
    3 UnityFramework 0xd9fb04 DebugStringToFilePostprocessedStacktrace + 222 (String.h:222)
    4 UnityFramework 0xd9ffcc DebugStringToFile + 222 (String.h:222)
    5 UnityFramework 0xa9471c Register + 222 (String.h:222)
    6 UnityFramework 0xa94600 UnityWebRequest + 251 (UnityWebRequest.cpp:251)
    7 UnityFramework 0xacf730 SendReport + 461 (CrashReporter.cpp:461)
    8 UnityFramework 0xaced34 HandleLog + 342 (CrashReporter.cpp:342)
    9 UnityFramework 0xd9fc70 Invoke + 405 (CallbackArray.h:405)
    10 UnityFramework 0xd9f71c DebugStringToFilePostprocessedStacktrace + 1026 (LogAssert.cpp:1026)
    11 UnityFramework 0xd9ffcc DebugStringToFile + 222 (String.h:222)
    12 UnityFramework 0x8ef9f0 LogExceptionFromManaged + 935 (Scripting.cpp:935)
    13 UnityFramework 0x8ee508 LogException + 947 (Scripting.cpp:947)
    14 UnityFramework 0x8edad0 Invoke + 310 (ScriptingInvocation.cpp:310)
    15 UnityFramework 0x8f0590 InvokeChecked + 72 (ScriptingInvocation.h:72)
    16 UnityFramework 0x93edc8 CallMethod + 60 (ScriptingNativeTypes.h:60)
    17 UnityFramework 0x8fc76c WillDestroyComponent + 81 (MonoBehaviour.h:81)
    18 UnityFramework 0x710bf4 WillDestroyGameObject + 111 (GameObject.cpp:111)
    19 UnityFramework 0x7e06b0 PreDestroyRecursive + 612 (dynamic_array.h:612)
    20 UnityFramework 0x7e0f40 DestroyObjectHighLevel_Internal + 517 (GameObject.h:517)
    21 UnityFramework 0x7d8d40 CleanupAllObjects + 432 (SaveAndLoadHelper.cpp:432)
    22 UnityFramework 0x7d9414 CleanupEngine + 586 (SaveAndLoadHelper.cpp:586)
    23 UnityFramework 0x7ed9e0 PlayerCleanup + 701 (Player.cpp:701)
    24 UnityFramework 0xe32d3c UnityCleanup + 222 (LibEntryPoint.mm:222)
    25 UnityFramework 0x13bf8 -[UnityAppController applicationWillTerminate:] + 532 (UnityAppController.mm:532)
    26 UIKitCore 0xe16920 <redacted> + 196
    27 UIKitCore 0x1396d0 <redacted> + 112
    28 UIKitCore 0x5fc824 <redacted> + 164
    29 UIKitCore 0xe11588 <redacted> + 164
    30 FrontBoardServices 0x47fc4 <redacted> + 72
    31 FrontBoardServices 0xe19c <redacted> + 168
    32 FrontBoardServices 0x47f64 <redacted> + 128
    33 libdispatch.dylib 0x4300 <redacted> + 20
    34 libdispatch.dylib 0x7d48 <redacted> + 284
    35 FrontBoardServices 0xa520 <redacted> + 52
    36 FrontBoardServices 0xa4a0 <redacted> + 240
    37 FrontBoardServices 0xa378 <redacted> + 28
    38 CoreFoundation 0x370ac <redacted> + 28
    39 CoreFoundation 0x36328 <redacted> + 176
    40 CoreFoundation 0x34adc <redacted> + 244
    41 CoreFoundation 0x33818 <redacted> + 828
    42 CoreFoundation 0x333f8 CFRunLoopRunSpecific + 608
    43 GraphicsServices 0x34f8 GSEventRunModal + 164
    44 UIKitCore 0x22c8a0 <redacted> + 888
    45 UIKitCore 0x22bedc UIApplicationMain + 340
    46 UnityFramework 0x17754 -[UnityFramework runUIApplicationMainWithArgc:argv:] + 96 (main.mm:96)
    47 Matific 0x412c main + 28 (main.mm:28)
    48 ??? 0x1b39d6dcc (Missing)
     
  13. Shefich

    Shefich

    Joined:
    May 23, 2013
    Posts:
    144
    Stacktraces from Crashlytics:
    Code (CSharp):
    1. Crashed: Thread: SIGTRAP  0x00002753000044f9
    2. #00 pc 0x70da0 libc.so (BuildId: ff7626212926e836473bc3dc17ba935c)
    3. #01 pc 0xa16800 libunity.so (DebugStringToFilePostprocessedStacktrace(DebugStringToFileData const&)) (BuildId: 0a4391d12b519690)
    Stacktraces from Google Play:
    Code (CSharp):
    1. *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    2. pid: 0, tid: 12609 >>> com.xxx.xxx<<<
    3. backtrace:
    4.   #00  pc 0x00000000000d5748  /apex/com.android.runtime/lib64/bionic/libc.so (tgkill+8)
    5.   #01  pc 0x0000000000a16800  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/lib/arm64/libunity.so (DebugStringToFilePostprocessedStacktrace(DebugStringToFileData const&)) (BuildId: 0a4391d12b519690)
    6.   #02  pc 0x0000000000a16d7c  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/lib/arm64/libunity.so (DebugStringToFile(DebugStringToFileData const&)) (BuildId: 0a4391d12b519690)
    7.   #03  pc 0x000000000041bc90  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/lib/arm64/libunity.so (CachedReader::OutOfBoundsError(unsigned long, unsigned long)) (BuildId: 0a4391d12b519690)
    8.   #04  pc 0x000000000041bf68  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/lib/arm64/libunity.so (CachedReader::Read(void*, unsigned long)) (BuildId: 0a4391d12b519690)
    9.   #05  pc 0x0000000000340b40  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/lib/arm64/libunity.so (void StreamedBinaryRead::TransferSTLStyleArray<core::string_with_label<1, char>>(core::string_with_label<1, char>&, TransferMetaFlags)) (BuildId: 0a4391d12b519690)
    10.   #06  pc 0x000000000033daac  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/lib/arm64/libunity.so (void NamedObject::Transfer<StreamedBinaryRead>(StreamedBinaryRead&)) (BuildId: 0a4391d12b519690)
    11.   #07  pc 0x00000000004cab94  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/lib/arm64/libunity.so (void TextAsset::Transfer<StreamedBinaryRead>(StreamedBinaryRead&)) (BuildId: 0a4391d12b519690)
    12.   #08  pc 0x000000000051f3e0  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/lib/arm64/libunity.so (SerializedFile::ReadObject(long, ObjectCreationMode, bool, TypeTree const**, bool*, Object&, CacheReaderBase*) const) (BuildId: 0a4391d12b519690)
    13.   #09  pc 0x0000000000518f80  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/lib/arm64/libunity.so (PersistentManager::ReadAndActivateObjectThreaded(int, SerializedObjectIdentifier const&, SerializedFile*, bool, bool, PersistentManager::LockFlags)) (BuildId: 0a4391d12b519690)
    14.   #10  pc 0x00000000005187b8  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/lib/arm64/libunity.so (PersistentManager::ReadObjectThreaded(int, PersistentManager::LockFlags)) (BuildId: 0a4391d12b519690)
    15.   #11  pc 0x0000000000518670  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/lib/arm64/libunity.so (PersistentManager::ReadObject(int, AwakeFromLoadMode)) (BuildId: 0a4391d12b519690)
    16.   #12  pc 0x000000000049b0bc  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/lib/arm64/libunity.so (Resources_Bindings::Load(char const*, ScriptingSystemTypeObjectPtr, ScriptingExceptionPtr*)) (BuildId: 0a4391d12b519690)
    17.   #13  pc 0x00000000002e62b0  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/lib/arm64/libunity.so (ResourcesAPIInternal_CUSTOM_Load(ScriptingBackendNativeStringPtrOpaque*, ScriptingBackendNativeObjectPtrOpaque*)) (BuildId: 0a4391d12b519690)
    18.   #14  pc 0x000000000129a9b8  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/lib/arm64/libil2cpp.so (Resources_Load_TisRuntimeObject_mD1AF6299B14F87ED1D1A6199A51480919F7C79D7_gshared) (BuildId: e2a31ecda41572f6f75cba99c7eff298f7839f7f)
    19.   #15  pc 0x000000000119042c  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/lib/arm64/libil2cpp.so (Localisation_LoadLang_mC98E10716746AD30D188D0B0FF0A8A29C12836F1) (BuildId: e2a31ecda41572f6f75cba99c7eff298f7839f7f)
    20.   #16  pc 0x000000000118f78c  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/lib/arm64/libil2cpp.so (Localisation_SetAndLoadLang_m5FDED3A54E07D5075D5C7D05C92BF7B46CCDFF64) (BuildId: e2a31ecda41572f6f75cba99c7eff298f7839f7f)
    21.   #17  pc 0x00000000010b050c  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/lib/arm64/libil2cpp.so (il2cpp::vm::Runtime::InvokeWithThrow(MethodInfo const*, void*, void**)) (BuildId: e2a31ecda41572f6f75cba99c7eff298f7839f7f)
    22.   #18  pc 0x00000000010b0458  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/lib/arm64/libil2cpp.so (il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**)) (BuildId: e2a31ecda41572f6f75cba99c7eff298f7839f7f)
    23.   #19  pc 0x00000000004b8668  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/lib/arm64/libunity.so (scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool)) (BuildId: 0a4391d12b519690)
    24.   #20  pc 0x00000000004c80dc  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/lib/arm64/libunity.so (ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool)) (BuildId: 0a4391d12b519690)
    25.   #21  pc 0x00000000004d6844  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/lib/arm64/libunity.so (MonoBehaviour::InvokeMethodOrCoroutineChecked(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingExceptionPtr*)) (BuildId: 0a4391d12b519690)
    26.   #22  pc 0x00000000004d6a6c  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/lib/arm64/libunity.so (MonoBehaviour::InvokeMethodOrCoroutineChecked(ScriptingMethodPtr, ScriptingObjectPtr)) (BuildId: 0a4391d12b519690)
    27.   #23  pc 0x00000000004d724c  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/lib/arm64/libunity.so (MonoBehaviour::DelayedStartCall(Object*, void*)) (BuildId: 0a4391d12b519690)
    28.   #24  pc 0x000000000035e448  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/lib/arm64/libunity.so (DelayedCallManager::Update(int)) (BuildId: 0a4391d12b519690)
    29.   #25  pc 0x00000000003f7e20  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/lib/arm64/libunity.so (ExecutePlayerLoop(NativePlayerLoopSystem*)) (BuildId: 0a4391d12b519690)
    30.   #26  pc 0x00000000003f7e60  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/lib/arm64/libunity.so (ExecutePlayerLoop(NativePlayerLoopSystem*)) (BuildId: 0a4391d12b519690)
    31.   #27  pc 0x00000000003f80f4  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/lib/arm64/libunity.so (PlayerLoop()) (BuildId: 0a4391d12b519690)
    32.   #28  pc 0x000000000054aec4  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/lib/arm64/libunity.so (UnityPlayerLoop()) (BuildId: 0a4391d12b519690)
    33.   #29  pc 0x0000000000560764  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/lib/arm64/libunity.so (nativeRender(_JNIEnv*, _jobject*)) (BuildId: 0a4391d12b519690)
    34.   #30  pc 0x0000000000355630  /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+144)
    35.   #31  pc 0x00000000005bb730  /apex/com.android.art/lib64/libart.so (nterp_helper+4016)
    36.   #32  pc 0x000000000055ece0  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/base.apk (com.unity3d.player.UnityPlayer.-$$Nest$mnativeRender)
    37.   #33  pc 0x00000000005ba7b4  /apex/com.android.art/lib64/libart.so (nterp_helper+52)
    38.   #34  pc 0x000000000055db50  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/base.apk (com.unity3d.player.UnityPlayer$F$a.handleMessage+244)
    39.   #35  pc 0x0000000000bf333c  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.os.Handler.dispatchMessage+124)
    40.   #36  pc 0x0000000000bf7448  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.os.Looper.loopOnce+1160)
    41.   #37  pc 0x0000000000bf6f08  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.os.Looper.loop+984)
    42.   #38  pc 0x00000000005ba818  /apex/com.android.art/lib64/libart.so (nterp_helper+152)
    43.   #39  pc 0x000000000055dd80  /data/app/~~rZ3tZmOwaYCrNWa8OHtuRg==/com.xxx.xxx--eQm6xyjPlmjGW7f8uqaCQ==/base.apk (com.unity3d.player.UnityPlayer$F.run+48)
    44.   #40  pc 0x000000000033eba4  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612)
    45.   #41  pc 0x000000000023a9ac  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+144)
    46.   #42  pc 0x000000000053b96c  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1600)
    47.   #43  pc 0x000000000053b31c  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallbackWithUffdGc(void*)+8)
    48.   #44  pc 0x00000000000eb910  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+208)
    49.   #45  pc 0x000000000007e4c0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
     
  14. Alan-Liu

    Alan-Liu

    Joined:
    Jan 23, 2014
    Posts:
    396
    The crash is different from the one I reproduced, which occurs when the application is quiting. So, my workaround doesn't work for it.

    This crash occurs when Unity is reading from a corrupted file. Maybe some asset bundles were corrupted.
     
  15. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,738
    The last two issues look to be android and unrelated to original question in this thread.
     
  16. martinbigfoot

    martinbigfoot

    Joined:
    Jan 26, 2023
    Posts:
    6
  17. Shefich

    Shefich

    Joined:
    May 23, 2013
    Posts:
    144
    This crash "DebugStringToFilePostprocessedStacktrace(DebugStringToFileData const&)" still happens on Unity 2022.3.21.
     
    dev-borisov-alexey and xenotime like this.