Editor keeps crashing on start all of a sudden with Assertion failed on expression: '!gameObject.IsA

Hello all,
My game keeps crashing whenever I hit play. I have been messing with everything I can think of and I can’t find anything wrong. All was fine, then on time I hit play (I was only messing around with the positioning of things at the time) and this started, and it happens every time now.

0x00000001408C64F1 (Unity) FindActiveTransformWithPathImpl
0x00000001408C4C80 (Unity) FindActiveTransformWithPath
0x000000014142B906 (Unity) GameObject_CUSTOM_Find
0x00000000C72796A5 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.GameObject:Find (string)
0x00000000C7279548 (Mono JIT Code) [C:\buildslave\unity\build\Extensions\TestRunner\UnityEngine.TestRunner\TestRunner\PlaymodeTestsController.cs:48] UnityEngine.TestTools.TestRunner.PlaymodeTestsController:IsControllerOnScene ()
0x00000000C7279106 (Mono JIT Code) [C:\buildslave\unity\build\Extensions\TestRunner\UnityEditor.TestRunner\TestLaunchers\PlaymodeLauncher.cs:98] UnityEditor.TestTools.TestRunner.PlaymodeLauncher/BackgroundWatcher:OnPlayModeStateChanged (UnityEditor.PlayModeStateChange)
0x00000000C7278AC4 (Mono JIT Code) (wrapper delegate-invoke) System.Action`1<UnityEditor.PlayModeStateChange>:invoke_void__this___PlayModeStateChange (UnityEditor.PlayModeStateChange)
0x00000000C7278AC4 (Mono JIT Code) (wrapper delegate-invoke) System.Action`1<UnityEditor.PlayModeStateChange>:invoke_void__this___PlayModeStateChange (UnityEditor.PlayModeStateChange)
0x00000000C7278AC4 (Mono JIT Code) (wrapper delegate-invoke) System.Action`1<UnityEditor.PlayModeStateChange>:invoke_void__this___PlayModeStateChange (UnityEditor.PlayModeStateChange)
0x00000000C7278AC4 (Mono JIT Code) (wrapper delegate-invoke) System.Action`1<UnityEditor.PlayModeStateChange>:invoke_void__this___PlayModeStateChange (UnityEditor.PlayModeStateChange)

I’m having this exact same issue and have been struggling to find the cause/solution. If I wipe my temp and library directories and let everything import/rebuild it usually works again (but not 100% of the time), or if I roll back to an earlier commit in my git repo then reapply my changes it sometimes works again (again, not 100% of the time). When I do get it working again, it’s only a short while before the problem pops back up for me.

0x00000001403BFA26 (Unity) GameObject::IsActive
0x00000001408C68E6 (Unity) FindActiveTransformWithPathImpl
0x00000001408C5100 (Unity) FindActiveTransformWithPath
0x000000014142CDA6 (Unity) GameObject_CUSTOM_Find
0x000000004B8DB7EE (Mono JIT Code) (wrapper managed-to-native) UnityEngine.GameObject:Find (string)
0x000000004B8DB66F (Mono JIT Code) [C:\buildslave\unity\build\Extensions\TestRunner\UnityEngine.TestRunner\TestRunner\PlaymodeTestsController.cs:48] UnityEngine.TestTools.TestRunner.PlaymodeTestsController:IsControllerOnScene ()
0x000000004B8DB1F6 (Mono JIT Code) [C:\buildslave\unity\build\Extensions\TestRunner\UnityEditor.TestRunner\TestLaunchers\PlaymodeLauncher.cs:98] UnityEditor.TestTools.TestRunner.PlaymodeLauncher/BackgroundWatcher:OnPlayModeStateChanged (UnityEditor.PlayModeStateChange)
0x000000004B8DB0A2 (Mono JIT Code) (wrapper delegate-invoke) System.Action`1<UnityEditor.PlayModeStateChange>:invoke_void_T (UnityEditor.PlayModeStateChange)
0x000000004B8DA884 (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\EditorApplication.cs:219] UnityEditor.EditorApplication:Internal_PlayModeStateChanged (UnityEditor.PlayModeStateChange)
0x000000004AB2016A (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_int (object,intptr,intptr,intptr)
0x00007FFA4D41436A (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\mini\mini-runtime.c:2620] mono_jit_runtime_invoke
0x00007FFA4D619567 (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\object.c:2853] do_runtime_invoke
0x00007FFA4D621F6F (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\object.c:2905] mono_runtime_invoke
0x00000001407ECDC9 (Unity) mono_runtime_invoke_profiled
0x0000000140A22A2E (Unity) CallStaticMonoMethod
0x0000000140A22B3F (Unity) CallStaticMonoMethod
0x0000000140A23BB1 (Unity) CallStaticMonoMethod
0x00000001411DF0D6 (Unity) PlayerLoopController::SetIsPlayingDelayed
0x000000004B8DA61E (Mono JIT Code) (wrapper managed-to-native) UnityEditor.EditorApplication:set_isPlaying (bool)
0x000000004B8DA4D7 (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\GUI\Toolbar.cs:719] UnityEditor.Toolbar:TogglePlaying ()
0x000000004ACF0729 (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\GUI\Toolbar.cs:523] UnityEditor.Toolbar:smile:oPlayButtons (bool)
0x000000004ACE53AC (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\GUI\Toolbar.cs:367] UnityEditor.Toolbar:OldOnGUI ()
0x000000004AB03689 (Mono JIT Code) [C:\buildslave\unity\build\Runtime\UIElements\Managed\IMGUIContainer.cs:182] UnityEngine.Experimental.UIElements.IMGUIContainer:smile:oOnGUI (UnityEngine.Event)
0x000000004AB02389 (Mono JIT Code) [C:\buildslave\unity\build\Runtime\UIElements\Managed\IMGUIContainer.cs:340] UnityEngine.Experimental.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event)
0x000000003FFB1F2F (Mono JIT Code) [C:\buildslave\unity\build\Runtime\UIElements\Managed\IMGUIContainer.cs:322] UnityEngine.Experimental.UIElements.IMGUIContainer:HandleEvent (UnityEngine.Experimental.UIElements.EventBase)
0x000000003FFA4CAC (Mono JIT Code) [C:\buildslave\unity\build\Runtime\UIElements\Managed\EventDispatcher.cs:251] UnityEngine.Experimental.UIElements.EventDispatcher:smile:ispatchEvent (UnityEngine.Experimental.UIElements.EventBase,UnityEngine.Experimental.UIElements.IPanel)
0x000000004AACA124 (Mono JIT Code) [C:\buildslave\unity\build\Runtime\UIElements\Managed\UIElementsUtility.cs:252] UnityEngine.Experimental.UIElements.UIElementsUtility:smile:oDispatch (UnityEngine.Experimental.UIElements.BaseVisualElementPanel)
0x000000004AAC8E67 (Mono JIT Code) [C:\buildslave\unity\build\Runtime\UIElements\Managed\UIElementsUtility.cs:78] UnityEngine.Experimental.UIElements.UIElementsUtility:ProcessEvent (int,intptr)
0x000000004AAC7CD4 (Mono JIT Code) [C:\buildslave\unity\build\Runtime\IMGUI\Managed\GUIUtility.cs:175] UnityEngine.GUIUtility:ProcessEvent (int,intptr)
0x000000004AAC7FFF (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_bool_int_intptr (object,intptr,intptr,intptr)
0x00007FFA4D41436A (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\mini\mini-runtime.c:2620] mono_jit_runtime_invoke
0x00007FFA4D619567 (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\object.c:2853] do_runtime_invoke
0x00007FFA4D621F6F (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\object.c:2905] mono_runtime_invoke
0x0000000140A2EF6C (Unity) scripting_method_invoke
0x0000000140A229AA (Unity) ScriptingInvocation::Invoke
0x0000000140A23A5A (Unity) ScriptingInvocation::Invoke<bool>
0x0000000140282DAE (Unity) IMGUIScriptingClasses::ProcessEvent
0x000000014112A4AF (Unity) GUIView::ProcessRetainedMode
0x00000001413FAA88 (Unity) GUIView::OnInputEvent
0x000000014112A34C (Unity) GUIView::ProcessInputEvent
0x00000001413F2A55 (Unity) GUIView::ProcessEventMessages
0x00000001413FCA4A (Unity) GUIView::GUIViewWndProc
0x00007FFA7FC3BC50 (USER32) CallWindowProcW
0x00007FFA7FC3B5CF (USER32) DispatchMessageW
0x000000014140FE90 (Unity) MainMessageLoop
0x00000001414117AC (Unity) WinMain
0x0000000141E65728 (Unity) __tmainCRTStartup
0x00007FFA80522774 (KERNEL32) BaseThreadInitThunk
0x00007FFA81E50D51 (ntdll) RtlUserThreadStart

Using Unity version 2017.3.1f1

Mine ended up being a corrupted scene file. I took everything in my scene saved it all as prefabs in a folder, made a new scene, put it all back in, and everything was fine, not only that, it felt like it was running twice as good.

That’s interesting. I get the issue with any scene once it starts happening. I’d be inclined to think it’s an issue with one of my prefabs, but it’s strange that the issue goes away temporarily when i roll-back/re-apply some git commits and then just comes back after a while - usually a few days later.

Hopefully your issue doesn’t creep back like mine does.

I’m in the ‘broken’ state right now so I’ve been slowly walking through all my scripts setting breakpoints, etc to try narrowing down where the crash happens.

Oh the joys of game dev… lol. Good luck man.