Issue Type: Display
Impact: Moderate
Frequency: Often
Reproduction Steps:
Here is a file with the resulting scrambled attribute serialization. Each object is the same, but the AttributesSerialize
property is entropic.
DifferingAttributes.rbxlx (43 KB)
To reconstruct this repro with a functioning package under your account, the following script can be pasted into the command bar:
local Selection = game:GetService("Selection")
local test = Instance.new("Configuration")
test.Name = "Publish me as a package!"
test.Parent = workspace
for i = 1, 3 do
test:SetAttribute("Test" .. i, i)
end
Selection:Set{test}
test:WaitForChild("PackageLink")
for i = 1, 25 do
test = test:Clone()
test.Parent = workspace
end
It will create an object with a few attributes and ask you to convert it into a package.
Once there’s a PackageLink inside of the object, it will be duplicated 25 times into the Workspace.
From here you should see some of the packages marked as changed, despite no changes being made to them from the original copy.
Expected Behavior:
My packages shouldn’t be getting marked as updated if I haven’t actually changed anything. I’ve been trying to utilize attributes in our game’s item data and scripts, but they keep getting marked as changed and we aren’t sure if we have changes to publish or not.
Actual Behavior:
In the repro I provided, comparing the duplicated packages reveals ordering differences in their serialization.
<BinaryString name="AttributesSerialize"><![CDATA[AwAAAAUAAABUZXN0MwYAAAAAAAAIQAUAAABUZXN0MgYAAAAAAAAAQAUAAABUZXN0MQYAAAAAAADwPw==]]></BinaryString>
<BinaryString name="AttributesSerialize"><![CDATA[AwAAAAUAAABUZXN0MQYAAAAAAADwPwUAAABUZXN0MgYAAAAAAAAAQAUAAABUZXN0MwYAAAAAAAAIQA==]]></BinaryString>
They’re storing the same contents, but weren’t serialized in the same order.
Workaround:
If it appears and I know I don’t have any changes pushed, sometimes I can use the “Undo Changes to Package” action, and it’ll properly revert to normal. The issue eventually returns on its own upon changes being made to the package or any of its attributes.