Hi,
I have encountered a strange behavior when using timers. Any function, that contains an error and is called with a timer, triggers an endless runtime error loop. Here is an example code:
-- triggers only one error
local t = 100 + false
-- triggers an endless error loop
local function listener( event )
local t = 100 + false
end
timer.performWithDelay( 1000, listener )
-- triggers an endless error loop
timer.performWithDelay(1000, function()
local t = 100 + false
end, 1)
To recreate this on simulator, you have to use Runtime:hideErrorAlerts() or unhandledError listener that returns true, but for production build, this is on by default. Test each code block separately, so that the runtime doesn’t stop at the firs error.
Is this a bug or am I missing something? I don’t remember this behavior in the past. I am using the latest build (2020.3635)
Thanks!