Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

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

Discussion in 'Editor & General Support' started by earhod, Jun 6, 2019.

  1. earhod

    earhod

    Joined:
    May 6, 2019
    Posts:
    2
    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
    Code (CSharp):
    1. Assertion failed on expression: 'VCCache::instance != NULL'
    2. UnityEditor.VersionControl.Provider:PromptAndCheckoutIfNeeded(String[], String, ChangeSet)
    3. UnityEditorInternal.VR.XRProjectSettings:Internal_SaveSettings() (at C:/buildslave/unity/build/Modules/VREditor/Mono/XRPackageSettings.cs:101)
    4. 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?
     
    Waterlane and andrescuevas like this.
  2. Waterlane

    Waterlane

    Joined:
    Mar 13, 2015
    Posts:
    167
    I've also just got this error... no idea why atm.
     
    earhod likes this.
  3. Waterlane

    Waterlane

    Joined:
    Mar 13, 2015
    Posts:
    167
    Hmm - Restarted again and message is gone (!?)
     
  4. DrummerB

    DrummerB

    Joined:
    Dec 19, 2013
    Posts:
    96
    Same issue here. This is causing our unit tests to fail.

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

    DrummerB

    Joined:
    Dec 19, 2013
    Posts:
    96
    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"
     
    earhod likes this.
  6. thechrishawkins

    thechrishawkins

    Joined:
    May 22, 2019
    Posts:
    1
    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.
     
    durukanozanalp and Waterlane like this.
  7. DrummerB

    DrummerB

    Joined:
    Dec 19, 2013
    Posts:
    96
    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+
     
    Waterlane likes this.
  8. DrummerB

    DrummerB

    Joined:
    Dec 19, 2013
    Posts:
    96
    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.
     
  9. Waterlane

    Waterlane

    Joined:
    Mar 13, 2015
    Posts:
    167

    For Ref - I'm using 2019.1.3
     
  10. z3nth10n

    z3nth10n

    Joined:
    Nov 23, 2013
    Posts:
    46
    Same here, Unity 2019.1.5
     
    earhod likes this.
  11. AlTheSlacker

    AlTheSlacker

    Joined:
    Jun 12, 2017
    Posts:
    63
    I'm seeing this error in 2019.1.6f1.
     
    earhod likes this.
  12. mikamiga

    mikamiga

    Joined:
    May 11, 2019
    Posts:
    1
    I'm seeing this error in 2019.1.3f1
     
    earhod likes this.
  13. earhod

    earhod

    Joined:
    May 6, 2019
    Posts:
    2
    I tried to do that but didn't fix the problem for me :(
    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
     
    Waterlane likes this.
  14. DrummerB

    DrummerB

    Joined:
    Dec 19, 2013
    Posts:
    96
  15. ramtamir

    ramtamir

    Joined:
    Feb 23, 2019
    Posts:
    13
    I had this error in 2019.1.3. Opening in 1.4 seems to have fixed this issue, at least for now
     
  16. AlTheSlacker

    AlTheSlacker

    Joined:
    Jun 12, 2017
    Posts:
    63
    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.
     
    earhod likes this.
  17. jasonatkaruna

    jasonatkaruna

    Joined:
    Feb 26, 2019
    Posts:
    64
    Facing this issue in our cloud builds on version 2019.1.7f1
     
  18. megabrobro

    megabrobro

    Joined:
    Jul 8, 2017
    Posts:
    100
    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.
     
  19. whisp

    whisp

    Joined:
    Jun 21, 2014
    Posts:
    16
    Same here, i get this error frequently and then it persists until restarting Unity (2018.3.9f1).
     
  20. durukanozanalp

    durukanozanalp

    Joined:
    Jan 4, 2019
    Posts:
    12
    Yes this solved my issue.
     
    Waterlane likes this.
unityunity