Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. 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:
    188
    I've also just got this error... no idea why atm.
     
    earhod likes this.
  3. Waterlane

    Waterlane

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

    DrummerB

    Joined:
    Dec 19, 2013
    Posts:
    139
    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:
    139
    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. cowboybebeep

    cowboybebeep

    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.
     
  7. DrummerB

    DrummerB

    Joined:
    Dec 19, 2013
    Posts:
    139
    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:
    139
    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:
    188

    For Ref - I'm using 2019.1.3
     
  10. z3nth10n

    z3nth10n

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

    AlTheSlacker

    Joined:
    Jun 12, 2017
    Posts:
    326
    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:
    139
  15. ramtamir

    ramtamir

    Joined:
    Feb 23, 2019
    Posts:
    18
    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:
    326
    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:
    109
    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:
    19
    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.
  21. Miryum

    Miryum

    Joined:
    Jul 25, 2021
    Posts:
    11
    Got thie same problem on 2020.1.7f1, this trick worked.
     
  22. Fillmore

    Fillmore

    Joined:
    Feb 14, 2018
    Posts:
    11
    Getting this on 2021.2.9f1 when opening my project.
    I saw source control mentioned in this thread, I'm using the new Plastic SCM.

    Deleting the Library folder (while the project is closed) worked for me. (I think that's the same or close to doing a "Rebuild All"?)
     
    MoonbladeStudios likes this.
  23. pKallv

    pKallv

    Joined:
    Mar 2, 2014
    Posts:
    1,202
    Exists in 2021.2.12f1

    Code (CSharp):
    1. Assertion failed on expression: 'VCCache::instance != NULL'
    2. UnityEditor.VersionControl.Provider:GetAssetListFromSelection ()
    3. Unity.PlasticSCM.Editor.AssetMenu.ProjectViewAssetSelection:Unity.PlasticSCM.Editor.AssetMenu.AssetOperations.IAssetSelection.GetSelectedAssets () (at Library/PackageCache/com.unity.collab-proxy@1.15.12/Editor/PlasticSCM/AssetMenu/ProjectViewAssetSelection.cs:35)
    4. Unity.PlasticSCM.Editor.AssetMenu.AssetMenuItems:UpdateFilterMenuItems () (at Library/PackageCache/com.unity.collab-proxy@1.15.12/Editor/PlasticSCM/AssetMenu/AssetMenuItems.cs:89)
    5. Unity.PlasticSCM.Editor.AssetMenu.AssetMenuItems:AddMenuItems () (at Library/PackageCache/com.unity.collab-proxy@1.15.12/Editor/PlasticSCM/AssetMenu/AssetMenuItems.cs:71)
    6. Unity.PlasticSCM.Editor.AssetMenu.AssetMenuItems:Enable () (at Library/PackageCache/com.unity.collab-proxy@1.15.12/Editor/PlasticSCM/AssetMenu/AssetMenuItems.cs:29)
    7. Unity.PlasticSCM.Editor.PlasticPlugin:EnableForWorkspace () (at Library/PackageCache/com.unity.collab-proxy@1.15.12/Editor/PlasticSCM/PlasticPlugin.cs:68)
    8. Unity.PlasticSCM.Editor.PlasticPlugin:Enable () (at Library/PackageCache/com.unity.collab-proxy@1.15.12/Editor/PlasticSCM/PlasticPlugin.cs:45)
    9. Unity.PlasticSCM.Editor.PlasticWindow:OnEnable () (at Library/PackageCache/com.unity.collab-proxy@1.15.12/Editor/PlasticSCM/PlasticWindow.cs:181)
    10. UnityEditor.WindowLayout:LoadDefaultWindowPreferences ()
     
    FergJoe likes this.
  24. FergJoe

    FergJoe

    Joined:
    Dec 28, 2016
    Posts:
    19
    I'm getting the same error and trace in 2021.2.12f1

    The editor will crash when I start working with gameobjects - specifically when I rename them.
     
  25. QuetzalcoatlGS

    QuetzalcoatlGS

    Joined:
    Jul 16, 2017
    Posts:
    1
    I got it too. I've been working with unity for years and never happened to me until I change to work in V2021.2.12f1 It is all crashy and buggy. I want to go bad to 2018 so badly ... I'll check if deleting the folder solves it
     
    pKallv likes this.
  26. Grintavy

    Grintavy

    Joined:
    Apr 24, 2019
    Posts:
    1
    I've had this issue on version 2021.2.12f. It seems that Plastic SCM window is causing it somehow on startup. If you have the PlasticSCM window open on startup close it and restart Unity. Helped in my case.
     
  27. blindjoker1

    blindjoker1

    Joined:
    Nov 29, 2017
    Posts:
    5
    You sir are my hero.
     
  28. jsheehan22

    jsheehan22

    Joined:
    Oct 8, 2019
    Posts:
    1
    This has gotta be my issue - I'm having trouble getting it to start up at all, how can I close the PlasticSCM window?
     
  29. djsoapyknuckles

    djsoapyknuckles

    Joined:
    Feb 6, 2021
    Posts:
    1
    Closing PlasticSCM tab before exiting fixes it...if you start unity editor with plasticSCM tab opened from last session, it will throw the error, so close the tab unless you are checking in changes I guess?
     
  30. alentt

    alentt

    Joined:
    May 21, 2019
    Posts:
    4
    Yes this solves the problem for now.
     
  31. Xan_9

    Xan_9

    Joined:
    Oct 7, 2020
    Posts:
    31
    Fixed in 2021.2.19 and 2022.1.0b15
     
    Last edited: Apr 12, 2022
  32. RawFlash

    RawFlash

    Joined:
    Sep 12, 2020
    Posts:
    1
    Got this error in version Unity 2021.3.3f1. Fortunately, it does not affect the performance of the editor in any way.
    The Plastic window was opened at startup.