Search Unity

Bug JobQueue::WaitForJobGroupID(JobGroupID, JobQueue::JobQueueWorkStealMode)

Discussion in 'Editor & General Support' started by Shefich, Dec 4, 2022.

  1. Shefich

    Shefich

    Joined:
    May 23, 2013
    Posts:
    143
    Happens many times in my project:

    Code (CSharp):
    1. Crashed: Thread #1
    2. SIGSEGV 0x0000000000000162
    3. 0
    4. libunity.so
    5. JobQueue::WaitForJobGroupID(JobGroupID, JobQueue::JobQueueWorkStealMode)
    6. 1
    7. libunity.so
    8. JobQueue::WaitForJobGroupID(JobGroupID, JobQueue::JobQueueWorkStealMode)
    As I see in the logs it happens after "OnApplicationQuit".
    Can't be reproduced on my device.
    Unity 2020.3.42, 2021.3.14
     
    ageana likes this.
  2. ageana

    ageana

    Joined:
    Nov 6, 2013
    Posts:
    48
    Same here with Unity 2020.3.42f1. It only happens on iOS devices. The repro is quite simple, just close the app and after a few seconds, it will register a crash.


    Code (CSharp):
    1. Crashed: com.apple.main-thread
    2. 0  UnityFramework                 0xbd35f8 JobQueue::WaitForJobGroupID(JobGroupID, JobQueue::JobQueueWorkStealMode) + 1750 (JobQueue.cpp:1750)
    3. 1  UnityFramework                 0xbd10f4 CompleteFenceInternal(JobFence&, WorkStealMode) + 17 (Jobs.cpp:17)
    4. 2  UnityFramework                 0xb85684 AsyncUploadManager::~AsyncUploadManager() + 282 (Jobs.h:282)
    5. 3  UnityFramework                 0xb85418 AsyncUploadManager::StaticDestroy(void*) + 203 (MemoryMacros.h:203)
    6. 4  UnityFramework                 0xc63be8 RegisterRuntimeInitializeAndCleanup::ExecuteCleanup() + 520 (dynamic_array.h:520)
    7. 5  UnityFramework                 0xbfaae8 RuntimeCleanup() + 728 (Player.cpp:728)
    8. 6  UnityFramework                 0x16e34 -[UnityAppController applicationWillTerminate:] + 526 (UnityAppController.mm:526)
    9. 7  UIKitCore                      0xd3dc24 -[UIApplication _terminateWithStatus:] + 196
    10. 8  UIKitCore                      0x29090c -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 112
    11. 9  UIKitCore                      0x6a7cd4 -[_UISceneLifecycleMultiplexer forceExitWithTransitionContext:scene:] + 164
    12. 10 UIKitCore                      0xd3a040 -[UIApplication workspaceShouldExit:withTransitionContext:] + 176
    13. 11 FrontBoardServices             0x41e74 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke_2 + 72
    14. 12 FrontBoardServices             0x6c24 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 168
    15. 13 FrontBoardServices             0x41e14 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke + 128
    16. 14 libdispatch.dylib              0x3fdc _dispatch_client_callout + 20
    17. 15 libdispatch.dylib              0x7a5c _dispatch_block_invoke_direct + 264
    18. 16 FrontBoardServices             0x10d40 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 52
    19. 17 FrontBoardServices             0x108dc -[FBSSerialQueue _targetQueue_performNextIfPossible] + 220
    20. 18 FrontBoardServices             0x13184 -[FBSSerialQueue _performNextFromRunLoopSource] + 28
    21. 19 CoreFoundation                 0xd5f34 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
    22. 20 CoreFoundation                 0xe230c __CFRunLoopDoSource0 + 176
    23. 21 CoreFoundation                 0x661d0 __CFRunLoopDoSources0 + 244
    24. 22 CoreFoundation                 0x7bb8c __CFRunLoopRun + 836
    25. 23 CoreFoundation                 0x80ec0 CFRunLoopRunSpecific + 612
    26. 24 GraphicsServices               0x1368 GSEventRunModal + 164
    27. 25 UIKitCore                      0x3a186c -[UIApplication _run] + 888
    28. 26 UIKitCore                      0x3a14d0 UIApplicationMain + 340
    29. 27 UnityFramework                 0x1b8dc -[UnityFramework runUIApplicationMainWithArgc:argv:] + 96 (main.mm:96)
     
    Last edited: Dec 6, 2022
    peteryu47 and DoPinG83_CarX like this.
  3. Shefich

    Shefich

    Joined:
    May 23, 2013
    Posts:
    143
    For me it happens on Android devices.
     
  4. noasoso

    noasoso

    Joined:
    Nov 29, 2022
    Posts:
    3
    also happened on me. when upgrade unity to 2020.3.42f1 from 2020.3.3f1
    Code (CSharp):
    1. - (void)applicationWillTerminate:(UIApplication*)application
    2. {
    3.     ::printf("-> applicationWillTerminate()\n");
    4.  
    5.     // Only clean up if Unity has finished initializing, else the clean up process will crash,
    6.     // this happens if the app is force closed immediately after opening it.
    7.     if (_unityAppReady)
    8.     {
    9.         //UnityCleanup();
    10.         UnityCleanupTrampoline();
    11.     }
    12. }
    Code (CSharp):
    1.   //UnityCleanup();
    I don't know what's going to happen with this;
    At least the crash doesn't happen anymore。
     
  5. gogii_jeff

    gogii_jeff

    Joined:
    Nov 17, 2015
    Posts:
    2
    Has anyone come up with a fix/workaround for this besides commenting out the call to UnityCleanup? We're also seeing this issue.
     
  6. passerbycmc

    passerbycmc

    Joined:
    Feb 12, 2015
    Posts:
    1,741
    Getting pretty similar problems on unity 2020.3.43f1, and can confirm on the exact same codebase it does not happen on 2020.3.25f1
     
  7. DoPinG83_CarX

    DoPinG83_CarX

    Joined:
    May 4, 2021
    Posts:
    3
    Same issue for me on 2020.3.42f1 Is there any fix on next versions?
     
  8. golagani

    golagani

    Joined:
    Oct 18, 2018
    Posts:
    2
    Facing same issue on 2020.3.44f1, any one got work around for this issue ?