Setting Table.__index = Table in this setup causes crash in strict type mode

The cause is a GUI object in my game for my custom chat. It contains a module called ChannelObject which represents my custom chat channels.

The ChannelObjectMarshaller library (the ModuleScript named ChannelObject) that I extracted with a mix of Roblox File Format and Remodel has a line that sets a table’s index to itself for use in MetaTables
ChannelObjectMarshaller.__index = ChannelObjectMarshaller

This line causes a crash. A repro file and the necessary steps have been attached to the private report message.

Old thread “Latest studio update causes my place to crash studio”

The applicable place ID is 5451652592.

Upon trying to open this place in studio, studio will stop responding and will never recover. No beta features are enabled. The place uses team create, but opening a local file also causes a crash, so I don’t think it’s related to the TC session.

Edit: Additionally, actually playing the game from the website loads an incredibly out of date version, as the team create was never formally pushed to the place. Testing if this crash occurs in the game client is not possible at this time as a result.

Amendment: I’ve decided to cross-check this with some people in private by sending them the local save file, and they have this issue as well when trying to open it. I have two people testing this, both have finished and reported that it crashes studio.

The place is private and I do not want to link the place file in the thread. I will contact the necessary group privately with the place.

Applicable specs:

Intel Xeon W3530 @ 2.8GHz / 24GB RAM / NVIDIA GTX 1070 running Windows 10

Report Message


As of late, I’ve decided to do some personal investigation using CloneTrooper1019’s Roblox File Format library.

The source of the problem has been revealed to be in the StarterGui. To test this, I created a dummy place file, and using Clone’s tool, I forcefully copied a select number of Services from my place file into the dummy file. This process involved deleting the Service objects from the dummy, and moving the data directly from my file into the old data’s place.

I can verify that this is the case because if I copy all of the applicable services (Workspace, ReplicatedFirst, ReplicatedStorage, ServerStorage, ServerScriptService, Lighting, StarterPack, StarterGui, and StarterPlayer) and exclude StarterGui, the place will open fine. If I include StarterGui, it will crash as this report initially entailed. If I isolate StarterGui (port nothing except for that over), it will crash as well.

And here's the code I used to create this file.
// Load my place file.
RobloxFile supplier = RobloxFile.Open(@"F:\Users\Xan\Desktop\ROBLOXPLACES\ACoS\Untitled Game.rbxl");

// Load a dummy rbxl file. This was a blank baseplate. I deleted the baseplate, and saved the file.
RobloxFile receiver = RobloxFile.Open(@"Receiver.rbxl");

// This first routine looks at the receiver and clears out all of the services that I will copy over from the source.
foreach (Instance child in receiver.GetChildren()) {
	if (child is StarterGui) {
		// This is a violation of the standards of Clone's library (the setter on ParentLocked is flagged as internal)
		// I have overridden this behavior so that I could forcefully manage all of the data contained within the place file, including the parent property of services.
		child.ParentLocked = false;

// This one puts the data from my original place file into the receiver file.
foreach (Instance child in supplier.GetChildren()) {
	if (child is StarterGui) {
		child.ParentLocked = false;
		child.Parent = receiver; // This will copy the data from the supplier file into the receiver file by reference...

// ... Which is then saved as if it were part of the file itself.
receiver.Save("TEST.rbxl"); // This will save the new, modified variant of receiver.rbxl as TEST.rbxl

The StarterGui contains a single child which is the clientside portion of my chat GUI. I have attached the file to the private bug report message. Using Remodel I was able to isolate the item as an rbxmx, which has also been attached to the private bug report message.

Removing the scripts from this XML file allowed it to be imported (setting the <Source> tags to empty strings).


So, @EtiTheSpirit posted the problematic file in a discord server we share and I took a look at it.

While I wasn’t able to get it down to an exact repro, I did realize two things:

One, I’m certain that it’s the type system, since removing --!strict from the top of the script stopped the crash entirely, and re-adding it caused Studio to crash again.

Two, it’s probably recursion related since removing references to the class’s metatable (via commenting out things like assertions or method calls) stopped the crash.

cc @zeuxcg because this may have slipped under your radar since it wasn’t obviously about the type system


Thanks for the report. Please expect a delay in progress due to holidays and we will get back to you as soon as we return.


Hi there, I tried replicating the issue using the current Studio, and it didn’t crash! (It did give me some odd type errors, but that’s another story.) Can you look to see whether it still crashes at your end?

1 Like

As far as I’m able to tell, this was fixed with the release corresponding to this post Studio performance when opening/playing games is much worse - #13 by Hippie_ofDoom

1 Like

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