Crash when calling BasePart:UnionAsync and BasePart:SubtractAsync on a Union with another Union parented inside of it

Reproduction Steps

The following script can reproduce the crash:

local a = Instance.new("Part")
a.Parent = workspace

local b = a:UnionAsync{a}
b.Parent = workspace

b:Clone().Parent = b
b:SubtractAsync{a}

Expected Behavior

Preferably, any children inside of the UnionOperation should be ignored when performing the operation.

Actual Behavior

The crash dialog appears and the application exits.

Workaround

Creating a clone of the union, calling ClearAllChildren() on it, and then calling UnionAsync/SubtractAsync on the cloned union instead.

Issue Area: Engine
Issue Type: Crashing
Impact: Low
Frequency: Very Rarely

7 Likes

Thanks for the report ! We’ll follow up when we have an update for you.

1 Like

A fix has been merge that should address this issue. When it is released, I will post here again to mention it.

The fix makes it behave in the same way as studio and as expected per this reported bug.

3 Likes