Failed to Perform Mandatory Yield error in long running script.
tracked
SungAli Resident
After running continuously for several weeks, my emulator script halted with this error:
A Simple Sun-Earth-Moon emulator.: 0.3 [script:Sun-Earth-Moon demo] Script run-time error
Failed to perform mandatory yield
lua_script:159 function emulation_step
[C] function _tick
[C] function timer_event_wrapper
[C] function _handleEvent
The script, or an earlier version thereof, has halted similarly on at least two previous occasions. This, however, is the first time I've been on Sim when the crash occurred to receive the error message.
Full script @ https://pastebin.com/PAg61t1K
The instance of the object that crashed is at https://maps.secondlife.com/secondlife/Builders%20Brewery%20Sandbox/36/69/498 Anyone may take a full perms copy. I have not reset the script.
Log In
SungAli Resident
PS. The problem was not observed when running 64 instances of a script with colliding timers and with the scripts reset en-masse and running together.
SungAli Resident
The problem appears to be a collision in overlapping occurrences of ll.SetLinkPrimitiveParamsFast (executing asynchronously of the script). 64 instances of the following script running together can produce the error in a few minutes:
local base = ll.GetPos()
while true do
ll.SetLinkPrimitiveParamsFast( LINK_THIS, {PRIM_POSITION, vector(math.random()-0.5, 0, 0) + (base + ll.GetPos())/2 } )
ll.SetLinkPrimitiveParamsFast( LINK_THIS, {PRIM_POSITION, vector(0, math.random()-0.5, 0) + (base + ll.GetPos())/2 } )
ll.SetLinkPrimitiveParamsFast( LINK_THIS, {PRIM_POSITION, vector(0, 0, math.random()-0.5) + (base + ll.GetPos())/2 } )
ll.SetText( tostring(ll.GetPos()-base), vector(1,1,1), 1 )
end--while
SungAli Resident
I restarted the object after a while. The error continues to occur on a period of days to weeks.
M
Mercury Linden
updated the status to
tracked
M
Mercury Linden
updated the status to
under review