Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

I'm getting this error, but I'm not using the job system... why?

Discussion in '2018.2 Beta' started by georgeq, Apr 27, 2018.

  1. georgeq

    georgeq

    Joined:
    Mar 5, 2014
    Posts:
    602
    I got this error on the console while playing my game:

    Assertion failed: Multiple dependency jobs should not be in ScheduleDependencies

    However I am not using the job system so I am not scheduling any job. I've been working on this project with Unity 2018.1.0b13 since the date it was released and this is the first time I see this message.
     
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    2,708
    Hi George,
    Could we please get a report + repro for this?
     
  3. georgeq

    georgeq

    Joined:
    Mar 5, 2014
    Posts:
    602
    I'm afraid I don't know how to reproduce this error... I've executed this project hundreds of times and only seen this message once, so it's extremely hard to reproduce and I have no idea of what triggered it. I don't know if filling a bug report will be of any help since the people in charge of evaluating the case will have very little chance to reproducing it successfully in a reasonable amount of time, but if you tell me to go ahead I will. In my personal opinion we should spread the word and wait util more evidence can be gathered from different people, if the community is aware of this problem maybe someone can provide the missing piece to solve the puzzle, and avoid giving the QA team a hard time unnecessarily.
     
    LeonhardP likes this.
  4. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    867
    The only thing I can suggest is enabling a full stack trace for all messages (using the drop-down options of the Console tab) and seeing if you can get any more information about what is triggering this. You may not be using the jobs system but Unity is.
     
  5. georgeq

    georgeq

    Joined:
    Mar 5, 2014
    Posts:
    602
    I kinda figured out that. I didn't know those options were available, thanks!
     
  6. georgeq

    georgeq

    Joined:
    Mar 5, 2014
    Posts:
    602
    It seems you are right. It took almost a month and several hundreds of plays in order to get this:

    Assertion failed: Multiple dependency jobs should not be in ScheduleDependencies
    0x00000001414F00A9 (Unity) StackWalker::GetCurrentCallstack
    0x00000001414F66B6 (Unity) StackWalker::ShowCallstack
    0x000000014138F54B (Unity) GetStacktrace
    0x0000000140888ADC (Unity) DebugStringToFile
    0x0000000140883E66 (Unity) JobQueue::ScheduleDependencies
    0x0000000140884746 (Unity) JobQueue::ScheduleJobMultipleDependencies
    0x000000014087FC61 (Unity) SyncFences
    0x0000000140A876E7 (Unity) TransformChangeDispatch::GetAndClearChangedAsBatchedJobs_Internal
    0x0000000140790D39 (Unity) RendererUpdateManager::UpdateAll
    0x000000014065A09B (Unity) RenderManager::UpdateAllRenderers
    0x000000014094B30A (Unity) `InitPlayerLoopCallbacks'::`2'::postLateUpdateUpdateAllRenderersRegistrator::Forward
    0x000000014094A1DB (Unity) ExecutePlayerLoop
    0x000000014094A2A4 (Unity) ExecutePlayerLoop
    0x000000014094CE8C (Unity) PlayerLoop
    0x00000001413CAD67 (Unity) PlayerLoopController::UpdateScene
    0x00000001413C9C09 (Unity) Application::TickTimer
    0x00000001415C42ED (Unity) MainMessageLoop
    0x00000001415C65DC (Unity) WinMain
    0x000000014271FDA7 (Unity) __scrt_common_main_seh
    0x00007FFDB1F01FE4 (KERNEL32) BaseThreadInitThunk
    0x00007FFDB21EF061 (ntdll) RtlUserThreadStart
     
    AlkisFortuneFish and Peter77 like this.
  7. JakeTurner

    JakeTurner

    Unity Technologies

    Joined:
    Aug 12, 2015
    Posts:
    136
    Hi

    Please can we work together to solve this problem.
    That assert means something has gone wrong internally with the data state of the JobQueue.

    Please can you confirm your Unity version - is it still "2018.1.0b13"?
    Also please can you confirm what player build you were using 32-bit or 64-bit?
    Finally what hardware you are using i.e. CPU when you recreated the problem?

    Let me know the best way for us to work together on this problem.
    1. I could take your project and leave it running to try and recreate it?
    2. If you can make it happen quite easily and catch it inside Visual Studio and could make a full core dump for me to analyse that would be very helpful.
    3. I could make you preview builds with more debugging in them to help track down the problem.
    Just to add during all of our automated testing (we have tests which stress test "JobQueue::ScheduleJobMultipleDependencies" a lot) we have never seen this message.

    Thanks

    Jake

     
    Peter77 likes this.
  8. georgeq

    georgeq

    Joined:
    Mar 5, 2014
    Posts:
    602
    No, I'm using 2018.1.0f2

    It is quite difficult to reproduce, I need to run it hundreds of times maybe even a couple of thousands in order to see the problem again. Almost one full month passed since the previos time I saw it, and it could pass another month until I face this message again.

    That would be nice.

    Again, this happens very rarely, it's extremely hard to reproduce, so maybe a tiny little detail you didn't take in to account in your automated tests... something so tiny or so hidden in the code that no one has noticed it yet.
     
  9. JakeTurner

    JakeTurner

    Unity Technologies

    Joined:
    Aug 12, 2015
    Posts:
    136
    Thank you for the replies they are very helpful.

    Please can I bother you for some more information:

    Please can you confirm what player build you were using 32-bit or 64-bit? (this is very important it might only happen on for instance the 32-bit player build).

    Finally what hardware you are using i.e. CPU when you recreated the problem? (this is important because some older CPUs behave differently to the newest CPUs)
     
  10. georgeq

    georgeq

    Joined:
    Mar 5, 2014
    Posts:
    602
    Util now I haven't seen it on a player build, currently I'm on heavy development and most of the time I play it inside the editor, and is there where I've seen this message.

    I'm using a DELL Inspiron 5555, the CPU reported by the manufacturer is: AMD Quad Core A8 7410 2.2GHz, and the window task manager reports: AMD A10-8700P Raedon R6, 10 Compute Cores 4C + 6G.

    Hope this helps.
     
  11. JakeTurner

    JakeTurner

    Unity Technologies

    Joined:
    Aug 12, 2015
    Posts:
    136
    Thank you that is very helpful it rules out a lot of potential ideas. Also using 2018.1.0f2 rules out one idea I had.

    Back to square one a bit in terms of this assert should not be happening.

    Is there anyway to get reproduce this within Unity QA? Or if you can reproduce it then it would be good to break/stop on the assert (I can get you a special build with that change if that helps) and get a core dump for me to analyse.

    Just to help - it happens very rarely but when it happens it is always the callstack that says

    (Unity) SyncFences
    (Unity) TransformChangeDispatch::GetAndClearChangedAsBatchedJobs_Internal
    (Unity) RendererUpdateManager::UpdateAll
    (Unity) RenderManager::UpdateAllRenderers

    That might give more clues as to what is going on.
     
  12. JakeTurner

    JakeTurner

    Unity Technologies

    Joined:
    Aug 12, 2015
    Posts:
    136
    Just to check anything extra/unique about your project i.e. using new or experimental features like SRP?
     
  13. georgeq

    georgeq

    Joined:
    Mar 5, 2014
    Posts:
    602
    I don't believe I can get an idea of what's causing the problem any time soon, as far as I've been able to see it can happen under almost the same conditions of the previous play, I've added, deleted, renamed and replaced a lot of code and the error doesn't show up, then just a small change and it pops up, but if I run the game under the exact same conditions that caused the error it just doesn't show up again... by the way, I'm running the game on "auto-pilot" mode, so if I play it twice it gets exactly the same inputs and thus shows exactly the same behavior of the previous play, except for this little error message. I play it for sessions of about 2 to 10 minutes, sometimes I have other things to do and leave the machine alone and hour or two playing the game and I haven't seen this error, then one day after just a few minutes it throws the exception. It really looks like a random event.

    I can do that if you provide me with that special build and give me instructions on how to set up VS to catch this event.

    I don't think I'm doing something special or unique with this project, I wanted to experiment with the ECS,but I haven't done anything with it yet.

    these are that packages I have installed:

    Ads 2.0.7
    Analytics Library 2.0.16
    Analytics Standard Events 1.0.13
    Cinemachine 2.1.13
    Entities 0.0.11
    In App Purchasing 2.0.1
    Package Manager 1.9.8
    PostProcessing 2.0.5-preview
    TextMesh Pro 1.2.3
     
  14. georgeq

    georgeq

    Joined:
    Mar 5, 2014
    Posts:
    602
    Just remember one thing, inside my FixedUpdate I have a process that loops through a couple of arrays, since these arrays have always the same items I'm creating them on Awake and destroying them OnDestory, my original intention was to use them inside some jobs, so I declared them as NativeArrays, but for different reasons I never used the JobSystem and the arrays remained declared as NativeArrays. This is the only "out of the normal" I can remember.
     
  15. user335

    user335

    Joined:
    Feb 1, 2017
    Posts:
    1
    I just saw this error for the first time today, googled it and came here. I just updated to Unity Personal 64 bit 2018.1.1f1 yesterday (previous version used was 2017.3.0f3) on Windows 10 64 bit. Also was playing inside of editor when it came up. Here's what my console said about it:

    Assertion failed: Multiple dependency jobs should not be in ScheduleDependencies
    0x00000001414EE179 (Unity) StackWalker::GetCurrentCallstack
    0x00000001414F4786 (Unity) StackWalker::ShowCallstack
    0x000000014138DC3B (Unity) GetStacktrace
    0x00000001408885DC (Unity) DebugStringToFile
    0x0000000140883966 (Unity) JobQueue::ScheduleDependencies
    0x0000000140884246 (Unity) JobQueue::ScheduleJobMultipleDependencies
    0x000000014087F751 (Unity) SyncFences
    0x0000000140A86D57 (Unity) TransformChangeDispatch::GetAndClearChangedAsBatchedJobs_Internal
    0x0000000140A870EA (Unity) TransformChangeDispatch::GetAndClearChangedTransformsForMultipleSystems
    0x0000000140B368D3 (Unity) PhysicsManager::SyncTransforms
    0x0000000140B2ED38 (Unity) `PhysicsManager::InitializeClass'::`2'::EarlyUpdatePhysicsResetInterpolatedTransformPositionRegistrator::Forward
    0x0000000140949ACB (Unity) ExecutePlayerLoop
    0x0000000140949B94 (Unity) ExecutePlayerLoop
    0x000000014094C77C (Unity) PlayerLoop
    0x00000001413C9457 (Unity) PlayerLoopController::UpdateScene
    0x00000001413C82F9 (Unity) Application::TickTimer
    0x00000001415C213D (Unity) MainMessageLoop
    0x00000001415C442C (Unity) WinMain
    0x000000014271EDA7 (Unity) __scrt_common_main_seh
    0x00007FFB2B3A2774 (KERNEL32) BaseThreadInitThunk
    0x00007FFB2BE30D51 (ntdll) RtlUserThreadStart

    Looks the same as Jake's. My console also printed two more warnings right after this error that I have no clue what they mean. Both just said
    "No script asset for GameObjectSelectionItem. Check that the definition is in a file of the same name."

    My PC is running Windows 10 64 bit with an AMD FX-350, GTX 770, and 16g ram.
     
  16. JakeTurner

    JakeTurner

    Unity Technologies

    Joined:
    Aug 12, 2015
    Posts:
    136
    Thank you for the reports. I am on holiday for a week. When I am back we will work on a special build with more logging and abort/crash instead of the assert to let the debugger work and get a core dump.
    Thanks. Warning this could be a complex one to find and get fixed.
     
  17. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    5,967
    You'll figure it out, I believe in you :)
     
  18. georgeq

    georgeq

    Joined:
    Mar 5, 2014
    Posts:
    602
    In my experience when a bug is extremely hard to find it is also extremely simple to fix. Good luck and good hunting sir!
     
  19. Gillissie

    Gillissie

    Joined:
    May 16, 2011
    Posts:
    182
    Quick note... I just saw this message in 2018.1.1f1
     
  20. Shirzad

    Shirzad

    Joined:
    Dec 8, 2016
    Posts:
    13
    me too (2018.1.1f1)
     
  21. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    5,967
    If you have a project where this issue is reproducible, could you please submit a bug-report as explained in this document:
    https://unity3d.com/unity/qa/bug-reporting

    If Unity Technologies has a project to reproduce the issue, they normally come up with a fix much faster, which is good for us as well :)

    Once you submitted the bug-report, you receive a bug-report Case number. Unity normally asks us to post this number in the related forum thread, so they can find it quicker.
     
    LeonhardP and hippocoder like this.
  22. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    27,825
    Yeah I'm going to have to start locking threads that go around in circles without bug reports. Please file a new bug report as it'll save time. When staff has to ask if you're running SRP or not and a bunch of other questions, it's time for report.
     
    Peter77 likes this.
  23. moco2k

    moco2k

    Joined:
    Apr 29, 2015
    Posts:
    294
    I've also spotted this issue today for the first time. Version is Unity 2018.1.2f1 (64-bit). I've never seen this with any pre-2018 version before. Unfortunately, I have no repro case yet.
    Assertion failed: Multiple dependency jobs should not be in ScheduleDependencies
    0x00000001414EFFF9 (Unity) StackWalker::GetCurrentCallstack
    0x00000001414F6606 (Unity) StackWalker::ShowCallstack
    0x000000014138FCAB (Unity) GetStacktrace
    0x000000014088802C (Unity) DebugStringToFile
    0x00000001408833B6 (Unity) JobQueue::ScheduleDependencies
    0x0000000140883C96 (Unity) JobQueue::ScheduleJobMultipleDependencies
    0x000000014087C033 (Unity) ScheduleMultiDependencyJob
    0x000000014065325E (Unity) CullLocalLightShadowCasters
    0x00000001405A5A5C (Unity) AddLocalLightsJob
    0x000000014088291E (Unity) JobQueue::Exec
    0x0000000140882C3E (Unity) JobQueue::ExecuteJobFromHighPriorityStack
    0x00000001408830B9 (Unity) JobQueue::processJobs
    0x0000000140884AF9 (Unity) JobQueue::WorkLoop
    0x0000000140A74468 (Unity) Thread::RunThreadWrapper
    0x00000000770F59CD (kernel32) BaseThreadInitThunk
    0x000000007725383D (ntdll) RtlUserThreadStart
     
    Last edited: Jun 1, 2018
  24. georgeq

    georgeq

    Joined:
    Mar 5, 2014
    Posts:
    602
    Same problem with 2018.2.06b.... Still no idea of what triggers it or how to reproduce it.
     
  25. JakeTurner

    JakeTurner

    Unity Technologies

    Joined:
    Aug 12, 2015
    Posts:
    136
    Thanks for the reports yeah it is new piece of code in 2018.1 and newer versions of Unity.
    From looking at the code it looks like the asset could be triggered incorrectly in very exceptional edge cases (very timing related).
    Let me make a fix into 2018.1 and 2018.2
     
  26. JakeTurner

    JakeTurner

    Unity Technologies

    Joined:
    Aug 12, 2015
    Posts:
    136
    Basically it is safe to ignore this particular assert
     
  27. JakeTurner

    JakeTurner

    Unity Technologies

    Joined:
    Aug 12, 2015
    Posts:
    136
    I am looking for any volunteers who get this assert semi-regularly. I want to make a new build for you to see if the fix works. It looks to be an extreme edge case of perfect timing which I am unable to reproduce so far (in practice) but I can predict in theory.

    Please just give me the precise Unity version you are using and I can make a new Unity.exe with the fix in it.

    Thanks

    Jake
     
    arsamrahmaan31 likes this.
  28. georgeq

    georgeq

    Joined:
    Mar 5, 2014
    Posts:
    602
    I'm getting this message about once a month, I volunteer if that helps you. I just moved to 2018.2.07b.
     
  29. JakeTurner

    JakeTurner

    Unity Technologies

    Joined:
    Aug 12, 2015
    Posts:
    136
    Thank you - even better news. I have recreated the assert in a stress test case and verified the fix to the assert message has stopped it appearing
     
    Peter77, moco2k and grizzly like this.
  30. grizzly

    grizzly

    Joined:
    Dec 5, 2012
    Posts:
    314
    For the record, this has just popped up in my console too. Three times.

    Code (CSharp):
    1. Assertion failed: Multiple dependency jobs should not be in ScheduleDependencies

    2018.1.0f2 (64-bit)
     
  31. georgeq

    georgeq

    Joined:
    Mar 5, 2014
    Posts:
    602

    Great news!
    Thank you!
     
    Peter77 likes this.
  32. JakeTurner

    JakeTurner

    Unity Technologies

    Joined:
    Aug 12, 2015
    Posts:
    136
    Sorry for the delay. We spent a long time reviewing the code and the suggested fix to make sure everything felt robust.

    The fix has just landed to be in the next Unity release (currently in alpha).

    I will start the process of migrating the fix back to 2018.2 & 2018.1
     
    georgeq, LeonhardP and Peter77 like this.
  33. weijing123

    weijing123

    Joined:
    Feb 25, 2018
    Posts:
    1
    Assertion failed: Multiple dependency jobs should not be in ScheduleDependencies
    UnityEngine.GUIUtility: processEvent(Int32, IntPtr)

    unity 2018.1.3f11(64 bit)
     
  34. JakeTurner

    JakeTurner

    Unity Technologies

    Joined:
    Aug 12, 2015
    Posts:
    136
    The fix is heading to

    2018.3.0a3
    2018.2.0b11

    and is on its way to 2018.1 but I don't have a version number yet.
     
    Peter77 likes this.
  35. JakeTurner

    JakeTurner

    Unity Technologies

    Joined:
    Aug 12, 2015
    Posts:
    136
    The fix is heading to 2018.1.8f1
     
    NGC6543 and Peter77 like this.
unityunity