Search Issue Tracker

Active

Votes

0

Found in

2022.3.33f1

6000.0.8f1

Issue ID

UUM-74886

Regression

No

[Search] Query Builder - "Input String was not in a correct format" error when changing query options

--

-

*Steps to reproduce:*
# Open any project.
# Open the Search window with Cmd+K
# Add a "Menu Path" pill
# Right-click pill > Format > Number
# Try to interact with the pill dropdown

*Actual results:* Error thrown in console "Input String was not in a correct format", dropdown does not respond to interaction. It also does not show in the Search window, so you can miss that an error was thrown.

*Expected results:* Query builder should prevent the user from selecting incorrect formats that throw exceptions.

*Reproducible with versions:* 6000.0.8f1, 2022.3.33f1

*Can’t test with versions:* 2021.3.40f1, no Query Builder

*Tested on (OS):* Mac OS (Inter) 12.7.4

*Notes:*

Full error:

 
{code:java}
FormatException: Input string was not in a correct format.
System.Number.ThrowOverflowOrFormatException (System.Boolean overflow, System.String overflowResourceKey) (at <9506b983152c47f0b73a6d2d3fbcbd69>:0)
System.Number.ParseSingle (System.ReadOnlySpan`1[T] value, System.Globalization.NumberStyles styles, System.Globalization.NumberFormatInfo info) (at <9506b983152c47f0b73a6d2d3fbcbd69>:0)
System.Single.Parse (System.String s, System.Globalization.NumberStyles style, System.IFormatProvider provider) (at <9506b983152c47f0b73a6d2d3fbcbd69>:0)
System.Convert.ToSingle (System.String value, System.IFormatProvider provider) (at <9506b983152c47f0b73a6d2d3fbcbd69>:0)
System.String.System.IConvertible.ToSingle (System.IFormatProvider provider) (at <9506b983152c47f0b73a6d2d3fbcbd69>:0)
System.Convert.ToSingle (System.Object value) (at <9506b983152c47f0b73a6d2d3fbcbd69>:0)
UnityEditor.Search.QueryNumberBlockEditor.Open (UnityEngine.Rect& rect, UnityEditor.Search.QueryFilterBlock block) (at /Users/bokken/build/output/unity/unity/Modules/QuickSearch/Editor/QueryBuilder/Blocks/QueryBlockEditor.cs:129)
UnityEditor.Search.QueryFilterBlock.OpenEditor (UnityEngine.Rect& rect) (at /Users/bokken/build/output/unity/unity/Modules/QuickSearch/Editor/QueryBuilder/Blocks/QueryFilterBlock.cs:131)
UnityEditor.Search.QueryBlock.OpenEditor (UnityEngine.Event evt, UnityEngine.Rect& rect) (at /Users/bokken/build/output/unity/unity/Modules/QuickSearch/Editor/QueryBuilder/QueryBlock.cs:151)
UnityEditor.Search.QueryBlock.OnOpenBlockEditor (UnityEngine.UIElements.ClickEvent evt) (at /Users/bokken/build/output/unity/unity/Modules/QuickSearch/Editor/QueryBuilder/QueryBlock.cs:340)
UnityEngine.UIElements.EventCallbackFunctor`1[TEventType].Invoke (UnityEngine.UIElements.EventBase evt) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/Events/EventCallback.cs:64)
UnityEngine.UIElements.EventCallbackRegistry+DynamicCallbackList.Invoke (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement target) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/Events/EventCallbackRegistry.cs:228)
UnityEngine.UIElements.EventDispatchUtilities.HandleEventAcrossPropagationPath (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.VisualElement target, System.Boolean isCapturingTarget) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/Events/EventDispatchUtilities.cs:183)
UnityEngine.UIElements.EventDispatchUtilities.DispatchToCachedElementUnderPointerOrPanelRoot (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, System.Int32 pointerId, UnityEngine.Vector2 position) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/Events/EventDispatchUtilities.cs:538)
UnityEngine.UIElements.EventDispatchUtilities.DispatchToCapturingElementOrElementUnderPointer (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, System.Int32 pointerId, UnityEngine.Vector2 position) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/Events/EventDispatchUtilities.cs:581)
UnityEngine.UIElements.PointerEventBase`1[T].Dispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/Events/PointerEvents.cs:1188)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/EventDispatcher.cs:336)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/EventDispatcher.cs:291)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/EventDispatcher.cs:255)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/EventDispatcher.cs:78)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/EventDispatcher.cs:346)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/EventDispatcher.cs:200)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/Panel.cs:590)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/UIElementsUtility.cs:511)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/UIElementsUtility.cs:230)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/UIElementsUtility.cs:76)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/UIElementsUtility.cs:30)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:219){code}
 

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.