Reproduction steps:
1. Open the attached "repro_IN-55528.zip" project
2. Observe the crash
Reproduced with: 2021.3.31f1, 2022.2.0a17, 2023.2.0a17, 2023.2.0b12, 2023.3.0a8
Not reproduced with: 2022.3.10f1, 2023.1.16f1, 2023.2.0a16
Fixed in: 2022.2.0a18
Reproduced on: macOS Ventura 13.4 (user's), Windows 10 (22H2)
Not reproduced on: No other environments tested
First few stack frames:
#0 0x00000103a43c20 in GameObject::QueryComponentByType(Unity::Type const*) const
#1 0x00000104e9c51f in GetSceneFromGameObjectOrComponent(Object const*)
#2 0x000001051b96fb in CollectSaveSceneDependencies::CollectWithRoots(UnityScene const&, dynamic_array<int, 0ul> const&, dynamic_array<int, 0ul>&, TransferInstructionFlags)
#3 0x0000010519e511 in CollectAllSceneManagerAndObjectIDs(UnityScene const&, dynamic_array<int, 0ul>&, TransferInstructionFlags)
#4 0x0000010519e054 in GenerateSceneFileIDs(UnityScene const&)