Search Issue Tracker
Not Reproducible
Votes
0
Found in
5.5.1f1
Issue ID
878427
Regression
Yes
[UI] Destroying Canvas that has another Canvas as child crashes in UI::Canvas::GetRenderMode()
Destroying a Canvas that is added via a script on an object that has a child with Canvas, crashes Unity Editor.
Steps to reproduce:
1) Open the attached project.
2) Open 'Main' scene.
3) Enter play mode.
4) Press 'Space'.
Unity instantly crashes in UI::Canvas::GetRenderMode(). The destroyed Canvas is added to an empty object via script. If it is manually added to the object before runtime, the crash doesn't occur.
Reproduced on:
5.6.0b7, 5.5.1p3, 5.4.4p3
Did not reproduce:
5.3.7p4, 5.2.4f1
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Inconsistent logic on when 'open VFX graph Samples' button appears on Visual Effect Graph in Package Manager
- Unable to dock tabs on panels when non-standard pointers are used (touch-screen, tablet and pen)
- Editor hangs when rendering TMP Text Component with Left and Right Margins set in the Extra Settings
- Occlusion's fields can be set to negative numbers
- Issues with tutorial content in Universal 3D sample
keht-ns
Oct 16, 2017 12:24
Unity 5.6.2f also affected
========== OUTPUTING STACK TRACE ==================
0x000000014192BDC3 (Unity) UI::Canvas::GetRenderMode
0x000000014120319D (Unity) UI::CanvasRenderer::OnTransformChanged
0x000000014090F4E0 (Unity) GameObject::SendMessageAny
0x00000001411DE0F3 (Unity) ImmediatePtr<Transform>::Transfer<StreamedBinaryWrite<1> >
0x00000001411DE37B (Unity) ImmediatePtr<Transform>::Transfer<StreamedBinaryWrite<1> >
0x00000001411E62EB (Unity) Transform::SendTransformChanged
0x00000001411E6A60 (Unity) UI::RectTransform::UpdatePosAndRectRecursive
0x00000001411E6B44 (Unity) UI::RectTransform::UpdatePosAndRectRecursive
0x00000001411EA023 (Unity) UI::RectTransform::SetSizeDelta
0x0000000141443C02 (Unity) RectTransform_CUSTOM_INTERNAL_set_sizeDelta
0x0000000042EEB495 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.RectTransform:INTERNAL_set_sizeDelta (UnityEngine.Vector2&)
0x0000000042EEB32B (Mono JIT Code) [C:\buildslave\unity\build\artifacts\generated\common\runtime\RectTransformBindings.gen.cs:174] UnityEngine.RectTransform:set_sizeDelta (UnityEngine.Vector2)
0x0000000056348A21 (Mono JIT Code) [C:\buildslave\unity\build\artifacts\generated\common\runtime\RectTransformBindings.gen.cs:344] UnityEngine.RectTransform:SetSizeWithCurrentAnchors (UnityEngine.RectTransform/Axis,single)
0x000000005634855D (Mono JIT Code) [C:\buildslave\unity\build\Extensions\guisystem\UnityEngine.UI\UI\Core\Layout\ContentSizeFitter.cs:73] UnityEngine.UI.ContentSizeFitter:HandleSelfFittingAlongAxis (int)
0x0000000056348070 (Mono JIT Code) [C:\buildslave\unity\build\Extensions\guisystem\UnityEngine.UI\UI\Core\Layout\ContentSizeFitter.cs:79] UnityEngine.UI.ContentSizeFitter:SetLayoutHorizontal ()
0x000000005633C360 (Mono JIT Code) [C:\buildslave\unity\build\Extensions\guisystem\UnityEngine.UI\UI\Core\Layout\LayoutRebuilder.cs:71] UnityEngine.UI.LayoutRebuilder:<Rebuild>m__3 (UnityEngine.Component)
0x000000005633BC4C (Mono JIT Code) [C:\buildslave\unity\build\Extensions\guisystem\UnityEngine.UI\UI\Core\Layout\LayoutRebuilder.cs:98] UnityEngine.UI.LayoutRebuilder:PerformLayoutControl (UnityEngine.RectTransform,UnityEngine.Events.UnityAction`1<UnityEngine.Component>)
0x00000000563136EE (Mono JIT Code) [C:\buildslave\unity\build\Extensions\guisystem\UnityEngine.UI\UI\Core\Layout\LayoutRebuilder.cs:71] UnityEngine.UI.LayoutRebuilder:Rebuild (UnityEngine.UI.CanvasUpdate)
0x000000005631147C (Mono JIT Code) [C:\buildslave\unity\build\Extensions\guisystem\UnityEngine.UI\UI\Core\CanvasUpdateRegistry.cs:122] UnityEngine.UI.CanvasUpdateRegistry:PerformUpdate ()
0x000000005680959C (Mono JIT Code) (wrapper delegate-invoke) UnityEngine.Canvas/WillRenderCanvases:invoke_void__this__ ()
0x0000000056311119 (Mono JIT Code) [C:\buildslave\unity\build\artifacts\generated\common\modules\UI\UICanvasBindings.gen.cs:240] UnityEngine.Canvas:SendWillRenderCanvases ()
0x0000000030010F6E (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
0x000007FED3025823 (mono) [c:\buildslave\mono\build\mono\mini\mini.c:4937] mono_jit_runtime_invoke
0x000007FED2F78435 (mono) [c:\buildslave\mono\build\mono\metadata\object.c:2623] mono_runtime_invoke
0x0000000141072BA5 (Unity) scripting_method_invoke
0x00000001410684F1 (Unity) ScriptingInvocation::Invoke
0x00000001411F613E (Unity) UI::CanvasManager::WillRenderCanvases
0x0000000141494800 (Unity) PlayerCleanupCachedData
0x0000000140D7E461 (Unity) PlayerLoop
0x0000000141730EEE (Unity) Application::UpdateScene
0x00000001417326BF (Unity) Application::UpdateSceneIfNeeded
0x000000014173AF3A (Unity) Application::TickTimer
0x000000014180693C (Unity) CrashCallback
0x0000000141808584 (Unity) WinMain
0x0000000141AECE74 (Unity) strnlen
0x0000000076CF59CD (kernel32) BaseThreadInitThunk
0x0000000076E2A561 (ntdll) RtlUserThreadStart
radwaniecki
May 11, 2017 05:59
[Unity 5.5.0p4] Crashes in the same place, although the source of the problem seems to be different. Call stack:
UI::Canvas::GetRenderMode() const (in ---) (Canvas.cpp:1355)
UI::CanvasRenderer::OnTransformChanged(int) (in ---) (CanvasRenderer.cpp:464)
UI::CanvasRenderer::OnTransformChanged(int) (in ---) (CanvasRenderer.cpp:464)
GameObject::SendMessageAny(MessageIdentifier const&, MessageData&) (in ---) (dynamic_array.h:370)
SendTransformChangedMask(TransformHierarchy const&, int, int) (in ---) (Transform.cpp:953)
Transform::SendTransformChangedToModifiedTransforms() (in ---) (Transform.cpp:1029)
Animator::WriteProperties(float, float) (in ---) (Animator.cpp:793)
Animator::UpdateAvatars(dynamic_array<DirectorJob, 8ul> const&, bool, bool, bool) (in ---) (Animator.cpp:770)
DirectorManager::ExecuteStage(DirectorStage) (in CBD) (vector:1480)
PlayerLoop() (in CBD) (PlayerLoop.cpp:182)
UnityPlayerLoopImpl(bool) (in CBD) (LibEntryPoint.mm:200)
UnityRepaint (in CBD) (UnityAppController+Rendering.mm:247)