Search Issue Tracker

In Progress

In Progress in 6000.4.X

Under Consideration for 6000.0.X, 6000.2.X, 6000.3.X

Votes

0

Found in

6000.0.59f1

6000.2.7f1

6000.3.0b4

6000.4.0a1

Issue ID

UUM-121358

Regression

No

[URP] Crash on GameObject::QueryComponentByType when accessing a component from an unsaved template created scene

-

This was originally reported as related to reflection probes, but it turned out that the root cause was in scene template code. See the discussion on Slack here https://unity.slack.com/archives/CJBAA5MV0/p1759753724575839

Steps to reproduce:
1. Create a new Universal 3D project
2. Go to “File/New Scene”, select any of the “(URP)” templates, and press “Create”
3. Add “Light/Reflection Probe” GameObject to the Hierarchy
4. Under the “Reflection Probe” Component, press the “Bake” Button through the Inspector
5. Select “Save Scene” in the “The untitled scene needs saving” pop-up and save the Scene
6. Observe the crash

Reproducible with versions: 2022.1.0b1, 6000.0.59f1, 6000.2.7f1, 6000.3.0b4, 6000.4.0a1

Reproducible on: macOS 15.6.1 (M1 Max), Windows 10 (user)
Not reproducible on: no other environment tested

Notes:
- Not reproducible when creating the Scene with “Basic (Built-in)” or “Empty” Scene Templates
- HDRP does not let you bake Reflection Probes if the Scene is unsaved

First few lines of StackTrace:
#0 0x000001048a1bb0 in GameObject::QueryComponentByType(Unity::Type const) const
#1 0x000001061b51b0 in LightingDataAsset::CreateSnapshotForReflectionProbe(ReflectionProbe
)
#2 0x000001046caefc in Lightmapping_CUSTOM_BakeReflectionProbeSnapshot(void*)
#3 0x0000042397b998 in (wrapper managed-to-native) UnityEditor.Lightmapping:BakeReflectionProbeSnapshot_Injected (intptr) [{0x143608b18} + 0x88] (0x42397b910 0x42397ba3c) [0x142982a80 - Unity Child Domain]
#4 0x0000042397b84c in UnityEditor.Lightmapping:BakeReflectionProbeSnapshot (UnityEngine.ReflectionProbe) [{0x35e87f718} + 0x5c] (0x42397b7f0 0x42397b870) [0x142982a80 - Unity Child Domain]

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.