Skip to content
This repository has been archived by the owner on Jul 22, 2023. It is now read-only.

Calling :Clone() on a DataModel instance will produce a corrupted result #54

Open
fredgig opened this issue May 29, 2021 · 1 comment
Open
Labels
bug Something isn't working

Comments

@fredgig
Copy link

fredgig commented May 29, 2021

This can be replicated with this simple code snippet if input.rbxl is a default Baseplate template. As far as I'm aware, I don't think it's possible to successfully clone any DataModel without getting a corrupted file as a result.

local inputGame = remodel.readPlaceFile("input.rbxl")
local outputGame = inputGame:Clone()

remodel.writePlaceFile(outputGame, "output.rbxl")

When opening the output.rbxl file, I get this error from Roblox Studio:

Could not open the place "PATH/output.rbxl" with exception: "readIntVector offset is out of bounds while reading 4 bytes, offset=20, datasize=20 << refs vector, size=1 << property values, name=Attachment0, type=Attachment0 << chunk#110[PROP], property with typeIndex=104, type=AlignOrientation".
@LPGhatguy LPGhatguy added the bug Something isn't working label Jun 1, 2021
@LPGhatguy
Copy link
Contributor

Very interesting! It seems that our Clone implementation might've gained some bugs when we ported to rbx-dom v2.

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

No branches or pull requests

2 participants