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

Hey everyone,

after updating to the latest Unity patch 2017.2.0p2, I sometimes encounter the following assertion errors after closing an editor game session in play mode:

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

0x00000001411BD6CB (Unity) StackWalker::GetCurrentCallstack
0x00000001411C005F (Unity) StackWalker::ShowCallstack
0x000000014109A150 (Unity) GetStacktrace
0x000000014059A493 (Unity) DebugStringToFile
0x000000014059AC71 (Unity) DebugStringToFile
0x00000001407C21EA (Unity) ValidateInterestedSystemsIsEmpty
0x00000001407C757E (Unity) Transform::MainThreadCleanup
0x0000000140255A99 (Unity) delete_object_internal_step1
0x00000001405B7522 (Unity) CommitBatchDelete
0x00000001405CAC85 (Unity) DestroyGameObjectHierarchy
0x00000001405DBC3F (Unity) DestroyObjectHighLevel
0x00000001405FA11D (Unity) DestroyWorldObjects
0x0000000140B8B9F6 (Unity) EditorSceneManager::RestoreSceneBackups
0x00000001410D052A (Unity) PlayerLoopController::ExitPlayMode
0x00000001410D0BB0 (Unity) PlayerLoopController::SetIsPlaying
0x00000001410D1A02 (Unity) Application::TickTimer
0x00000001412DB5E9 (Unity) MainMessageLoop
0x00000001412DCEA4 (Unity) WinMain
0x0000000141DF75D8 (Unity) __tmainCRTStartup
0x0000000077A959CD (kernel32) BaseThreadInitThunk
0x0000000077CCA561 (ntdll) RtlUserThreadStart

I think that this even leads to crashes in builds, but I’m not definitely sure about this so far.
I’ve never seen this before the latest patch.

Any help is much appreciated.

Thanks.

This looks related:

1 Like

I have same issue after updating 2017.2.0p2.

I turned on XR settings. (Oculus, Daydream)
When I load another scene using SceneManager, the below error occur.

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.

1 Like

Do any of you have reproducible steps without using Vuforia? I can certainly reproduce this using the Vuforia steps, but as most of you are seeing this without Vuforia present, I want to run through some known cases to make sure the same fix works across the board.

Me too!
This error now appears after upgrading to “Unity 2017.2.0p3”.
So I posted it on the forum.

In addition, I do not use VUFORIA.
This error appears when you close the play mode or make a scene transition.

I am troubled by this error as well!
This error now appears after upgrading to “Unity 2017.2.0p3”.
So I posted it on the forum.

https://discussions.unity.com/t/684509

In addition, I do not use VUFORIA.
This error appears when make a scene transition.

Same here. Not using VUFORIA. I have an object that that starts in the scene. I delete that one in the game, and spawn a new one. When I delete the spawned one, I get this error, but not when I delete the original one.

I’m seeing the same thing in Unity 2017.2.0p4, in a similar situation to Tyrathect.

1 Like

@gudouan @Tyrathect Could either of you create a project that reproduces the issue and file a bug report with the repro steps? It sounds like Tyrathect you have one that is easy for you to reproduce.
If you can, please post the bug number on this forum and include this forum post in the bug report description.

I think chances are that this assertion issue might be somehow related to a previous assertion issue . I have some rough indicators for this guess. First, the previous assertion issue has been fixed in 2017.2.0p2. With this very same version, the new issue described in this thread started to appear. Second, based on my test results, I think that both assertion issues are related to scene complexity so that a higher scene complexity increases chances that the issue appears. Also, they both seem to be somehow related to the scene hierarchy.

So, in order to find the root cause of this assertion, maybe it is also helpful to look into the repro-cases and solution of the previous issue.

This is happening whenever a collider is disabled on a GameObject which is not currently activeInHierarchy. Here’s a simple repro:

var obj = new GameObject();
var collider = obj.AddComponent();

// Disable the collider (while the object is inactive)
obj.SetActive(false);
collider.enabled = false;

// Destroying the object will result in “Assertion failed” errors
Destroy(obj);

I filed a new bug today with an example project and a couple additional scenarios (Case 979801), but it was closed as a duplicate.

Thank you!

2 Likes

Can confirm that Steedy seems to have figured out the issue - this is confirmed on my project, whenever i end play mode in the editor with deactivated gameobjects with colliders on them i get a bunch of the errors. This happens in 2017.3.0f3

I had this problem today, using 2017.3.0f3 . I was reactivating a bunch of stuff in onDisable, which caused this error. Moving my code to onEnable solved this problem. Its weird since my code worked fine in older builds.

To be clear I was reactivating a colider, a child game object on OnDisable. . .nothing much but caused this said error.

Does anyone know the issue tracker number for this or an ETA for when it could be in a beta build?

Edit: oops it was at the top!

Was about to report same issue (2017.3.0f3).
Seems like a lot of assertions and errors appeared in 2017.3 or 2017.x which should never appear.
Earlier versions of Unity were much cleaner is this sense and quietly dealt with issues if there even were any

We also encounter with this…

happens here as well.

i get issue as well and i am getting it from my bullet pooling system.
i get the error when i use gameObject.SetActive(false); on a Instantiate gameobject at runtime
which my gameobject has 4 components a rigidbody, trail render,box collider, and a cs script

The way i got rid of the errors was not to call gameObject.SetActive(false);
the work around as of right not just store my bullet in a dark corner lol

Workaround for those who are using Vuforia.
Do not use default traking script. Default script iterate all colliders, mesh renderes and canvases to enable/siable them, while it is good for performance reasons (in case you have many game objects) it couse our errors. Change script (or better make new one, that just disable/enable game objects and not components. Ideally, make reference to all augmentation objects and make them enable/disable on tracking find and lost events.