How to reproduce:
- Open the attached "IN-151098" project
- In the menu bar, select "Bug Repro" > "Set Static Editor Flags with Null GameObject"
- Observe the crash
Reproducible with: 6000.0.0f1, 6000.0.82f1, 6000.3.23f1, 6000.5.11f1, 6000.6.0f1, 6000.7.0a6
Reproducible on: Ubuntu 24.04 LTS, Ubuntu 26.04 LTS (by user), Windows 10 Pro
Not reproducible on: No other environments tested
Notes:
- The deprecated GameObjectUtility.SetNavMeshArea and GameObjectUtility.SetNavMeshLayer methods crash identically when the GameObject argument is null (the "Bug Repro" menu contains one item per method)
- Also reproducible in batch mode (-batchmode -nographics -executeMethod)
First few lines of the stack trace:
Caught fatal signal - signo:11 code:1 errno:0 addr:0xbc
#0 0x007a9fc3a45330 in (Unknown)
#1 0x005a90d857bc96 in GameObject::SetStaticEditorFlags(StaticEditorFlags)
#2 0x005a90d6669d7b in GameObjectUtility_CUSTOM_SetStaticEditorFlags(void*, StaticEditorFlags)
#3 0x00000041664f04 in (wrapper managed-to-native) UnityEditor.GameObjectUtility:SetStaticEditorFlags_Injected (intptr,UnityEditor.StaticEditorFlags)
#4 0x00000041674f83 in UnityEditor.GameObjectUtility:SetStaticEditorFlags (UnityEngine.GameObject,UnityEditor.StaticEditorFlags)