Simulator occasionally halts scripts on region handoff when they have collision and/or llSleep()
under review
Huns Valen
I first became aware of this when I noticed my aircraft weren't going into "taxi" mode on landing. It was hard to chase down the origin of this behavior, but I eventually discovered that a script containing collision_start()/land_collision_start() event handlers was being TURNED OFF on region crossing... but only on rare occasions.
I might cross 20 borders without this happening, or even 50 or more. It seems like it's more likely to happen in certain areas, such as the stretch of sims starting just south of Santa Catalina and continuing east across the Blake Sea to that giant four-sim airport in the Norwegian area. I suppose if they're homestead sims, that could explain why that particular area seems more susceptible to it. That has been by far the most reliable place for reproducing this bug.
I grepped all of the scripts in the whole object for llSetScriptState() calls. There are none. (No reason there would be in the first place.)
I found that removing an llSleep() call just after a collision_start() event caused the rate of the script halting to be greatly reduced. I theorize that the chain of events is something like this:
- Vehicle crosses sim border.
- Occasionally, this causes a spurious collision_start() or land_collision_start() event. (This happens well up in the air, obviously, so it isn't a "real" collision. Probably a race condition between the vehicle and avatar entering the sim in some stochastic order.)
- Something about the invocation of llSleep() when the vehicle is still actively being handed off fritzes something in the simulator; and it responds by halting the script, OR by failing to return control after llSleep()'s time has elapsed. Whatever the cause, the script's "Running" checkbox is disabled, and it is quite inert.
Log In
Uggo Vieria
hello, the collison happening is something that lasts since regions crossings have been modified before the uplift. The vehicle is colliding with seated avatars in some cases (probably when they take longer than the plane to enter the region). Another maker's planes had the same issue and I advised him in 2020 or so to check and ignore collision with avatars, which fixed the problem.
if ( llDetectedKey(0) == llDetectedOwner(0) ) return;
Of course, this will not solve the scripts randomly halting issue but it might lower the chances to have it happening. The scripts halting issue I have seen in many cars and AOs, you need to set them to running again to get they to work again, which also resets them
Maestro Linden
under review
Maestro Linden
needs info
Hi Huns Valen, thanks for the report. Please send me a copy of your repro vehicle (with watchdog script) in-world.
Huns Valen
Maestro Linden I spent a couple of hours writing up some test cases, and dropped some inventory on you: "Sim bug handoff notes", "VHI Nimbus [sim bug watchdog test]", and "VHI Nav/Tac HUD 2.7".
The writeup has a lot of information on other sim border crossing issues that vehicles face, which I naturally encountered during the course of writing this up. If you need any help gathering more information on those other bugs, ping me. I know ALL about them.
Huns Valen
Maestro Linden Just happened again in the vicinity of Santa Catalina.
Huns Valen
Maestro Linden And again, just now, same vicinity. Was either crossing from Blake Sea - Irish to Blake Sea - China, or from Blake Sea - China to Santa Catalina.
X-Guard (I mentioned this in the notecard) was turned OFF, so physics were enabled during this crossing. I think I mentioned in the notecard it happened with X-Guard turned ON previously, so now I have samples of it happening either way... which suggests to me that X-Guard is likely not a factor, and it's just a race condition between llSleep() and the region hand-off.