Editor crash when changing vector image size in UI Builder

I’m experiencing Editor crashes using vector images with UI Toolkit since Unity 2022.2.b16, release version has this problem as well.

Log

Obtained 56 stack frames. #0 0x00000103a5e84c in UIToolkit::VectorUtils::MakeVectorGraphicsStretchBackground(dynamic_array<UIToolkit::Vertex, 0ul> const&, dynamic_array<unsigned short, 0ul> const&, float, float, RectT const&, RectT const&, RectT const&, UIToolkit::ScaleMode, ColorRGBAf const&, UIToolkit::ColorPage const&, int, UIToolkit::MeshWriteData&, int&, int&) #1 0x00000103a5e2e8 in UIToolkit::MeshBuilder::MakeVectorGraphicsStretchBackground(dynamic_array<UIToolkit::Vertex, 0ul> const&, dynamic_array<unsigned short, 0ul> const&, float, float, RectT const&, RectT const&, UIToolkit::ScaleMode, ColorRGBAf const&, UIToolkit::ColorPage const&, int, int&, int&) #2 0x00000102a329d8 in MeshBuilderNative_CUSTOM_MakeVectorGraphicsStretchBackground_Injected(ScriptingBackendNativeArrayPtrOpaque*, ScriptingBackendNativeArrayPtrOpaque*, float, float, RectT const&, RectT const&, UIToolkit::ScaleMode, ColorRGBAf const&, UIToolkit::ColorPage const&, int, int*, int*, UIToolkit::MeshWriteDataInterface&) #3 0x000003d45b5658 in (wrapper managed-to-native) UnityEngine.UIElements.MeshBuilderNative:MakeVectorGraphicsStretchBackground_Injected (UnityEngine.UIElements.Vertex[ ],uint16[ ],single,single,UnityEngine.Rect&,UnityEngine.Rect&,UnityEngine.ScaleMode,UnityEngine.Color&,UnityEngine.UIElements.MeshBuilderNative/NativeColorPage&,int,int&,int&,UnityEngine.UIElements.MeshWriteDataInterface&) [{0x3bb3265d8} + 0x100] (0x3d45b5558 0x3d45b56bc) [0x137f82a80 - Unity Child Domain] #4 0x000003d45b54c4 in UnityEngine.UIElements.MeshBuilderNative:MakeVectorGraphicsStretchBackground (UnityEngine.UIElements.Vertex[ ],uint16[ ],single,single,UnityEngine.Rect,UnityEngine.Rect,UnityEngine.ScaleMode,UnityEngine.Color,UnityEngine.UIElements.MeshBuilderNative/NativeColorPage,int,int&,int&) [{0x3bb326228} + 0xbc] (0x3d45b5408 0x3d45b5508) [0x137f82a80 - Unity Child Domain] #5 0x000003d45b4eb4 in UnityEngine.UIElements.UIR.Implementation.UIRStylePainter:MakeVectorGraphics (UnityEngine.UIElements.MeshGenerationContextUtils/RectangleParams,bool,UnityEngine.UIElements.TextureId,int,int&,int&) [{0x3bb310c88} + 0x554] [/Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Renderer/UIRStylePainter.cs :: 1458u] (0x3d45b4960 0x3d45b5254) [0x137f82a80 - Unity Child Domain] #6 0x000003d45b44a8 in UnityEngine.UIElements.UIR.Implementation.UIRStylePainter:smile:rawVectorImage (UnityEngine.UIElements.MeshGenerationContextUtils/RectangleParams) [{0x3bd125c48} + 0x2f8] [/Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Renderer/UIRStylePainter.cs :: 1416u] (0x3d45b41b0 0x3d45b4770) [0x137f82a80 - Unity Child Domain] #7 0x00000382386518 in UnityEngine.UIElements.UIR.Implementation.UIRStylePainter:smile:rawRectangle (UnityEngine.UIElements.MeshGenerationContextUtils/RectangleParams) [{0x3bbe14f48} + 0x390] [/Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Renderer/UIRStylePainter.cs :: 499u] (0x382386188 0x3823869bc) [0x137f82a80 - Unity Child Domain] #8 0x0000038239cdd4 in UnityEngine.UIElements.UIR.Implementation.UIRStylePainter:StampRectangleWithSubRect (UnityEngine.UIElements.MeshGenerationContextUtils/RectangleParams,UnityEngine.Rect,UnityEngine.Rect) [{0x3abdb67e0} + 0x168c] [/Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Renderer/UIRStylePainter.cs :: 1218u] (0x38239b748 0x38239cdf4) [0x137f82a80 - Unity Child Domain] #9 0x00000382399b70 in UnityEngine.UIElements.UIR.Implementation.UIRStylePainter:smile:rawRectangleRepeat (UnityEngine.UIElements.MeshGenerationContextUtils/RectangleParams,UnityEngine.Rect) [{0x3bd1257f8} + 0x6270] [/Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Renderer/UIRStylePainter.cs :: 1128u] (0x382393900 0x38239a440) [0x137f82a80 - Unity Child Domain] #10 0x0000038237e444 in UnityEngine.UIElements.UIR.Implementation.UIRStylePainter:smile:rawVisualElementBackground () [{0x3bd124b50} + 0x1c5c] [/Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Renderer/UIRStylePainter.cs :: 725u] (0x38237c7e8 0x38237e5a4) [0x137f82a80 - Unity Child Domain] #11 0x00000382378d3c in UnityEngine.UIElements.UIR.Implementation.CommandGenerator:paintElement (UnityEngine.UIElements.UIR.RenderChain,UnityEngine.UIElements.VisualElement,UnityEngine.UIElements.UIR.ChainBuilderStats&) [{0x3bd1249b8} + 0x5e4] [/Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Renderer/UIRCommandGenerator.cs :: 167u] (0x382378758 0x38237a344) [0x137f82a80 - Unity Child Domain] #12 0x00000382376f88 in UnityEngine.UIElements.UIR.Implementation.RenderEvents:smile:epthFirstOnVisualsChanged (UnityEngine.UIElements.UIR.RenderChain,UnityEngine.UIElements.VisualElement,uint,bool,bool,UnityEngine.UIElements.UIR.ChainBuilderStats&) [{0x3bd1248b8} + 0x368] [/Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Renderer/UIRRenderEvents.cs :: 669u] (0x382376c20 0x3823770f4) [0x137f82a80 - Unity Child Domain] #13 0x00000382376b48 in UnityEngine.UIElements.UIR.Implementation.RenderEvents:processOnVisualsChanged (UnityEngine.UIElements.UIR.RenderChain,UnityEngine.UIElements.VisualElement,uint,UnityEngine.UIElements.UIR.ChainBuilderStats&) [{0x364fd9c40} + 0x100] [/Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Renderer/UIRRenderEvents.cs :: 56u] (0x382376a48 0x382376b70) [0x137f82a80 - Unity Child Domain] #14 0x0000037d243b34 in UnityEngine.UIElements.UIR.RenderChain:processChanges () [{0x3c994d5f0} + 0xc54] [/Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Renderer/UIRRenderChain.cs :: 443u] (0x37d242ee0 0x37d243d2c) [0x137f82a80 - Unity Child Domain] #15 0x0000037d22f418 in UnityEngine.UIElements.UIRRepaintUpdater:Update () [{0x3bcfc8a58} + 0x98] [/Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Renderer/UIRRepaintUpdater.cs :: 64u] (0x37d22f380 0x37d22f588) [0x137f82a80 - Unity Child Domain] #16 0x000003799d78ac in UnityEngine.UIElements.VisualTreeUpdater:UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase) [{0x1425eee48} + 0xec] [/Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/VisualTreeUpdater.cs :: 112u] (0x3799d77c0 0x3799d7920) [0x137f82a80 - Unity Child Domain] #17 0x000003799d771c in UnityEngine.UIElements.Panel:UpdateForRepaint () [{0x1425eeb98} + 0x74] [/Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Panel.cs :: 998u] (0x3799d76a8 0x3799d772c) [0x137f82a80 - Unity Child Domain] #18 0x000003799d5c0c in UnityEngine.UIElements.Panel:Repaint (UnityEngine.Event) [{0x3630e0598} + 0x1d4] [/Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Panel.cs :: 1059u] (0x3799d5a38 0x3799d5cbc) [0x137f82a80 - Unity Child Domain] #19 0x000003799d4bec in UnityEngine.UIElements.UIElementsUtility:smile:oDispatch (UnityEngine.UIElements.BaseVisualElementPanel) [{0x1425eea78} + 0x11c] [/Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs :: 453u] (0x3799d4ad0 0x3799d5004) [0x137f82a80 - Unity Child Domain] #20 0x000003799d4888 in UnityEngine.UIElements.UIElementsUtility:UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (int,intptr,bool&) [{0x151792378} + 0xc8] [/Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs :: 205u] (0x3799d47c0 0x3799d48b8) [0x137f82a80 - Unity Child Domain] #21 0x000003799d46cc in UnityEngine.UIElements.UIEventRegistration:processEvent (int,intptr) [{0x1425eea18} + 0x94] [/Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs :: 74u] (0x3799d4638 0x3799d4760) [0x137f82a80 - Unity Child Domain] #22 0x000003799d45d8 in UnityEngine.UIElements.UIEventRegistration/<>c:<.cctor>b__1_2 (int,intptr) [{0x380340680} + 0x20] [/Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs :: 28u] (0x3799d45b8 0x3799d45e8) [0x137f82a80 - Unity Child Domain] #23 0x000003799d441c in UnityEngine.GUIUtility:processEvent (int,intptr,bool&) [{0x2c12f41a0} + 0x64] [/Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs :: 189u] (0x3799d43b8 0x3799d4434) [0x137f82a80 - Unity Child Domain] #24 0x000003799d44b8 in (wrapper runtime-invoke) :runtime_invoke_void_int_intptr_intptr& (object,intptr,intptr,intptr) [{0x3ad72cc28} + 0x80] (0x3799d4438 0x3799d4564) [0x137f82a80 - Unity Child Domain] #25 0x000001540108c8 in mono_jit_runtime_invoke #26 0x0000015419744c in do_runtime_invoke #27 0x0000015419736c in mono_runtime_invoke #28 0x00000103500908 in scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool) #29 0x000001034dfaec in ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool) #30 0x0000010361499c in Scripting::UnityEngine::GUIUtilityProxy::processEvent(int, void*, bool*, ScriptingExceptionPtr*) #31 0x00000103eff2c0 in GUIView::processRetainedMode(InputEvent&, GUIState&, int) #32 0x000001052d9364 in GUIView::OnInputEvent(InputEvent&) #33 0x00000103efe854 in GUIView::processInputEvent(InputEvent&) #34 0x000001052e86bc in -[GUIRenderView renderRect:] #35 0x000001052e61a8 in -[GUIMetalView drawRect:] #36 0x000001052dadb0 in GUIView::smile:oPaint() #37 0x000001052db05c in GUIView::RepaintAll(bool) #38 0x0000010405c3dc in Application::TickTimer() #39 0x000001052c61f4 in -[EditorApplication TickTimer] #40 0x0000018eb4867c in __NSFireTimer #41 0x826280018dc23578 in CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION #42 0x50c80018dc23220 in __CFRunLoopDoTimer #43 0x30900018dc22d78 in __CFRunLoopDoTimers #44 0xb67480018dc08760 in __CFRunLoopRun #45 0xd73500018dc078a4 in CFRunLoopRunSpecific #46 0x187280019727b3bc in RunCurrentEventLoopInMode #47 0x2d2500019727b200 in ReceiveNextEventCommon #48 0xec3100019727af48 in _BlockUntilNextEventMatchingListInModeWithFilter #49 0xe622800190e60630 in _DPSNextEvent #50 0x1d6a800190e5f7c0 in -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] #51 0xe738000190e53bf0 in -[NSApplication run] #52 0xc255800190e2b058 in NSApplicationMain #53 0x2758001052df024 in EditorMain(int, char const**) #54 0x000001052df360 in main #55 0x0000018d7ffe50 in start

It’s easy to reproduce by just resizing element with ui toolkit vector image as a background.

Could you please file a bug report?

Done.
CASE IN-25337

1 Like