Search Issue Tracker

Fixed

Fixed in 2.4.X

Votes

1

Found in [Package]

2.4.X

Issue ID

SPLB-208

Regression

No

Overwflow exeptions are thrown when selecting spline draw tool with an empty spline

Package: Splines

-

How to reproduce:
1. Open/create any project
2. GameObject > Spline > Draw Splines Tool...
3. Press "Esc" and select the newly created Spline again
4. Select Spline creation tool

Reproducible with: 2.4.0 (2023.2.0b14, 2023.3.0a10)

Error:
OverflowException
UnityEditor.Splines.SplineCacheUtility.GetCachedPositions (UnityEngine.Splines.Spline spline, UnityEngine.Vector3[]& positions) (at ./Library/PackageCache/com.unity.splines@2.4.0/Editor/Utilities/SplineCacheUtility.cs:40)
UnityEditor.Splines.SplineHandles.DoSegmentsHandles (UnityEngine.Splines.SplineInfo splineInfo) (at ./Library/PackageCache/com.unity.splines@2.4.0/Editor/Controls/SplineHandles.cs:176)
UnityEditor.Splines.SplineHandles.DoHandles (System.Collections.Generic.IReadOnlyList`1[T] splines) (at ./Library/PackageCache/com.unity.splines@2.4.0/Editor/Controls/SplineHandles.cs:99)
UnityEditor.Splines.SplineToolContext.OnToolGUI (UnityEditor.EditorWindow window) (at ./Library/PackageCache/com.unity.splines@2.4.0/Editor/Tools/SplineToolContext.cs:159)
UnityEditor.EditorTools.EditorToolManager.OnToolGUI (UnityEditor.EditorWindow window) (at /Users/bokken/build/output/unity/unity/Editor/Mono/Tools/EditorToolManager.cs:531)
UnityEditor.SceneView.DefaultHandles () (at /Users/bokken/build/output/unity/unity/Editor/Mono/SceneView/SceneView.cs:3509)
UnityEditor.SceneView.DoOnGUI () (at /Users/bokken/build/output/unity/unity/Editor/Mono/SceneView/SceneView.cs:2643)
UnityEditor.SceneView.OnSceneGUI () (at /Users/bokken/build/output/unity/unity/Editor/Mono/SceneView/SceneView.cs:2481)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at /Users/bokken/build/output/unity/unity/Modules/UIElements/Core/IMGUIContainer.cs:394)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:206)

Comments (1)

  1. nariagames

    Nov 14, 2023 13:42

    This happens when Spline does not have any Knot elements.
    To avoid this bug, go to Spline component, open Spline 0, and use + button to add an initial knot. The error should stop occurring and you can use Draw Splines Tool to continue adding knots to your spline.

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.