What I'm reporting is likely this:
https://github.com/TASVideos/BizHawk/issues/867
I suspect there's something very wrong happening during garbage collection and tables with
BizHawk 2.0
I have run this line:
local c= 0; while true do local k= {c}; c= c+1; emu.frameadvance() end
After thousands of frames (
inconsistent time), BizHawk either crashes, or throws a lua exception at curious lines claiming a curious reason.
I did not crash for these lines: (
might happen, I could be unlucky)
while true do local t={}; emu.frameadvance() end
while true do local t={true}; emu.frameadvance() end
local t,c= {},0; while true do t[1]= c; c= c+1; emu.frameadvance() end
I also did not crash when repeatedly toggling this script:
local t={}; for i=1,1000 do t[i]= {i,i-1} end; while true do emu.frameadvance() end
If it matters, the errors I had while refining my scripts:
LuaInterface.LuaScriptException: [string "main"]:-1: 'for' initial value must be a number
LuaInterface.LuaScriptException: [string "main"]:-1928045675: attempt to call a table value
LuaInterface.LuaScriptException: [string "main"]:1: attempt to index a nil value
Note it was either the random error or a BizHawk crash, seemingly at random, and after a random time.
I have yet to find line negative 1.9 billion in my script.
Every one of these tests were made starting BizHawk 2.0, opening a ROM, running a movie, then running a script. No other action on my part was done.