Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug Crash when quitting the application (JobQueue::WaitForJobGroupID(JobGroupID, JobQueue::JobQueueWorkS

Discussion in 'iOS and tvOS' started by ageana, Dec 6, 2022.

  1. ageana

    ageana

    Joined:
    Nov 6, 2013
    Posts:
    48
    After updating to Unity 2020.3.42 from 2020.3.19, a crash is reported by Firebase Crashytics after the user closes the application.

    This is the stack trace:

    Code (CSharp):
    1. Crashed: com.apple.main-thread
    2. EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x000000000000010a
    3.  
    4. 0  UnityFramework                 0xeb1670 JobQueue::WaitForJobGroupID(JobGroupID, JobQueue::JobQueueWorkStealMode) + 1750 (JobQueue.cpp:1750)
    5. 1  UnityFramework                 0xead754 CompleteFenceInternal(JobFence&, WorkStealMode) + 17 (Jobs.cpp:17)
    6. 2  UnityFramework                 0xe017c4 AsyncUploadManager::~AsyncUploadManager() + 282 (Jobs.h:282)
    7. 3  UnityFramework                 0xe01514 AsyncUploadManager::StaticDestroy(void*) + 203 (MemoryMacros.h:203)
    8. 4  UnityFramework                 0x104bd3c RegisterRuntimeInitializeAndCleanup::ExecuteCleanup() + 520 (dynamic_array.h:520)
    9. 5  UnityFramework                 0xf23b54 RuntimeCleanup() + 728 (Player.cpp:728)
    10. 6  UnityFramework                 0x155b4 -[UnityAppController applicationWillTerminate:] + 526 (UnityAppController.mm:526)
    11. 7  UIKitCore                      0xd3dc24 -[UIApplication _terminateWithStatus:] + 196
    12. 8  UIKitCore                      0x29090c -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 112
    13. 9  UIKitCore                      0x6a7cd4 -[_UISceneLifecycleMultiplexer forceExitWithTransitionContext:scene:] + 164
    14. 10 UIKitCore                      0xd3a040 -[UIApplication workspaceShouldExit:withTransitionContext:] + 176
    15. 11 FrontBoardServices             0x41e74 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke_2 + 72
    16. 12 FrontBoardServices             0x6c24 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 168
    17. 13 FrontBoardServices             0x41e14 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke + 128
    18. 14 libdispatch.dylib              0x3fdc _dispatch_client_callout + 20
    19. 15 libdispatch.dylib              0x7a5c _dispatch_block_invoke_direct + 264
    20. 16 FrontBoardServices             0x10d40 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 52
    21. 17 FrontBoardServices             0x108dc -[FBSSerialQueue _targetQueue_performNextIfPossible] + 220
    22. 18 FrontBoardServices             0x13184 -[FBSSerialQueue _performNextFromRunLoopSource] + 28
    23. 19 CoreFoundation                 0xd5f34 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
    24. 20 CoreFoundation                 0xe230c __CFRunLoopDoSource0 + 176
    25. 21 CoreFoundation                 0x66230 __CFRunLoopDoSources0 + 340
    26. 22 CoreFoundation                 0x7bb8c __CFRunLoopRun + 836
    27. 23 CoreFoundation                 0x80ec0 CFRunLoopRunSpecific + 612
    28. 24 GraphicsServices               0x1368 GSEventRunModal + 164
    29. 25 UIKitCore                      0x3a186c -[UIApplication _run] + 888
    30. 26 UIKitCore                      0x3a14d0 UIApplicationMain + 340
    31. 27 UnityFramework                 0x1a05c -[UnityFramework runUIApplicationMainWithArgc:argv:] + 96 (main.mm:96)
    It can be reproduced on most devices (tablets, phones) and iOS/iPadOS 15+.
     
    IronNick likes this.
  2. kyubuns

    kyubuns

    Joined:
    Aug 6, 2013
    Posts:
    135
    ilmario likes this.
  3. frekons_unity

    frekons_unity

    Joined:
    Sep 6, 2018
    Posts:
    20
    Please pay attention to this bug @Unity, we have the same issue too.
    We experience the issue on Ubuntu 22.04
     
  4. zarmen98

    zarmen98

    Joined:
    Oct 14, 2018
    Posts:
    6
    I have same issue too for ubuntu 22.04 looking for fix but no one solved, @TomasKucinskas dear moderator please add new 2020. version and fix it, I do not want to jump 2021 because my unity project is very big and in 2021 i have a lot of problem, so i want to just fix this...
     
  5. frekons_unity

    frekons_unity

    Joined:
    Sep 6, 2018
    Posts:
    20
    in 2020.3.42f1 we experience Segmentation fault (core dumped) on application quit, so I have digged into it.



    In someway, AsyncUploadManager::StaticDestroy is being added to RegisterRuntimeInitializeAndCleanup::ExecuteCleanup()'s cleanup list and AsyncUploadManager::StaticDestroy is using JobQueue::WaitForJobGroupID which uses gQueue but RegisterRuntimeInitializeAndCleanup::ExecuteCleanup() is being called after DestroyJobQueue(JobQueue *a1) therefore gQueue is being null then causes Segmentation fault on application quit.
    As I do not have the source code, I do not know what adds AsyncUploadManager::StaticDestroy to RegisterRuntimeInitializeAndCleanup::ExecuteCleanup()'s cleanup list but we run our servers on Unity and we need a solution ASAP, please provide us a work-around or fix it fastly.

    Experiencing the issue on Ubuntu 22.04 64 Bit.
     
    barkovandrei, noasoso and zarmen98 like this.
  6. gogii_jeff

    gogii_jeff

    Joined:
    Nov 17, 2015
    Posts:
    2
    @Unity I'm also chiming in to take a look at this. We're seeing the exact same problem. Any workaround or fix would be appreciated.
     
  7. ShinSeok

    ShinSeok

    Joined:
    Jan 17, 2015
    Posts:
    5
    I am also suffering from the same issue.
    Unity version: 2020.3.42f1
     
  8. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,602
    Can you please report this as a bug? No need for repro, just reference forum thread and mark somewhere to assign to alexey. And thanks for details - indeed this was fixed in 2021 and simply not backported to 2020.3 (thats why the need for the bug - so it is properly tracked).
     
  9. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    420
    I have the same crash with 2020.3.43f1 on the app quit with Windows Standalone. Unity 2020.3.38 didn't have this issue.
     
  10. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    420
    Do you still need a bug report?
     
  11. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,602
    If you have the same callstack - yes (it should be platform-independent). Again - this is just for tracking, no worries, the fix is done and is in the "process"
     
    noasoso and kyubuns like this.
  12. frekons_unity

    frekons_unity

    Joined:
    Sep 6, 2018
    Posts:
    20
    Did you report the bug?

    @Alexey any update?
     
    Last edited: Jan 18, 2023
  13. kashiftasneem

    kashiftasneem

    Joined:
    Aug 24, 2012
    Posts:
    15
    Can anybody confirm whether this is fixed in 2020.3.44?
     
  14. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    420
    No sorry, I didn't. I downgraded instead.
     
  15. TomaszMolikRobot

    TomaszMolikRobot

    Joined:
    Jan 14, 2020
    Posts:
    25
    I discovered the same issue after upgrading to 2020.3.43.
    Not sure about 2020.3.44 but I just upgraded Unity to 2021.3.16 and it looks like it doesn't happen there (at least on windows)
     
  16. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    420
    I suggest 2020.3.41f1 as it doesn't have this bug.
     
    ilmario likes this.
  17. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,602
    the fix should be released in 2020.3.45f1 (do not forget - some time must pass between developer seeing the bug, and the fix being released ;-))
     
  18. frekons_unity

    frekons_unity

    Joined:
    Sep 6, 2018
    Posts:
    20
    Do you have any ETA for 2020.3.45f1? No need an exact date but something like in 2 weeks etc.
     
  19. barkovandrei

    barkovandrei

    Joined:
    Nov 18, 2015
    Posts:
    7
    We see the same crash reports on android after update from 2020.3.32f1 to 2020.3.44f1. I guess based on the history of Unity releases - updates usually come out somewhere in the middle of each month. Then perhaps the update will be only in mid-February. So, since we can't wait fix we'll try roll back to 2020.3.41f1 as written here that there is no crash
     
    unity_JwWIdtAbuZYrfg likes this.
  20. frekons_unity

    frekons_unity

    Joined:
    Sep 6, 2018
    Posts:
    20
    @Alexey
     
  21. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    420
    Just to give this topic's followers a notification, 2020.3.45f1 is released. :)
     
    fcloss likes this.
  22. fcloss

    fcloss

    Joined:
    Dec 1, 2011
    Posts:
    191
    Thanks. Where? Couldn't find it on https://unity.com/releases/editor/archive or on Unity Hub. So I guess that as a notification when launching Unity.

    (EDIT) Yes, inside Unity it is already showing the notification to update.

    BUTTT.... Checking the release notes(https://unity.com/releases/editor/whats-new/2020.3.45) there is no mention to any fix to this crash. Anyone has already checked it?
     
  23. TomaszMolikRobot

    TomaszMolikRobot

    Joined:
    Jan 14, 2020
    Posts:
    25
    Didn't see any mention in release notes as well but after updating to 2020.3.45 I no longer experience crashes on Windows standalone build and in editor (it was showing editor crash after quitting) so I guess it is fixed.
     
  24. fcloss

    fcloss

    Joined:
    Dec 1, 2011
    Posts:
    191
    Ok. I will test the exit crash on iOs (the initial post of this thread), which, hopefully, was fixed. I will update here asap.
     
  25. fcloss

    fcloss

    Joined:
    Dec 1, 2011
    Posts:
    191
    My app update was already released on the AppStore and no issues this time =)
     
    noasoso and TomaszMolikRobot like this.