Search Issue Tracker

Won't Fix



Found in





Issue ID




Crashes on aligned_free when entering Play Mode when a Custom UIElements window is open

UI Toolkit


How to reproduce:
1. Open attached project
2. Select the asset at Assets/Dialogue Graph/Test IF Data/Park/Description/Description.asset
3. Open Window > IF
4. Dock the opened window to the editor interface
5. Enter the Play Mode
6. If it didn't crash, enter and quit Play Mode few times

Reproducible with: 2019.2.4f1, 2019.3.0b2, 2020.1.0a3
Not reproducible with: 2017.4.32f1, 2018.4.9f1 (UI Elements are available in 2019.2 and up)

Reproducible with both Mac and Windows

NOTE: only happens when using a Graphview function in a very specific way

  1. Resolution Note:

    This project contains a window that will call GraphView.CalculateFrameTransform() during its OnEnable() phase. This function ends up reading and writing to GUI.matrix to save/restore the current value and install an identity transform in between to perform screen alignment calculations.

    During OnEnable() it's technically not safe to use IMGUI APIs because IMGUI has not even run once and could contain garbage state.

    To work around this crash, you can postpone the call to CalculateFrameTransform() which should let IMGUI put itself in a correct state. Since Graphview is an experimental API, only for specific Unity products which do not experience this issue, we do not intend to fix this right now.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.