Search Issue Tracker
Fixed
Fixed in 2023.1.0b18, 2023.2.0a15
Votes
0
Found in
2023.2.0a9
Issue ID
UUM-31981
Regression
Yes
"InvalidCastException: Specified cast is not valid." error is displayed in the "Console" when user selects Table View in the Search window
Steps to reproduce:
# Create a 3D project
# Window -> Search -> New Window
# Enter AAA and verify, that no results for the entered search
# Still save empty query: diskette -> Save Project
# Save with the default proposed name
# Verify, it becomes displayed in the Project list
# Change the window view to "Table View"
# Observe Console
Expected result: The view should change without the errors in the console.
Actual result: View changes, but the console displays errors.
Reproducible with: 2023.2.0a9.
Note: cannot test with 2023.2.0a6-2023.2.0a8 builds as diskette -> Save Project doesn't work in these builds.
Not reproducible with: 2023.2.0a5, 2023.1.0b10, 2022.2.13f1, 2021.3.22f1, 2020.3.46f1 (this stream has no this window).
Error:
InvalidCastException: Specified cast is not valid.
UnityEditor.Search.Providers.AssetStoreProvider+<>c__DisplayClass86_0.<AssetDocumentColumnProvider>b__0 (UnityEditor.Search.SearchColumnEventArgs args) (at /Users/bokken/build/output/unity/unity/Modules/QuickSearch/Editor/Providers/AssetStoreProvider.cs:1105)
UnityEditor.Search.SearchTableViewCell.Bind (UnityEditor.Search.SearchItem item) (at /Users/bokken/build/output/unity/unity/Modules/QuickSearch/Editor/UITK/SearchTableViewCell.cs:118)
UnityEditor.Search.SearchTableViewColumn.BindSearchColumnCell (UnityEngine.UIElements.VisualElement ve, System.Int32 index) (at /Users/bokken/build/output/unity/unity/Modules/QuickSearch/Editor/UITK/SearchTableViewColumn.cs:128)
UnityEngine.UIElements.MultiColumnController.BindCellItem[T] (UnityEngine.UIElements.VisualElement ve, System.Int32 rowIndex, UnityEngine.UIElements.Column column, T item) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Controls/MultiColumn/MultiColumnController.cs:78)
UnityEngine.UIElements.MultiColumnController.BindItem[T] (UnityEngine.UIElements.VisualElement element, System.Int32 index, T item) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Controls/MultiColumn/MultiColumnController.cs:147)
UnityEngine.UIElements.MultiColumnListViewController.BindItem (UnityEngine.UIElements.VisualElement element, System.Int32 index) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Collections/Controllers/MultiColumnListViewController.cs:54)
UnityEngine.UIElements.CollectionViewController.InvokeBindItem (UnityEngine.UIElements.ReusableCollectionItem reusableItem, System.Int32 index) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Collections/Controllers/CollectionViewController.cs:170)
UnityEngine.UIElements.BaseListViewController.InvokeBindItem (UnityEngine.UIElements.ReusableCollectionItem reusableItem, System.Int32 index) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Collections/Controllers/BaseListViewController.cs:61)
UnityEngine.UIElements.VerticalVirtualizationController`1[T].Setup (T recycledItem, System.Int32 newIndex) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Collections/Virtualization/VerticalVirtualizationController.cs:180)
UnityEngine.UIElements.FixedHeightVirtualizationController`1[T].Resize (UnityEngine.Vector2 size) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Collections/Virtualization/FixedHeightVirtualizationController.cs:107)
UnityEngine.UIElements.BaseVerticalCollectionView.Resize (UnityEngine.Vector2 size) (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Controls/BaseVerticalCollectionView.cs:1131)
UnityEngine.UIElements.BaseVerticalCollectionView.PostRefresh () (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Controls/BaseVerticalCollectionView.cs:1074)
UnityEngine.UIElements.BaseListView.PostRefresh () (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Controls/BaseListView.cs:1114)
UnityEngine.UIElements.BaseVerticalCollectionView.Rebuild () (at /Users/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Controls/BaseVerticalCollectionView.cs:1036)
UnityEditor.Search.SearchBaseCollectionView`1[T].UpdateItemSize () (at /Users/bokken/build/output/unity/unity/Modules/QuickSearch/Editor/UITK/SearchBaseCollectionView.cs:164)
UnityEditor.Search.SearchBaseCollectionView`1[T].OnDisplayModeChanged (UnityEditor.Search.ISearchEvent evt) (at /Users/bokken/build/output/unity/unity/Modules/QuickSearch/Editor/UITK/SearchBaseCollectionView.cs:79)
UnityEditor.Search.SearchElement+<>c__DisplayClass42_0.<On>b__0 (UnityEditor.Search.ISearchEvent evt) (at /Users/bokken/build/output/unity/unity/Modules/QuickSearch/Editor/UITK/SearchElement.cs:305)
UnityEditor.Search.SearchEventManager+<>c__DisplayClass10_0.<Emit>b__0 () (at /Users/bokken/build/output/unity/unity/Modules/QuickSearch/Editor/UI/SearchEventManager.cs:234)
UnityEditor.Search.Dispatcher+Task.Invoke () (at /Users/bokken/build/output/unity/unity/Modules/QuickSearch/Editor/UI/Dispatcher.cs:28)
UnityEditor.Search.Dispatcher.Process (UnityEditor.Search.Dispatcher+Task& task) (at /Users/bokken/build/output/unity/unity/Modules/QuickSearch/Editor/UI/Dispatcher.cs:70)
UnityEditor.Search.Dispatcher.Update () (at /Users/bokken/build/output/unity/unity/Modules/QuickSearch/Editor/UI/Dispatcher.cs:82)
UnityEditor.EditorApplication.Internal_InvokeTickEvents () (at /Users/bokken/build/output/unity/unity/Editor/Mono/EditorApplication.cs:368)
-
longsl
Sep 14, 2024 05:57
In Unity 2022.3.17f1, when i use this code:
AssetDatabase.Refresh(ImportAssetOptions.ForceUpdate);
CompilationPipeline.RequestScriptCompilation();Error Log:
InvalidCastException: Specified cast is not valid.
UnityEditor.Scripting.ScriptCompilation.EditorCompilation.CompleteActiveBuildWhilePumping () (at <aec3a143be31489f8782c487d4d86edd>:0)
UnityEditor.Scripting.ScriptCompilation.EditorCompilation.TickCompilationPipeline (UnityEditor.Scripting.ScriptCompilation.EditorScriptCompilationOptions options, UnityEditor.BuildTargetGroup platformGroup, UnityEditor.BuildTarget platform, System.Int32 subtarget, System.String[] extraScriptingDefines, System.Boolean allowBlocking) (at <aec3a143be31489f8782c487d4d86edd>:0)
UnityEditor.Scripting.ScriptCompilation.EditorCompilation.TickCompilationPipeline (UnityEditor.Scripting.ScriptCompilation.EditorScriptCompilationOptions options, UnityEditor.BuildTargetGroup platformGroup, UnityEditor.BuildTarget platform, System.Int32 subtarget, System.String[] extraScriptingDefines, System.Boolean allowBlocking) (at <aec3a143be31489f8782c487d4d86edd>:0)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface.TickCompilationPipeline (UnityEditor.Scripting.ScriptCompilation.EditorScriptCompilationOptions options, UnityEditor.BuildTargetGroup platformGroup, UnityEditor.BuildTarget platform, System.Int32 subtarget, System.String[] extraScriptingDefines, System.Boolean allowBlocking) (at <aec3a143be31489f8782c487d4d86edd>:0)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:TickCompilationPipeline(EditorScriptCompilationOptions, BuildTargetGroup, BuildTarget, Int32, String[], Boolean)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Search: Inspector section icon is less sharp/more pixelated than other editor icons
- Search description string is always truncated
- [VFX] When Grouped Nodes are converted to Subgraph Operator resulting Graph Node is not included in the Group
- Search window icons are less sharp/more pixelated than other editor icons
- The Inspector can be covered when scaling the horizontal separator bar
Resolution Note (fix version 2023.2.0a15):
Verified with:
2023.2.0a15.2253.2683
Revision: trunk e4d2a7e41f40
Built: Tue, 09 May 2023 02:23:23 GMT
Resolution Note (fix version 2023.1.0b18):
Verified with:
2023.1.0b18.3067.5283
Revision: 2023.1/staging 5823d77fe92a
Built: Wed, 17 May 2023 02:16:47 GM