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

2 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