Reproduction Steps
Run code that triggers the maximum re-entrancy error such as the following:
local function f(i)
if i == 20 then
print("done!")
else
task.defer(f, i + 1)
end
end
f(1)
Expected Behavior
I expect Maximum re-entrancy depth (10) exceeded
to include a stack trace so I know what code is causing the issue.
Tracking down the cause without a stack trace is a massive pain and leaves me wondering if the issue is even in my code.
Luckily, I was doing this in an isolated environment for running tests, so I just disabled each test one-by-one until I found the cause. Can’t say I’ll always be so lucky! If I encountered this on a live game with a massive codebase it would be practically impossible to find the cause!
Actual Behavior
Maximum re-entrancy depth (10) exceeded
does not include a stack trace.
Workaround
In some cases there is no workaround for this issue. For example, finding the cause of this error would be impossible in large codebases running into obscure edge-cases in live games.
Issue Area: Engine
Issue Type: Other
Impact: High
Frequency: Sometimes
Date First Experienced: 2022-03-03 00:03:00 (-06:00)
Date Last Experienced: 2022-03-03 00:03:00 (-06:00)