Changing Mode of Align* constraints in specific order causes crash

Reproduction Steps
Player

  1. Join an experience in which your account has access to the server console
  2. Execute the following code via the developer console:
    local part = Instance.new("Part")
    local attach = Instance.new("Attachment")
    local align = Instance.new("AlignPosition")
    align.Mode = Enum.PositionAlignmentMode.OneAttachment
    align.Attachment0 = attach
    attach.Parent = part
    align.Parent = part
    part.Parent = workspace
    align.Mode = Enum.PositionAlignmentMode.TwoAttachment
    

Studio

  1. Open repro.rbxl
  2. Select the AlignPosition inside the Part in workspace
  3. Change the Mode property to TwoAttachment

Note that in both of these cases, the order of property sets is (or was set up, in the repro file) as follows:

  1. Mode = OneAttachment
  2. Attachment0 = attachment
  3. Mode = TwoAttachment

The crash only occurs when the changes happen in this order. It happens equally to AlignPosition and AlignOrientation.


Windows 10 64-bit
(Studio) Version 0.516.0.5160305

Expected Behavior
The Mode property should be changed successfully.

Actual Behavior
Following the Engine steps, all players receive the Disconnected dialog with Error Code 277 after a short delay. The server cannot be rejoined.

engine


Following the Studio steps, Studio will crash with the “An unexpected error occurred” dialog.

studio

Workaround
Make the relevant property changes in a different order, for example by clearing Attachment0 before changing Mode.

Issue Area: Engine
Issue Type: Crashing
Impact: Moderate
Frequency: Constantly
Date First Experienced: 2022-03-07 17:03:00 (+00:00)
A private message is associated with this bug report

8 Likes

Can reproduce this on Windows 11 (GPU: Nvidia RTX 3060, CPU: I5 10400F)

I can also reproduce this but I can manage to avoid the crash by parenting the align constraint’s parent to somewhere else but Workspace and then change the mode. This also happens for other mover constraints like LinearVelocity and changing the mode in any order crashes for me, and not necessarily in the order specified the repro.

Windows 10
R9 380X
Ryzen 5 2600

Thanks for the report! We are aware of the issue and we’ll follow up when we have an update for you.

1 Like

Hi sircfenner,
We’ve checked and this bug report duplicated another one that we fixed a couple months ago. Can you confirm that you are able to execute the developer console code and studio process?

Thanks.