Region crash caused by hiding code behind "if false"
complete
Frio Belmonte
I was debugging stuff and hid a block behind "if false then ... end". Upon saving the script, the region crashes and takes a long time to recover. As for why I wasn't commenting it out instead, I have no good explanation other than "block is too long, comments look uglier in my editor".
Said code included a call to LLTimers:every with an anonymous function as the first bit. I culled down the script this this minimal repro (the function call before may not even be necessary, nor the contents of the timer function):
local function setup()
end
setup()
if false then
LLTimers:every(3, function()
ll.SetLinkPrimitiveParamsFast(LINK_THIS, {PRIM_TEXT,
"hi!",
vector(1, 1, 1), 1})
end)
end
I promise to stop testing after crashing 3 out of 4 regions.
Log In
H
Harold Linden
marked this post as
complete
Should be fixed now!
H
Harold Linden
marked this post as
inĀ progress
H
Harold Linden
Should be fixed when https://github.com/secondlife/slua/commit/650eb9622644039619e768dbc0ca168fb5d71f7b gets deployed this week. Happens whenever the compiler is able to determine statically that a function will never be used, and just skips including it in the bytecode. Thanks again!
Frio Belmonte
Harold Linden Cool, thanks! Edit: was talking about asking for expedited restarts but disregard that, regions are back up.
H
Harold Linden
Thanks for the report! Based on GDB's backtrace this appears to be something to do with registering the permanents for functions in the bytecode:
#0 0x0cde4734 in eris_make_forkserver (L=<optimized out>) at /__w/slua/slua/VM/src/ares.cpp:3622
I'll have a look.