Search Unity

Assertion failed: Transform has SetIsDispatchInterested present when destroying the hierarchy.

Discussion in 'Editor & General Support' started by moco2k, Nov 18, 2017.

  1. Jack-Unity

    Jack-Unity

    Unity Technologies

    Joined:
    May 21, 2013
    Posts:
    34
    @KhenaB - apologies for the delay. It should be all fixed on 2017.4 for all the cases we know about. Have you been able to isolate the reproduction any further? Are you enabling and disabling colliders in your game before the scene changes?
     
  2. Khena_B

    Khena_B

    Joined:
    Aug 21, 2014
    Posts:
    273
    I should have edited my post, sent a bug report with a project and they confirmed it was a bug, tested and happening on 2017.4, here is the test project that was sent in case you want to check it out.
     

    Attached Files:

  3. Jack-Unity

    Jack-Unity

    Unity Technologies

    Joined:
    May 21, 2013
    Posts:
    34
    OK, that one looks a bit different as it seems to be related to particles. I don't think it's too much to worry about but it's a confusing message so we'll get it sorted.
     
    Khena_B likes this.
  4. Khena_B

    Khena_B

    Joined:
    Aug 21, 2014
    Posts:
    273
    Updated to 2018.1 and the problem is still happening, when is this going to be fixed?
     
  5. Jack-Unity

    Jack-Unity

    Unity Technologies

    Joined:
    May 21, 2013
    Posts:
    34
    Hi, we're still looking in to this. In the meantime you should be able to work around it by stopping all particle systems that have sub-emitters before you destroy that parent object. Or alternatively don't destroy the object at all and wait for the unload scene.
     
  6. Khena_B

    Khena_B

    Joined:
    Aug 21, 2014
    Posts:
    273
    Thanks, for now i've decided to stick with 2018.1 and just not call ParticleSystem.Play() on particle collision which was the cause of the error in my case (during a scene change), what i did was call Play() each time the particle collided so that it would restart with a new random start delay, it seems impossible without this trick to spawn a single burst particle at random intervals, like a droplet falling every 1-2 seconds, please let me know when this is fixed.

    Bit unrelated but it would be a good idea to add a particle "Loop Delay" option, similar to the Start Delay but for every time the particle system loops.
     
    Last edited: May 3, 2018
  7. Jack-Unity

    Jack-Unity

    Unity Technologies

    Joined:
    May 21, 2013
    Posts:
    34
    Hi we'll take that in to consideration for future development work on particles. Interesting to hear the use case.

    To keep this thread on track, we are actively looking in to the errors and getting a fix backported. I'll post back when we have more information.
     
    Khena_B likes this.
  8. Ahmadrazabhatti

    Ahmadrazabhatti

    Joined:
    Apr 17, 2018
    Posts:
    1
    At the end which version is best for developers unity 2017.3.3f1 has many issues.
     
  9. Shirzad

    Shirzad

    Joined:
    Dec 8, 2016
    Posts:
    13
    Hey Jack, got the same issue in 2018.1.0f2. Thanks for your help!
     
  10. Jack-Unity

    Jack-Unity

    Unity Technologies

    Joined:
    May 21, 2013
    Posts:
    34
    Hi @Shirzad, when you see the issue do you think it is also related to particles and collision events? We have a fix being verified for that which will be backported to 2018.2, .1 and 2017.4.

    However I wouldn't want to promise there aren't other ways to reproduce so any other info about when you are seeing it would be very useful.
     
  11. Invertex

    Invertex

    Joined:
    Nov 7, 2013
    Posts:
    1,550
    I am having the same errors still on 2018.1.1f1, but mine doesn't even involve destroying the hierarchy. I get these two errors:
    Assertion failed: Transform has SetIsDispatchInterested present when destroying the hierarchy. Systems must deregister themselves in Deactivate.

    Assertion failed: Transform has SetIsHierarchyDispatchInterested present when destroying the hierarchy. Systems must deregister themselves in Deactivate.


    It happens during our OnPostprocessModel() AssetImporter script, whenever we loop through the child objects and if there is a Renderer component, we try to assign our root Transform to its .probeAnchor value.

    With purely just that action, no deletions or manipulation of any sort, those two errors get thrown. It is quite strange.
    I submitted a case with an example project you can test with. The Case ID is 1040493.
     
  12. Jack-Unity

    Jack-Unity

    Unity Technologies

    Joined:
    May 21, 2013
    Posts:
    34
    OK, that's a new one - we'll take a look
     
  13. Jack-Unity

    Jack-Unity

    Unity Technologies

    Joined:
    May 21, 2013
    Posts:
    34
    Hi Invertex, a developer is assessing a fix for that now and will be backporting to 2018.1. I can't give a timescale yet but just wanted to let you know it is being looked at and a fix is incoming. Thanks for the bug report.
     
    Invertex likes this.
  14. YD_JMysior

    YD_JMysior

    Joined:
    Aug 4, 2016
    Posts:
    60
    Have the same on 2017.4.2f2f:

    Assertion failed: Transform has SetIsDispatchInterested present when destroying the hierarchy. Systems must deregister themselves in Deactivate.
    Assertion failed: Transform has SetIsHierarchyDispatchInterested present when destroying the hierarchy. Systems must deregister themselves in Deactivate.

    What's weird is I just got it right now. Been working on this version / project for over a month - no issues. All of a sudden this is spammed in my console.
     
  15. Jack-Unity

    Jack-Unity

    Unity Technologies

    Joined:
    May 21, 2013
    Posts:
    34
    Most of these errors are pretty subtle timing issues, sometimes only exposed when you change something else that can seem unrelated but they can also come for all areas of the engine so could you try and provide a bit more information about what might be happening at the time. Either to do with scene un/loading, destroying objects or calling particle API from OnParticleCollision. Is it consistently happening now or was it a one off thing?
     
  16. Shirzad

    Shirzad

    Joined:
    Dec 8, 2016
    Posts:
    13
    Hello @Jack-Unity

    I apologize for notifying you now. Unfortunately, the problem still exists. This problem always occurs when I go out of playmode. Unfortunately, we have not found a solution. We would be very grateful for a solution!

    Assertion failed: Transform has SetIsDispatchInterested present when destroying the hierarchy. Systems must deregister themselves in Deactivate.

    Unity Version 2018.1.1f1

    Thank you very much
     
    Last edited: May 30, 2018
  17. Jack-Unity

    Jack-Unity

    Unity Technologies

    Joined:
    May 21, 2013
    Posts:
    34
    Hi @Shirzad - I'd still like to hear a little more about what is causing the issue. Would you be able to submit a bug report for this which will capture some more information for us. Not all fixes have made it to 2018.1 yet but I'd like to know if I think we have one coming for you or not.
     
  18. Anthony-LAW

    Anthony-LAW

    Joined:
    Apr 21, 2012
    Posts:
    7
    Still got the same error after using 2017.3.1p4 or 2017.4.f1
     
  19. Jack-Unity

    Jack-Unity

    Unity Technologies

    Joined:
    May 21, 2013
    Posts:
    34
    Hi, as I've mentioned before, it would be very useful if you could expand on where/how you are seeing the messages. Not all fixes have reached the release branches yet, in particular errors associated with OnParticleCollision events are not in 2017.4 yet but if you are not doing anything with that event then it could be something new. Would you be able to strip this back for a bug report at all, or possibly a snippet from the editor log could help shed some more light on this.
     
  20. max_autious

    max_autious

    Joined:
    Dec 29, 2017
    Posts:
    9
    I'm getting this error when calling ReplacePrefab on 2018.1.3f1:

    Code (csharp):
    1. Assertion failed: Transform has SetIsDispatchInterested present when destroying the hierarchy. Systems must deregister themselves in Deactivate.
    2. UnityEditor.PrefabUtility:ReplacePrefab(GameObject, Object, ReplacePrefabOptions)
    3. ExScript:SavePrefab() (at Assets/Scripts/ExScript.cs:114)
    4. ExEditor:OnInspectorGUI() (at Assets/Scripts/ExScript.cs:23)
    5. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    6.  
    7. Assertion failed: Transform has SetIsHierarchyDispatchInterested present when destroying the hierarchy. Systems must deregister themselves in Deactivate.
    8. UnityEditor.PrefabUtility:ReplacePrefab(GameObject, Object, ReplacePrefabOptions)
    9. ExScript:SavePrefab() (at Assets/Scripts/ExScript.cs:114)
    10. ExEditor:OnInspectorGUI() (at Assets/Scripts/ExScript.cs:23)
    11. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
     
  21. SugoiDev

    SugoiDev

    Joined:
    Mar 27, 2013
    Posts:
    395
    Got it here as well with ReplacePrefab. Could not determine what exactly caused it to start happening.
    Closing and opening again made it go away and didn't see it again (yet).
     
  22. Jack-Unity

    Jack-Unity

    Unity Technologies

    Joined:
    May 21, 2013
    Posts:
    34
    Hi, could you provide a little more detail about the composition of the object and target prefab and in what situations you are replacing it. Trying a few things here and can't see those errors at all, but quite likely I'm missing a key component.
     
  23. SugoiDev

    SugoiDev

    Joined:
    Mar 27, 2013
    Posts:
    395
    In my particular case, I couldn't see any pattern. It seemed random.

    One thing that might be relevant is that once it starts happening, it will always happen, for any transform.


    I also tried a few things to get a consistent reproduction case but no luck so far.
     
  24. EthnoTekhBrad

    EthnoTekhBrad

    Joined:
    Nov 16, 2013
    Posts:
    6
    Hi, I am getting this same issue on a day dream build in 2018.2.0b7

    It happens when switching scenes. In editor it shows the errors, in build it causes the screen to go black and I have to manually exit.
     
  25. Jack-Unity

    Jack-Unity

    Unity Technologies

    Joined:
    May 21, 2013
    Posts:
    34
    Hi @EthnoTekhBrad, is that 100% reproducible? Are you able to try without Daydream involved at all? We are looking at improving the error messaging for this so we can help pinpoint the problem more clearly but in the meantime if you are able to submit a bug report we can take a look at that. The error caused in OnParticleCollision still has not landed in 2018.2 or earlier so if you are using that event that might have something to do with it.
     
  26. Seith

    Seith

    Joined:
    Nov 3, 2012
    Posts:
    755
    Hey guys, I just wanted to say that I also sometimes see a flood of errors like that when I exit play mode in the editor. It is indeed jarring and less-than-ideal.

    I'm sorry I don't have any more information about this: I just upgraded the Ghost of a Tale project from 5.5 to 2017.4 and that's definitely a "new" issue for me (never saw that one before).

    All I can say is I believe it is related to having multiple scenes being additively loaded at run time. When the game stops, the editor gets rid of the aforementioned scenes and that seems to cause the issue.

    I really hope you can fix it!

    Edit:
    Yep, I can confirm this is a multi-scene related issue. It happens every time the scenes are unloaded when exiting play mode.
     
    Last edited: Jul 3, 2018
  27. Jack-Unity

    Jack-Unity

    Unity Technologies

    Joined:
    May 21, 2013
    Posts:
    34
    Hi Seith, yeah we're trying to get all of these gone but the last ones are proving hard to reproduce. I've tried various scenarios with multiple additive scenes and object hierarchies with mixed active states as they seem to be related to the problem, but so far have not seen the errors at all.

    So are you seeing it 100% of the time with a multi-scene setup? The new transform system was introduced in 2017.2 which is why you are seeing it after upgrade. We've got some changes coming which should help show where the problem is coming from but in the meantime a bug report with repro would be incredibly useful if you can strip back the problem at all.
     
  28. Seith

    Seith

    Joined:
    Nov 3, 2012
    Posts:
    755
    Yes, it happens 100% of times on the project. Now problem is I can't just send the project: it's over 50Gb now and my internet connection uploads at 0.85Mbps.

    If I can be of any assistance over Skype (screen-sharing) I could show you the error messages of course, and maybe we could try doing some tests if that can help you pinpoint the issue. Anyway, just a thought.
     
  29. Jack-Unity

    Jack-Unity

    Unity Technologies

    Joined:
    May 21, 2013
    Posts:
    34
    Perhaps we could start with something more high level - how many scenes are typically loaded at the time? I assume the scenes are a complex mix of lots of different objects, is there much enabling and disabling of objects in hierarchies occurring? Are you using OnParticleCollision events much? Would you be prepared to share the editor log? Send it privately if needed.
     
  30. Seith

    Seith

    Joined:
    Nov 3, 2012
    Posts:
    755
    Sorry for the delay in my reply. So there are roughly 30 scenes loaded at a time. I don't use OnParticleCollision events much (if at all). The number of errors popping up when exiting game mode seems to match the number of particle emitters that were active (and alive) at the time the game stopped.

    I'll send you the log file privately...
     
  31. Jack-Unity

    Jack-Unity

    Unity Technologies

    Joined:
    May 21, 2013
    Posts:
    34
    Hi, 2017.4.8f1 contains another fix for this error and also has a more descriptive error message for other situations. Please update us here if this release helps or with new information.
     
  32. Tekksin

    Tekksin

    Joined:
    Oct 20, 2013
    Posts:
    32
    I got this error when opening an empty project and importing unity's own book of the dead scene in 2018.2
     
  33. shubhamshetkar25

    shubhamshetkar25

    Joined:
    Feb 4, 2017
    Posts:
    21
    Transform has 'gParticleSystemTRSInterest|gParticleSystemScaleInterest' change interests present when destroying the hierarchy. Interests must be deregistered in Deactivate.

    I'm getting this issue
     
  34. jensskinnerup

    jensskinnerup

    Unity Technologies

    Joined:
    May 23, 2016
    Posts:
    2
    Do you have more information, please? A version number and maybe a project?
     
  35. shubhamshetkar25

    shubhamshetkar25

    Joined:
    Feb 4, 2017
    Posts:
    21
    in Unity 2018.2
    and I,m working with unity Tower Defense Template
    i gets this error in play mode on completing level
     
  36. emptybraces

    emptybraces

    Joined:
    Mar 30, 2015
    Posts:
    22
    Hi, Our projects using 2017.4.13f1(64bit) gets 100% assertion when exit playmode on editor.
    I did not keep track of which object is emitting, I will log it for your reference.
    The following assertions occur 6 times.
    It did not occur in 2017.1 maybe..
    Code (CSharp):
    1.  
    2. Transform has 'gParticleSystemTRSInterest|gParticleSystemLateTRSInterest|gParticleSystemScaleInterest' change interests present when destroying the hierarchy. Interests must be deregistered in Deactivate.
    3. 0x00000001412F9736 (Unity) StackWalker::GetCurrentCallstack
    4. 0x00000001412FA2AF (Unity) StackWalker::ShowCallstack
    5. 0x00000001411B7F60 (Unity) GetStacktrace
    6. 0x00000001406DEF73 (Unity) DebugStringToFile
    7. 0x00000001406DF751 (Unity) DebugStringToFile
    8. 0x00000001408D1420 (Unity) ValidateInterestedSystemsIsEmpty
    9. 0x00000001408D631E (Unity) Transform::MainThreadCleanup
    10. 0x00000001403B80AE (Unity) delete_object_internal_step1
    11. 0x00000001406FC422 (Unity) CommitBatchDelete
    12. 0x0000000140717395 (Unity) DestroyGameObjectHierarchy
    13. 0x000000014072033A (Unity) DestroyObjectHighLevel
    14. 0x00000001407B0721 (Unity) DestroyWorldObjects
    15. 0x0000000140C93B91 (Unity) EditorSceneManager::RestoreSceneBackups
    16. 0x00000001411EF5CE (Unity) PlayerLoopController::ExitPlayMode
    17. 0x00000001411EFD5D (Unity) PlayerLoopController::SetIsPlaying
    18. 0x00000001411F0BA6 (Unity) Application::TickTimer
    19. 0x0000000141417DCF (Unity) MainMessageLoop
    20. 0x000000014141968C (Unity) WinMain
    21. 0x0000000141E719A8 (Unity) __tmainCRTStartup
    22. 0x00007FFBEFF33034 (KERNEL32) BaseThreadInitThunk
    23. 0x00007FFBF03D1461 (ntdll) RtlUserThreadStart
    24.  
    25. (Filename: C:\buildslave\unity\build\Runtime/Transform/Transform.cpp Line: 1661)
    26.  
    27. Transform has 'gParticleSystemHierarchyInterest' hierarchy interests present when destroying the hierarchy. Interests must be deregistered in Deactivate.
    28. 0x00000001412F9736 (Unity) StackWalker::GetCurrentCallstack
    29. 0x00000001412FA2AF (Unity) StackWalker::ShowCallstack
    30. 0x00000001411B7F60 (Unity) GetStacktrace
    31. 0x00000001406DEF73 (Unity) DebugStringToFile
    32. 0x00000001406DF751 (Unity) DebugStringToFile
    33. 0x00000001408D154B (Unity) ValidateInterestedSystemsIsEmpty
    34. 0x00000001408D631E (Unity) Transform::MainThreadCleanup
    35. 0x00000001403B80AE (Unity) delete_object_internal_step1
    36. 0x00000001406FC422 (Unity) CommitBatchDelete
    37. 0x0000000140717395 (Unity) DestroyGameObjectHierarchy
    38. 0x000000014072033A (Unity) DestroyObjectHighLevel
    39. 0x00000001407B0721 (Unity) DestroyWorldObjects
    40. 0x0000000140C93B91 (Unity) EditorSceneManager::RestoreSceneBackups
    41. 0x00000001411EF5CE (Unity) PlayerLoopController::ExitPlayMode
    42. 0x00000001411EFD5D (Unity) PlayerLoopController::SetIsPlaying
    43. 0x00000001411F0BA6 (Unity) Application::TickTimer
    44. 0x0000000141417DCF (Unity) MainMessageLoop
    45. 0x000000014141968C (Unity) WinMain
    46. 0x0000000141E719A8 (Unity) __tmainCRTStartup
    47. 0x00007FFBEFF33034 (KERNEL32) BaseThreadInitThunk
    48. 0x00007FFBF03D1461 (ntdll) RtlUserThreadStart
    49.  
    50. (Filename: C:\buildslave\unity\build\Runtime/Transform/Transform.cpp Line: 1662)
     
  37. emptybraces

    emptybraces

    Joined:
    Mar 30, 2015
    Posts:
    22
    In my case, the gameobjects that outputs assertions are, it was a particle set in SubEmitters and it was placed in a child.
    I have moving to the same level parent particle and the assertion disappeared:)
     
  38. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    FYI we are working on a fix, and you can keep an eye on the bug report progress here:
    https://issuetracker.unity3d.com/product/unity/issues/guid/1096693/
     
  39. tyrron14

    tyrron14

    Joined:
    Nov 15, 2018
    Posts:
    1
    Disabling the AR Point Cloud Visualizer on the AR Root GameObject removes the error. I use Map Box sdk



     
  40. Magasenakwa

    Magasenakwa

    Joined:
    Oct 13, 2018
    Posts:
    91
    2018.2.20f1
    Using the Tower Defense demo project Unity provides. Whenever a particle was generated by the turrets firing a shot, reloading the scene / gobing to the next scene results in dozens of errors.

    I also get a problem that seems to happen at random but when it happens I get hundreds of errors as ti doesn't stop until just as random. I keep getting errors saying the object is too large or too far away from origin. I am assuming this is the particles also since this is what is causing the other errors in the game...
     
    Last edited: Apr 11, 2019
  41. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    Pretty sure this got fixed, either in a patch or in 2018.3
     
  42. linojon

    linojon

    Joined:
    Aug 25, 2014
    Posts:
    118
    Hi, in 2018.4.3f1, i'm getting a similar (but not identical) error, on Play and when I build (standalone, SteamVR), although it seems benign-- plays, completes the builds and runs.

    Transform has 'ReflectionProbeAnchorManager::kChangeSystem' change interests present when destroying the hierarchy. Interests must be deregistered in Deactivate.
    UnityEngine.GUIUtility: ProcessEvent(Int32, IntPtr)

    Transform has 'ReflectionProbeAnchorManager::kHierarchyChangeSystem' hierarchy interests present when destroying the hierarchy. Interests must be deregistered in Deactivate.
    UnityEngine.GUIUtility: ProcessEvent(Int32, IntPtr)