Startup script pass: a group deleted mid-pass crashed the region
What happened (2026-09-25)
A region restart (to deploy WorldBridge) returned as soon as WorldBridge answered; the herd respawn then deleted the
old herd while the region was still finishing its startup. The region's last startup step walks every object and
creates its script instances; it reached a group that had just been deleted, dereferenced a part's inventory, and
the NullReferenceException in SceneObjectGroup.CreateScriptInstances was fatal: the whole region went down (the
supervisor relaunched it a minute later, and the herd came back from the saved scene).
The fix (../startup-script-guard.diff, a unified diff of the two files against 0.9.3.0)
SceneObjectGroup.CreateScriptInstances:parts[i]?.Inventory?.CreateScriptInstances(...) ?? 0, guarded exactly as its twinRemoveScriptInstancesalready is.Scene.CreateScriptInstances: skip a group thatIsDeleted. Built asOpenSim.Region.Framework.dll.
And the race itself
tools/region_restart.py now returns only after the region's log says the script instances are initialised, so
nothing a caller does next can race that pass.
Deploy
python tools/region_restart.py <the built OpenSim.Region.Framework.dll> (the build's copy into the live bin/
fails on the file lock while the region runs; the DLL waits in OpenSim/Region/Framework/obj/Release/).