Unity-Technologies / ProjectAuditor

Project Auditor is an experimental static analysis tool for Unity Projects.
Other
822 stars 68 forks source link

[Bug] "Call tree (slow)" checkbox causes errors in Resources view #50

Closed unitystevem closed 3 years ago

unitystevem commented 3 years ago

To reproduce:

  1. Right click on the Project Auditor tab and select Developer Mode
  2. Analyze a project
  3. Navigate to the Resources view
  4. Enter a string into the Filter box
  5. Tick the "Call tree (slow)" checkbox.

(You can perform steps 2-5 in any order and get the same result).

Result: Console error (shown below) and an empty Tree View window. Expected Result: No errors? I think probably the "Call tree (slow)" checkbox should be greyed-out like it is in the other non-code views, or possibly hidden completely in non-code views.


NullReferenceException: Object reference not set to an instance of an object
Unity.ProjectAuditor.Editor.TextFilter.MatchesSearch (Unity.ProjectAuditor.Editor.DependencyNode node, System.Boolean recursive) (at Library/PackageCache/com.unity.project-auditor@e388503b3f/Editor/TextFilter.cs:55)
Unity.ProjectAuditor.Editor.TextFilter.Match (Unity.ProjectAuditor.Editor.ProjectIssue issue) (at Library/PackageCache/com.unity.project-auditor@e388503b3f/Editor/TextFilter.cs:29)
Unity.ProjectAuditor.Editor.UI.ProjectAuditorWindow.Match (Unity.ProjectAuditor.Editor.ProjectIssue issue) (at Library/PackageCache/com.unity.project-auditor@e388503b3f/Editor/UI/ProjectAuditorWindow.cs:114)
Unity.ProjectAuditor.Editor.UI.Framework.IssueTable.<BuildRows>b__18_0 (Unity.ProjectAuditor.Editor.UI.Framework.IssueTableItem item) (at Library/PackageCache/com.unity.project-auditor@e388503b3f/Editor/UI/Framework/IssueTable.cs:116)
System.Linq.Enumerable+WhereArrayIterator`1[TSource].ToArray () (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
Unity.ProjectAuditor.Editor.UI.Framework.IssueTable.BuildRows (UnityEditor.IMGUI.Controls.TreeViewItem root) (at Library/PackageCache/com.unity.project-auditor@e388503b3f/Editor/UI/Framework/IssueTable.cs:114)
UnityEditor.IMGUI.Controls.TreeView+TreeViewControlDataSource.FetchData () (at <c84609c921cb488481d7d8a5fcdf9588>:0)
UnityEditor.IMGUI.Controls.TreeViewDataSource.ReloadData () (at <c84609c921cb488481d7d8a5fcdf9588>:0)
UnityEditor.IMGUI.Controls.TreeView+TreeViewControlDataSource.ReloadData () (at <c84609c921cb488481d7d8a5fcdf9588>:0)
UnityEditor.IMGUI.Controls.TreeViewController.ReloadData () (at <c84609c921cb488481d7d8a5fcdf9588>:0)
UnityEditor.IMGUI.Controls.TreeView.Reload () (at <c84609c921cb488481d7d8a5fcdf9588>:0)
Unity.ProjectAuditor.Editor.UI.Framework.AnalysisView.Refresh () (at Library/PackageCache/com.unity.project-auditor@e388503b3f/Editor/UI/Framework/AnalysisView.cs:131)
Unity.ProjectAuditor.Editor.UI.ProjectAuditorWindow.RefreshDisplay () (at Library/PackageCache/com.unity.project-auditor@e388503b3f/Editor/UI/ProjectAuditorWindow.cs:586)
Unity.ProjectAuditor.Editor.UI.ProjectAuditorWindow.OnGUI () (at Library/PackageCache/com.unity.project-auditor@e388503b3f/Editor/UI/ProjectAuditorWindow.cs:207)
mtrive commented 3 years ago

Fixed by https://github.com/Unity-Technologies/ProjectAuditor/commit/81e5889c784ad5b1f55581e66f5488d2c3f0a489

Thanks for reporting!