Calling some Path2D methods with no LayerCollector ancestor causes a crash

As of 0.623, when calling some methods of a Path2D that’s parented to nil or isn’t a descendant of a LayerCollector, Studio crashes immediately with the “unexpected error occurred” screen. This appears to occur 100% of the time.
The methods include but aren’t limited to:

  • Path2D:GetPositionOnCurve()
  • Path2D:GetTangentOnCurve()
  • Path2D:GetPositionOnCurveArcLength()
  • Path2D:GetTangentOnCurveArcLength()

Repro

  1. In a script, create a Path2D object
  2. Add any amount of Path2DControlPoints
  3. (optional) Parent the Path2D anywhere but a descendant of a LayerCollector
  4. Call any of the methods listed above

Place file

path2dCrashTest.rbxl (52.2 KB)

Expected behavior

A regular error is thrown due to there being no LayerCollector’s GUI inset properties to go off of.

A private message is associated with this bug report

1 Like

Thanks for the report! Found someone to check this out :slight_smile: we’ll get back to you as soon as we can.

2 Likes

Hi!

Thanks for the report, this should be fixed now.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.