Persistent error: Assertion failed on expression:** 'VCCache::instance != NULL' unity

I have a custom menu item in a Unity2019.1.5f1 project which shows/hides several objects (from hierarchy) and components (from inspectors). To hide objects/components I set their hideFlags property.

After I restart Unity, with or without that script existing in my assets, I got the following error when exiting play mode:
—> Assertion failed on expression: ‘VCCache::instance != NULL’ unity

Assertion failed on expression: 'VCCache::instance != NULL'
UnityEditor.VersionControl.Provider:PromptAndCheckoutIfNeeded(String[], String, ChangeSet)
UnityEditorInternal.VR.XRProjectSettings:Internal_SaveSettings() (at C:/buildslave/unity/build/Modules/VREditor/Mono/XRPackageSettings.cs:101)
UnityEditorInternal.VR.XRProjectSettings:OnDisable() (at C:/buildslave/unity/build/Modules/VREditor/Mono/XRPackageSettings.cs:61)

The menu item function works as expected but every time if I exit playmode with objects/components hidden I got an error:
—> Assertion failed on expression: ‘ptr->GetHideFlags() == m_RequiredHideFlags’

How can I solve this?

2 Likes

I’ve also just got this error… no idea why atm.

1 Like

Hmm - Restarted again and message is gone (!?)

Same issue here. This is causing our unit tests to fail.

Unhandled log message: '[Assert] Assertion failed on expression: 'VCCache::instance != NULL''. Use UnityEngine.TestTools.LogAssert.Expect
UnityEditor.VersionControl.Provider:PromptAndCheckoutIfNeeded(String[], String, ChangeSet)
UnityEditorInternal.VR.XRProjectSettings:Internal_SaveSettings() (at C:/buildslave/unity/build/Modules/VREditor/Mono/XRPackageSettings.cs:101)
UnityEditorInternal.VR.XRProjectSettings:OnDisable() (at C:/buildslave/unity/build/Modules/VREditor/Mono/XRPackageSettings.cs:61)
UnityEditor.SceneManagement.EditorSceneManager:OpenScene(String, OpenSceneMode)
MissingScriptDetector:FindInScenes(String[], MissingScript[]&) (at Assets/Editor/Editor Extensions/MissingScriptDetector.cs:157)
MissingScriptDetector:FindInScenesInFolders(String[], MissingScript[]&) (at Assets/Editor/Editor Extensions/MissingScriptDetector.cs:109)
MissingScriptDetector:FindInAllScenes(MissingScript[]&) (at Assets/Editor/Editor Extensions/MissingScriptDetector.cs:102)
Tests.Editor.ProjectIntegrity:MissingScriptsInAnyScene() (at Assets/Tests/Editor/ProjectIntegrity.cs:25)
System.Reflection.MethodBase:Invoke(Object, Object[])
NUnit.Framework.Internal.Reflect:InvokeMethod(MethodInfo, Object, Object[])
NUnit.Framework.Internal.MethodWrapper:Invoke(Object, Object[])
NUnit.Framework.Internal.Commands.TestMethodCommand:RunNonAsyncTestMethod(ITestExecutionContext)
NUnit.Framework.Internal.Commands.TestMethodCommand:RunTestMethod(ITestExecutionContext)
NUnit.Framework.Internal.Commands.TestMethodCommand:Execute(ITestExecutionContext)
NUnit.Framework.Internal.Commands.TestActionCommand:Execute(ITestExecutionContext)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

I just tried running the same unit tests on all Unity versions from 2019.1.0 to 2019.1.6

I think it was introduced in 2019.1.3. In 2019.1.2 I don’t get this error. After updating to 2019.1.3 I get the errors. Going back to 2019.1.2 fixes the errors again.

I’m passing the following arguments
-projectPath “…” -batchmode -logFile -runTests -testPlatform “editmode” -testResults “…\TestResults.xml”

1 Like

So i was running into this issue as well. I deleted the “Assembly” files in my project folder. Unity repopulated them and everything is working fine now.

3 Likes

Thanks for the suggestion. Unfortunately, this didn’t fix the issue. Even after a completely clean checkout, I get this error with Unity 2019.1.3+

1 Like

It looks like the implementation of the method UnityEditorInternal.VR.XRProjectSettings.Internal_SaveSettings changed between versions 2019.1.2 and 2019.1.3. The new version has some kind of source control integration that fails.

For Ref - I’m using 2019.1.3

Same here, Unity 2019.1.5

1 Like

I’m seeing this error in 2019.1.6f1.

1 Like

I’m seeing this error in 2019.1.3f1

1 Like

I tried to do that but didn’t fix the problem for me :frowning:
We should try to evoke a Unity insider but can’t find the proper formula in my spell tome… Guess the only way to face this is to report the issue. :s

1 Like

I’m not sure, but if this issue is related, it will be fixed for 2019.3:

I had this error in 2019.1.3. Opening in 1.4 seems to have fixed this issue, at least for now

I’ve just tried switching to 2019.1.7f1 and the problem has gone away. I’ve tried it a few times and not made any other changes, so hopefully this is a fix. I see from the release notes they had made some changes to the Version Control code, so perhaps this has also resolved this.

1 Like

Facing this issue in our cloud builds on version 2019.1.7f1

could it be anything to do with our GPU drivers? I am using Nvidia latest ‘Studio’ drivers (430.86). I’ve had this issue sporadically for the last 3 or 4 Unity versions i have tried (happens seemly randomly, then never goes away in that project.

Same here, i get this error frequently and then it persists until restarting Unity (2018.3.9f1).

Yes this solved my issue.

1 Like