Search Issue Tracker

Postponed means that the issue was either a feature request or something that requires major refactoring on our side. Since that makes the issue not actionable in the close future we choose to close it as Postponed and add it on our internal roadmaps and technical debt pages instead.

Postponed

Votes

0

Found in [Package]

1.0.0

Issue ID

1409480

Regression

No

Crash on ActiveEditorTracker::PopulateSubVector when SerializeField property field to populate to is set to "None"

Package: UI Toolkit

-

How to reproduce:
1. Open the attached project "Toolkit_Creator_3D.zip"
2. Select "Cylinder" in Hierarchy
3. In the Inspector, under script "Cylinder", choose property "GameObject" and select "None"
4. Observe the crash

Reproducible with: 1.0.0-preview.18 (2020.3.31f1), Built-in (2021.2.15f1, 2022.1.0b11, 2022.2.0a8)
Could not test with: 2019.4.36f1 (UI Toolkit is not introduced yet)

First lines of the stack trace:
0x00007ff748a19e6d (Unity) ActiveEditorTracker::PopulateSubVector
0x00007ff748a1e85a (Unity) ActiveEditorTracker::UpdateSubObjectsVector
0x00007ff748a11bbf (Unity) ActiveEditorTracker::DidFlushDirty
0x00007ff7484c4f2f (Unity) SceneTracker::FlushDirty
0x00007ff74868a5fc (Unity) Application::TickTimer
0x00007ff748ad3f8a (Unity) MainMessageLoop

  1. Resolution Note:

    The crash happens because the m_GameObject field conflicts by name with an internal property on MonoBehaviours that has exactly the same name. The updates that were intended for the field were actually setting the internal m_GameObject property to null because it appears earlier in the serialization. Because that field should never be null and the crash is a result. Please avoid this issue by renaming the field. We have an existing internal ticket to find ways to detect this sort of conflicting name, so we will resolve this specific ticket in the meantime but reference it as an example scenario that needs attention.

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.