Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MeharDT opened this issue Apr 27, 2024 · 0 comments
Open

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

MeharDT opened this issue Apr 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@MeharDT
Copy link
Contributor

MeharDT commented Apr 27, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant