This module crashes the type checking engine

  1. Open Studio

  2. Open new Baseplate project

  3. Create a ModuleScript inside ServerStorage

  4. Copy this code into the ModuleScript

local CloseTask, DestroyTask, Unlock, Save

export type Constructor = {
	new: (name: string, scope: string, key: string?) -> DataStore,
	hidden: (name: string, scope: string, key: string?) -> DataStore,
	find: (name: string, scope: string, key: string?) -> DataStore?,
	Response: {Success: string, Saved: string, Locked: string, State: string, Error: string},
}

LockTask = function(runningTask, proxy)
	local dataStore = getmetatable(proxy)
	if dataStore.TaskManager:FindLast(CloseTask) == nil and dataStore.TaskManager:FindLast(DestroyTask) == nil then StartLockTimer(proxy) end
	if dataStore.__public.SaveOnClose == true then Save(proxy, 3) end
	dataStore.__public.StateChanged:Fire(false, proxy)
end

CloseTask = function(runningTask, proxy)
	local dataStore = getmetatable(proxy)
	if dataStore.__public.SaveOnClose == true then response, responseData = Save(proxy, 3) end
	Unlock(dataStore, 3)
end

DestroyTask = function(runningTask, proxy)
	local dataStore = getmetatable(proxy)
	if dataStore.__public.State == false then
		if dataStore.__public.SaveOnClose == true then response, responseData = Save(proxy, 3) end
		Unlock(dataStore, 3)
	end
	dataStore.__public.StateChanged:Fire(nil, proxy)
end

return Constructor :: Constructor
  1. Wait a few seconds

  2. Change the 3 on line 26 to 4

  3. Congratulations you have just crashed the type checking engine

  4. to test if the type checking engine has crashed create a new script and type game you should notice that auto complete no longer work you must restart studio now to fix it

this problem was previously reported here: This module breaks type checking and crashes studio · Issue #1102 · luau-lang/luau · GitHub
it was fixed for a short time but then stopped working again

you can find the full module here: https://create.roblox.com/store/asset/11671168253
but iv narrowed the problem down to the code shown above

8 Likes

finally. how roblox studio was meant to be used

Thank you for the bug report. We’ve identified the issue and are preparing a fix. We’ll reach out if we need any more information.

2 Likes

I’m not sure if anything has changed with studio but iv now gotten two reports in the last 24hrs that my module is crashing studio

it might be a mac only problem because for me only type checking is crashing or maybe you have only pushed the update to some users and I still don’t have this update

1 Like

This problem is still happening after 2 days, when are you going to push a fix?

Hi

I am also on mac using the datastore module and I have been experiencing crashes since what I believe to be on a Studio update on 29/06/2024, I am using a M1 Mac 2020 13-inch 16GB RAM, and crash when I try and open a script which is requiring the data store module. I have tried reinstalling roblox and I have the datastore stored in my ServerStorage.

Deleting my ~/Library folders all related to roblox and roblox studio did not fix it either.

UPDATE

I deleted the module script from my ServerStorage and it is no longer crashing upon opening the script(s). While it works now it is less than ideal as I have centred my game around this data store module

tried to reproduce, but didn’t work. Trying to even pasting the contents into the ModuleScript at ServerStorage just crashes Studio

Any news? Its been difficult to develop these past couple of days

Studio crash has been fixed in 633 update.

Autocomplete will still be disabled when a module with an issue that previously would cause a hard crash is encountered.

2 Likes

Looks like this bug has been fixed autocomplete currently working for me in version 636

image

Thank you :heart:

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