Debugger stack in certain cases completely garbage

  • Describe the bug. Describe what is happening when the bug occurs. Describe what you would normally expect to occur.

In certain cases the stack information produced by the debugger after an exception is random junk, or may be missing completely too. This may cause Studio to crash completely too if you’re having bad luck.

For a simple repro, use this localscript:

local function bla(a)
	a = a + 2832
	local t = {}
	t[a] = t[a] + 5
end

while true do
	game["Run Service"].Heartbeat:Wait()
	bla(math.random(10))
end


Yea, t is totally a function! Wait, a is nil?

Removing the yield will make it behave properly again:

Hooking it up to Heartbeat directly will also cause faulty behavior (but different behavior here apparently, even though it’s consistent):


Oh, so a must’ve been a function all the time!

  • How often does the bug happen (Everytime/sometimes/rarely)? What are the steps that reproduce the bug? Please list them in very high detail. Provide simple example places that exhibit the bug and provide description of what you believe should be the behavior.

This is completely consistent if it goes wrong (which is surprisingly common, sadly). It looks like breaking on certain scheduler resumes triggers this faulty behavior.

  • Where does the bug happen (www, gametest, etc) Is it level-specific? Is it game specific? Please post a link to the place that exhibits the issue.

Live.

  • When did the bug start happening? If we can tie it to a specific release that helps us figure out what we broke.

This has been occurring for a really really long time, but I wasn’t able to find a simple repro until now.

  • Anything else that you would want to know about the bug if it were your job to find and fix it.

This is without using the newer APS as using that doesn’t allow me to use the debugger on both the client and server…

OS: Win 10

Important note: this only happens on exceptions that are triggered, never on manual breakpoints.

2 Likes