Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

ArgumentNullException: Value cannot be null. when pressing play in empty project

Discussion in '2018.3 Beta' started by Lars-Steenhoff, Sep 26, 2018.

  1. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,474
    I get this errors on Unity beta 2018.3.b2 on a Mac
    The project is new and empty, when pressing play it returns after clearing in the console.

    Restarting unity does not help, deleting library folder also does not help

    ArgumentNullException: Value cannot be null.
    Parameter name: key
    System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
    System.Collections.Generic.Dictionary`2[TKey,TValue].TryGetValue (TKey key, TValue& value) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
    Unity.Experimental.EditorMode.EditorModes.ShouldInvokeOnGUI (UnityEditor.EditorWindow window) (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorMode/EditorModes.cs:301)
    UnityEditor.HostView.OldOnGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:125)
    UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:244)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    ArgumentNullException: Value cannot be null.
    Parameter name: key
    System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
    System.Collections.Generic.Dictionary`2[TKey,TValue].TryGetValue (TKey key, TValue& value) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
    Unity.Experimental.EditorMode.EditorModes.ShouldInvokeOnGUI (UnityEditor.EditorWindow window) (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorMode/EditorModes.cs:301)
    UnityEditor.HostView.OldOnGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:125)
    UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:266)
    UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:438)
    UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent () (at /Users/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:412)
    UnityEngine.Experimental.UIElements.ImmediateStylePainter.DrawImmediate (System.Action callback) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/ImmediateStylePainter.cs:113)
    UnityEngine.Experimental.UIElements.IMGUIContainer.DoRepaint (UnityEngine.Experimental.UIElements.IStylePainter painter) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:98)
    UnityEngine.Experimental.UIElements.VisualElement.Repaint (UnityEngine.Experimental.UIElements.IStylePainter painter) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/VisualElement.cs:829)
    UnityEngine.Experimental.UIElements.VisualTreeRepaintUpdater.PaintSubTree (UnityEngine.Experimental.UIElements.VisualElement root, UnityEngine.Matrix4x4 offset, System.Boolean shouldClip, System.Boolean shouldCache, UnityEngine.Rect currentGlobalClip) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/VisualTreeRepaintUpdater.cs:310)
    UnityEngine.Experimental.UIElements.VisualTreeRepaintUpdater.PaintSubTreeChildren (UnityEngine.Experimental.UIElements.VisualElement root, UnityEngine.Matrix4x4 offset, System.Boolean shouldClip, System.Boolean shouldCache, UnityEngine.Rect textureClip) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/VisualTreeRepaintUpdater.cs:328)
    UnityEngine.Experimental.UIElements.VisualTreeRepaintUpdater.PaintSubTree (UnityEngine.Experimental.UIElements.VisualElement root, UnityEngine.Matrix4x4 offset, System.Boolean shouldClip, System.Boolean shouldCache, UnityEngine.Rect currentGlobalClip) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/VisualTreeRepaintUpdater.cs:314)
    UnityEngine.Experimental.UIElements.VisualTreeRepaintUpdater.Update () (at /Users/builduser/buildslave/unity/build/Modules/UIElements/VisualTreeRepaintUpdater.cs:35)
    UnityEngine.Experimental.UIElements.VisualTreeUpdater.UpdateVisualTree () (at /Users/builduser/buildslave/unity/build/Modules/UIElements/VisualTreeUpdater.cs:70)
    UnityEngine.Experimental.UIElements.Panel.Repaint (UnityEngine.Event e) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/Panel.cs:507)
    UnityEngine.Experimental.UIElements.UIElementsUtility.DoDispatch (UnityEngine.Experimental.UIElements.BaseVisualElementPanel panel) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:230)
    UnityEngine.Experimental.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:68)
    UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
     
    Last edited: Sep 26, 2018
    Wiseman17 likes this.
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,111
    Hi Lars,
    Thanks for bringing this to our attention. Could you please submit a bug report with reproduction steps for it? This is likely specific to your setup. It doesn't reproduce on my machine.
     
  3. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,474
    Thanks, Submitted the report Case (1085012)
     
    ghostitos and LeonhardP like this.
  4. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,474
    Ok I found the solution I had to reset the editor layout!
    Now the errors are gone.