What does the below error mean? My scene is really large and it seems that by removing a bulk of the objects the scan will work again, this has popped up out of nowhere as it was working just fine yesterday and every since I purchased it. Any help is appreciated. Thanks
A single empty tree caused this error. Eventually found it by disabling objects and scanning and narrowed it down. Somehow the missing/none mesh was causing an error. Somehow I broke the prefab which caused this. The tree also had recast mesh object script attached most likely why.
Hi
Nice find. Do you happen to have the stacktrace for the original error? That would be very helpful in helping me debug this.
Sorry, I do not. Fixed it and moved on :)_
I’m sure a simple null check would fix it.
Aw.
Yeah. A simple null check would probably fix it. The problem is that without the stacktrace I’m not completely sure where I need that null check. Looking at the code I already have null checks for all relevant things I can think of.
Which version are you using?
Does this help?
There was an error generating the graphs:
System.ArgumentNullException: Value cannot be null.
Parameter name: key
at System.Collections.Generic.Dictionary2[TKey,TValue].FindEntry (TKey key) [0x00008] in <e1a80661d61443feb3dbdaac88eeb776>:0 at System.Collections.Generic.Dictionary
2[TKey,TValue].ContainsKey (TKey key) [0x00000] in :0
at Pathfinding.Recast.RecastMeshGatherer.CollectRecastMeshObjs (System.Collections.Generic.List`1[T] buffer) [0x00078] in D:\Desktop\Dark Times\Assets\AstarPathfindingProject\Generators\Utilities\RecastMeshGatherer.cs:136
at Pathfinding.RecastGraph.CollectMeshes (UnityEngine.Bounds bounds) [0x0005f] in D:\Desktop\Dark Times\Assets\AstarPathfindingProject\Generators\RecastGenerator.cs:730
at Pathfinding.RecastGraph+c__Iterator1.MoveNext () [0x00120] in D:\Desktop\Dark Times\Assets\AstarPathfindingProject\Generators\RecastGenerator.cs:636
at Pathfinding.RecastGraph+c__Iterator0.MoveNext () [0x000c0] in D:\Desktop\Dark Times\Assets\AstarPathfindingProject\Generators\RecastGenerator.cs:554
at AstarPath+c__Iterator3.MoveNext () [0x0014a] in D:\Desktop\Dark Times\Assets\AstarPathfindingProject\Core\AstarPath.cs:1614
at AstarPath+c__Iterator2.MoveNext () [0x0029c] in D:\Desktop\Dark Times\Assets\AstarPathfindingProject\Core\AstarPath.cs:1556
at Pathfinding.AstarPathEditor.MenuScan () [0x000e3] in D:\Desktop\Dark Times\Assets\AstarPathfindingProject\Editor\AstarPathEditor.cs:1370
If you think this is a bug, please contact me on forum.arongranberg.com (post a new thread)
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogError(Object)
Pathfinding.AstarPathEditor:MenuScan() (at Assets\AstarPathfindingProject\Editor\AstarPathEditor.cs:1379)
Pathfinding.AstarPathEditor:OnInspectorGUI() (at Assets\AstarPathfindingProject\Editor\AstarPathEditor.cs:256)
UnityEditor.InspectorWindow:DrawEditor(Editor[], Int32, Boolean, Boolean&, Rect&) (at C:\buildslave\unity\build\Editor\Mono\Inspector\InspectorWindow.cs:1295)
UnityEditor.InspectorWindow:DrawEditors(Editor[]) (at C:\buildslave\unity\build\Editor\Mono\Inspector\InspectorWindow.cs:1072)
UnityEditor.InspectorWindow:OnGUI() (at C:\buildslave\unity\build\Editor\Mono\Inspector\InspectorWindow.cs:412)
System.Reflection.MonoMethod:InternalInvoke(MonoMethod, Object, Object[], Exception&)
System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
System.Reflection.MethodBase:Invoke(Object, Object[])
UnityEditor.HostView:Invoke(String, Object) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:291)
UnityEditor.HostView:Invoke(String) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:284)
UnityEditor.HostView:InvokeOnGUI(Rect) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:251)
UnityEditor.DockArea:OldOnGUI() (at C:\buildslave\unity\build\Editor\Mono\GUI\DockArea.cs:386)
UnityEngine.Experimental.UIElements.IMGUIContainer:DoOnGUI(Event) (at C:\buildslave\unity\build\Modules\UIElements\IMGUIContainer.cs:206)
UnityEngine.Experimental.UIElements.IMGUIContainer:HandleIMGUIEvent(Event) (at C:\buildslave\unity\build\Modules\UIElements\IMGUIContainer.cs:366)
UnityEngine.Experimental.UIElements.IMGUIContainer:HandleEvent(EventBase) (at C:\buildslave\unity\build\Modules\UIElements\IMGUIContainer.cs:350)
UnityEngine.Experimental.UIElements.EventDispatcher:DispatchEvent(EventBase, IPanel) (at C:\buildslave\unity\build\Modules\UIElements\EventDispatcher.cs:215)
UnityEngine.Experimental.UIElements.UIElementsUtility:DoDispatch(BaseVisualElementPanel) (at C:\buildslave\unity\build\Modules\UIElements\UIElementsUtility.cs:224)
UnityEngine.Experimental.UIElements.UIElementsUtility:ProcessEvent(Int32, IntPtr) (at C:\buildslave\unity\build\Modules\UIElements\UIElementsUtility.cs:77)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:\buildslave\unity\build\Modules\IMGUI\GUIUtility.cs:184)
(Filename: Assets/AstarPathfindingProject/Editor/AstarPathEditor.cs Line: 1379)
ArgumentNullException: Value cannot be null.
Parameter name: key
at Pathfinding.AstarPathEditor.MenuScan () [0x00131] in D:\Desktop\Dark Times\Assets\AstarPathfindingProject\Editor\AstarPathEditor.cs:1381
at Pathfinding.AstarPathEditor.OnInspectorGUI () [0x00092] in D:\Desktop\Dark Times\Assets\AstarPathfindingProject\Editor\AstarPathEditor.cs:256
at UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor[] editors, System.Int32 editorIndex, System.Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) [0x003f7] in C:\buildslave\unity\build\Editor\Mono\Inspector\InspectorWindow.cs:1295
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
UnityEditor.InspectorWindow:DrawEditor(Editor[], Int32, Boolean, Boolean&, Rect&) (at C:\buildslave\unity\build\Editor\Mono\Inspector\InspectorWindow.cs:1302)
UnityEditor.InspectorWindow:DrawEditors(Editor[]) (at C:\buildslave\unity\build\Editor\Mono\Inspector\InspectorWindow.cs:1072)
UnityEditor.InspectorWindow:OnGUI() (at C:\buildslave\unity\build\Editor\Mono\Inspector\InspectorWindow.cs:412)
System.Reflection.MonoMethod:InternalInvoke(MonoMethod, Object, Object[], Exception&)
System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
System.Reflection.MethodBase:Invoke(Object, Object[])
UnityEditor.HostView:Invoke(String, Object) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:291)
UnityEditor.HostView:Invoke(String) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:284)
UnityEditor.HostView:InvokeOnGUI(Rect) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:251)
UnityEditor.DockArea:OldOnGUI() (at C:\buildslave\unity\build\Editor\Mono\GUI\DockArea.cs:386)
UnityEngine.Experimental.UIElements.IMGUIContainer:DoOnGUI(Event) (at C:\buildslave\unity\build\Modules\UIElements\IMGUIContainer.cs:206)
UnityEngine.Experimental.UIElements.IMGUIContainer:HandleIMGUIEvent(Event) (at C:\buildslave\unity\build\Modules\UIElements\IMGUIContainer.cs:366)
UnityEngine.Experimental.UIElements.IMGUIContainer:HandleEvent(EventBase) (at C:\buildslave\unity\build\Modules\UIElements\IMGUIContainer.cs:350)
UnityEngine.Experimental.UIElements.EventDispatcher:DispatchEvent(EventBase, IPanel) (at C:\buildslave\unity\build\Modules\UIElements\EventDispatcher.cs:215)
UnityEngine.Experimental.UIElements.UIElementsUtility:DoDispatch(BaseVisualElementPanel) (at C:\buildslave\unity\build\Modules\UIElements\UIElementsUtility.cs:224)
UnityEngine.Experimental.UIElements.UIElementsUtility:ProcessEvent(Int32, IntPtr) (at C:\buildslave\unity\build\Modules\UIElements\UIElementsUtility.cs:77)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:\buildslave\unity\build\Modules\IMGUI\GUIUtility.cs:184)
(Filename: Assets/AstarPathfindingProject/Editor/AstarPathEditor.cs Line: 1381)
Thanks! That helped me track it down.
Perfect, Glad to help!