stride icon indicating copy to clipboard operation
stride copied to clipboard

UI Page Will Crash if a Slider is added to a Canvas panel

Open MeharDT opened this issue 1 year ago • 0 comments

Release Type: Official Release

Version: 4.2.0.2122

Platform(s): Windows

Describe the bug The UI Page will crash within Stride Game Studio if the Page contains a Canvas panel with a Slider child.

To Reproduce Steps to reproduce the behavior:

  1. Start Stride 4.2.0.2122 and create a New Game project
  2. Create a UI page in the Asset view
  3. Open the above UI page and add a Canvas panel to the Grid
  4. Add a Slider to the Canvas, the Slider should be a child of the Canvas element in the Visual Tree
  5. The Page will crash with the below error

Log and callstacks System.ArithmeticException: Function does not accept floating point Not-a-Number values. at System.Math.Sign(Single value) at Stride.Core.Mathematics.CollisionHelper.RayIntersectsRectangle(Ray& ray, Matrix& rectangleWorldMatrix, Vector3& rectangleSize, Int32 normalAxis, Vector3& intersectionPoint) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\core\Stride.Core.Mathematics\CollisionHelper.cs:line 753

Full log: stride_uipage_crash.txt

Additional context A work around is to first add the Slider to a Grid panel, resize the Slider, and then attach it to the Canvas. Once the Slider is added to the Canvas its prior dimensions can be restored without issue.

MeharDT avatar Apr 27 '24 03:04 MeharDT