Search Issue Tracker
Fixed in 2021.1.2f1
Fixed in 2020.3.X, 2021.1.X
Votes
0
Found in
2020.1.8f1
2020.2
2020.2.0a12
2021.1
2021.2
Issue ID
1291360
Regression
Yes
[VCS] Precheckoutcallback throws an exception on project startup
Reproduction steps:
0. Use one of the Unity versions marked as Reproducible with
1. Connect attached project "pre_checkout_callback_exception_test.zip" to Plastic SCM server
2. Open attached project and scene "SampleScene"
3. Observe Console window
Expected result: No exceptions
Actual result: "User-created pre-checkout callback has thrown an exception: Object reference not set <...>" and "Could not save package settings" errors
Reproducible with: 1.2 (2020.2.0a12, 2020.2.1f1, 2020.2.2f1, 2021.1.0b3, 2021.2.0a2)
Not reproducible with: 1.2 (2020.1.17f1, 2020.2.0a11)
Could not test with: 2018.4.29f1, 2019.4.14f1 (console errors break project)
Workaround found:
1. Comment out the following line in the file VCSExtension.cs
UnityEditor.VersionControl.Provider.preCheckoutCallback = preCheckoutCallback;
2. Go back to Unity. It will recompile the assets. Then the issue is not reproduced anymore.
3. Uncomment the previously commented line. Now all works as expected.
It seems that somehow the way of assigning the preCheckoutCallback changed. So when compiling with a previous Unity version (for example 2020.1.8f1), and then opening the project with a newer Unity version (for example 2020.2.1f1) reproduces the issue.
We should make a change to the Editor to protect the NullReferenceException in that scenario.
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note (fix version 2021.1.2f1):
Fixed in 2021.2.0a5
Resolution Note (fix version 2021.1):
Fixed in 2021.1.0b9
Resolution Note (fix version 2020.3):
Fixed in 2020.3.3f1