Search Issue Tracker
Fixed
Fixed in 1.8.6
Votes
0
Found in [Package]
1.8.6
Issue ID
TB-222
Regression
No
[Timeline] MissingReferenceExceptions when undoing Add Animator from Timeline
Repro:
- Open attached timline-error-repro-compressed.zip project.
- Open Assets > Scenes > Gameplay scene.
- Open the timeline window and open the timeline in the prefab in Hierarchy (The timeline is nested under IntroCutscene -> IntroCutscene.)
- Add an animation track.
- Create an empty GameObject, add it to the animation track. Select "Create Animator on GameObject".
- Click record on the animation track.
- Press Ctrl+Z
Expected Outcome: No errors occur. Would expect either the addition of the animator to the GameObject or the addition of the GameObject to the animation track is undone.
Actual Outcome: 300+ errors "MissingReferenceException: The object of type 'UnityEngine.Animator' has been destroyed but you are still trying to access it."
Reproducible on: 2023.2.0b4
NOTE: I was unable to open the project in past streams so could not regression test further. I've set regression as 'no' but it's possible this is a regression, may require further processing?
Notes:
- Tested on Windows 10.
- Couldn't repro with an empty project and these steps.
{code:java}
MissingReferenceException: The object of type 'UnityEngine.Animator' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEngine.Object+MarshalledUnityObject.TryThrowEditorNullExceptionObject (UnityEngine.Object unityObj, System.String parameterName) (at <29a5a5c1c02c4c21a41aabaf05ea6ea4>:0)
UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException (System.Object obj) (at <29a5a5c1c02c4c21a41aabaf05ea6ea4>:0)
UnityEngine.Component.get_transform () (at <29a5a5c1c02c4c21a41aabaf05ea6ea4>:0)
UnityEditor.Timeline.WindowState.AllowRecordingPrefabPropertyOverridesFor (System.Object componentOrGameObject) (at ./Library/PackageCache/com.unity.timeline@1.8.4/Editor/State/WindowState.cs:1062)
UnityEditor.PrefabUtility.AllowRecordingPrefabPropertyOverridesFor (UnityEngine.Object componentOrGameObject) (at <4af022610df640d8a1f2312ee498e664>:0)
UnityEditor.EditorApplication:Internal_CallGlobalEventHandler(){code}
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- Crash with “Fatal Error! The file ‘MemoryStream’ is corrupted!” when adding a large number in Font Character Rects Size field
Resolution Note (fix version 1.8.6):
Fixed a MissingReferenceException when editing a Timeline that is an instance of a prefab and a bound Animator is destroyed