<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://osimdev.org/wiki/index.php?action=history&amp;feed=atom&amp;title=OpenSimulator_Internals%2FWalkthroughs%2FBring_Up_Region</id>
	<title>OpenSimulator Internals/Walkthroughs/Bring Up Region - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://osimdev.org/wiki/index.php?action=history&amp;feed=atom&amp;title=OpenSimulator_Internals%2FWalkthroughs%2FBring_Up_Region"/>
	<link rel="alternate" type="text/html" href="http://osimdev.org/wiki/index.php?title=OpenSimulator_Internals/Walkthroughs/Bring_Up_Region&amp;action=history"/>
	<updated>2026-08-04T15:40:59Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>http://osimdev.org/wiki/index.php?title=OpenSimulator_Internals/Walkthroughs/Bring_Up_Region&amp;diff=54&amp;oldid=prev</id>
		<title>Jwbshaw: Created page with &quot;= OpenSimulator Internals/Walkthroughs/Bring Up Region =  == Overview ==  Traces what happens from running OpenSim.exe to the region being ready for logins. Assumes ROBUST is already up -- see OpenSimulator Internals/Walkthroughs/Bring Up Grid.  See OpenSimulator Internals/Code Map/OpenSim and OpenSimulator Internals/Code Map/Scene for the component reference this walkthrough is built from.  ----  == Steps ==  === 1. Process starts ===   OpenSim/Region/Applic...&quot;</title>
		<link rel="alternate" type="text/html" href="http://osimdev.org/wiki/index.php?title=OpenSimulator_Internals/Walkthroughs/Bring_Up_Region&amp;diff=54&amp;oldid=prev"/>
		<updated>2026-06-30T09:08:30Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= OpenSimulator Internals/Walkthroughs/Bring Up Region =  == Overview ==  Traces what happens from running OpenSim.exe to the region being ready for logins. Assumes ROBUST is already up -- see &lt;a href=&quot;/wiki/index.php/OpenSimulator_Internals/Walkthroughs/Bring_Up_Grid&quot; title=&quot;OpenSimulator Internals/Walkthroughs/Bring Up Grid&quot;&gt;OpenSimulator Internals/Walkthroughs/Bring Up Grid&lt;/a&gt;.  See &lt;a href=&quot;/wiki/index.php/OpenSimulator_Internals/Code_Map/OpenSim&quot; title=&quot;OpenSimulator Internals/Code Map/OpenSim&quot;&gt;OpenSimulator Internals/Code Map/OpenSim&lt;/a&gt; and &lt;a href=&quot;/wiki/index.php/OpenSimulator_Internals/Code_Map/Scene&quot; title=&quot;OpenSimulator Internals/Code Map/Scene&quot;&gt;OpenSimulator Internals/Code Map/Scene&lt;/a&gt; for the component reference this walkthrough is built from.  ----  == Steps ==  === 1. Process starts ===   OpenSim/Region/Applic...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= OpenSimulator Internals/Walkthroughs/Bring Up Region =&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
Traces what happens from running OpenSim.exe to the region being ready for logins. Assumes ROBUST is already up -- see [[OpenSimulator Internals/Walkthroughs/Bring Up Grid]].&lt;br /&gt;
&lt;br /&gt;
See [[OpenSimulator Internals/Code Map/OpenSim]] and [[OpenSimulator Internals/Code Map/Scene]] for the component reference this walkthrough is built from.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Steps ==&lt;br /&gt;
&lt;br /&gt;
=== 1. Process starts ===&lt;br /&gt;
&lt;br /&gt;
 OpenSim/Region/Application/OpenSim.cs -- StartupSpecific()&lt;br /&gt;
&lt;br /&gt;
Console created (local/basic/rest/GUI depending on config). base.StartupSpecific() called -- see OpenSimBase below. No database activity yet at this point.&lt;br /&gt;
&lt;br /&gt;
=== 2. OpenSimBase startup ===&lt;br /&gt;
&lt;br /&gt;
 OpenSim/Region/Application/OpenSimBase.cs -- StartupSpecific()&lt;br /&gt;
&lt;br /&gt;
# Refuses to run if CombineContiguousRegions is set (fatal)&lt;br /&gt;
# Loads SimulationDataStore plugin -- this is the region database connection (osimdev_t1), throws if [SimulationDataStore] is missing&lt;br /&gt;
# Loads EstateDataStore plugin -- throws if missing&lt;br /&gt;
# Calls base.StartupSpecific() (RegionApplicationBase) -- reads Regions.ini, iterates each [RegionName] section&lt;br /&gt;
# Loads application plugins from /OpenSim/Startup&lt;br /&gt;
# PostInitialise() called on all plugins&lt;br /&gt;
&lt;br /&gt;
At this point the simulation and estate database connections exist but no region-specific rows have been touched yet.&lt;br /&gt;
&lt;br /&gt;
=== 3. Region creation ===&lt;br /&gt;
&lt;br /&gt;
 OpenSim/Region/Application/OpenSimBase.cs -- CreateRegion()&lt;br /&gt;
&lt;br /&gt;
Called once per [RegionName] section found in Regions.ini.&lt;br /&gt;
&lt;br /&gt;
# Gets IRegionModulesController -- fatal exit if missing&lt;br /&gt;
# Sets region ServerURI (http://osimdev.org:9000/ for T1)&lt;br /&gt;
# Calls SetupScene() -- creates AgentCircuitManager, constructs Scene object (see step 4)&lt;br /&gt;
# controller.AddRegionToModules(scene) -- every region module is instantiated and attached: physics engine, script engine, asset/inventory/grid connectors (in grid mode these are the remote connectors calling ROBUST), estate module, land management, attachments module, entity transfer module, etc.&lt;br /&gt;
# Verifies required permissions modules loaded if SecurePermissionsLoading=true -- fatal exit if missing&lt;br /&gt;
# scene.SetModuleInterfaces() -- Scene&amp;#039;s lazy-loaded service properties and module references are wired up&lt;br /&gt;
# SetUpEstateOwner() if estate has no owner -- prompts console interactively, can create the owner UserAccount via UserAccountService if running standalone&lt;br /&gt;
# scene.loadAllLandObjectsFromStorage() -- SELECT from land table in osimdev_t1&lt;br /&gt;
# scene.LoadPrimsFromStorage() -- SELECT from prims, primshapes, primitems -- builds SceneObjectGroup for every linkset, calls AddRestoredSceneObject() for each&lt;br /&gt;
# scene.RegisterRegionWithGrid() -- see step 5&lt;br /&gt;
# scene.CreateScriptInstances() -- script engine starts for every loaded object with scripts&lt;br /&gt;
# Scene added to SceneManager&lt;br /&gt;
# scene.EventManager.OnShutdown hooked&lt;br /&gt;
&lt;br /&gt;
=== 4. Scene construction ===&lt;br /&gt;
&lt;br /&gt;
 OpenSim/Region/Framework/Scenes/Scene.cs (full constructor)&lt;br /&gt;
&lt;br /&gt;
# Loads RegionSettings from SimulationDataService -- SELECT from regionsettings. If terrain textures are zero UUIDs, defaults are assigned and saved back (UPDATE)&lt;br /&gt;
# Loads EstateSettings from EstateDataService -- SELECT from estate_settings via estate_map&lt;br /&gt;
# Reads [Startup], [EntityTransfer], [InterestManagement] config sections -- draw distances, prim size limits, physics flags, script engine choice, frame timing, persistence windows&lt;br /&gt;
# Creates SimStatsReporter&lt;br /&gt;
# StartTimerWatchdog() -- 1-second interval timer begins (independent of the Heartbeat thread)&lt;br /&gt;
&lt;br /&gt;
=== 5. Grid registration ===&lt;br /&gt;
&lt;br /&gt;
 OpenSim/Region/Framework/Scenes/Scene.cs -- RegisterRegionWithGrid()&lt;br /&gt;
&lt;br /&gt;
# m_sceneGridService.SetScene(this)&lt;br /&gt;
# RegenerateMaptile() if m_generateMaptiles is true -- builds and stores a map tile asset&lt;br /&gt;
# Builds GridRegion from RegionInfo, calls GridService.RegisterRegion()&lt;br /&gt;
# On ROBUST side: see [[OpenSimulator Internals/GridService]] RegisterRegion() -- validates coordinates, checks for overlaps, applies region flags, writes to regions table with RegionOnline flag set&lt;br /&gt;
# Throws on failure -- this is a fatal startup error in OpenSimBase.CreateRegion()&lt;br /&gt;
&lt;br /&gt;
=== 6. Heartbeat starts ===&lt;br /&gt;
&lt;br /&gt;
 OpenSim/Region/Framework/Scenes/Scene.cs -- Start() → Heartbeat()&lt;br /&gt;
&lt;br /&gt;
# First Update(1) runs without watchdog alarm (avoids false positives from startup load)&lt;br /&gt;
# Watchdog alarm enabled&lt;br /&gt;
# Update(-1) begins the continuous per-frame loop -- see [[OpenSimulator Internals/Code Map/Scene]] for full frame breakdown&lt;br /&gt;
&lt;br /&gt;
=== 7. Logins enabled ===&lt;br /&gt;
&lt;br /&gt;
At frame 20 of the Update loop:&lt;br /&gt;
# Large object heap compaction, forced GC&lt;br /&gt;
# LoginsEnabled = true (if not StartDisabled and not LoginLock)&lt;br /&gt;
# m_sceneGridService.InformNeighborsThatRegionisUp() -- notifies any registered neighbour regions&lt;br /&gt;
# Ready = true&lt;br /&gt;
# Optional: writes a .ready marker file if RestartModule.MarkerPath is configured&lt;br /&gt;
&lt;br /&gt;
If LoginLock is true (set by RegionReady module) and there are scripts to compile, login enabling is deferred until script compilation completes, signalled via IRegionReadyModule.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Database Activity Summary ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Database !! Table !! Activity&lt;br /&gt;
|-&lt;br /&gt;
| osimdev_t1 || regionsettings || SELECT, possibly UPDATE if textures were unset&lt;br /&gt;
|-&lt;br /&gt;
| osimdev_t1 || estate_settings, estate_map || SELECT&lt;br /&gt;
|-&lt;br /&gt;
| osimdev_t1 || land || SELECT (loadAllLandObjectsFromStorage)&lt;br /&gt;
|-&lt;br /&gt;
| osimdev_t1 || prims, primshapes, primitems || SELECT (LoadPrimsFromStorage)&lt;br /&gt;
|-&lt;br /&gt;
| osimdev_t1 || terrain || SELECT (LoadWorldMap, called from SetupScene)&lt;br /&gt;
|-&lt;br /&gt;
| osimdev_robust || regions || INSERT or UPDATE (RegisterRegion)&lt;br /&gt;
|-&lt;br /&gt;
| osimdev_robust || assets || INSERT if a new map tile was generated&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Console Output Landmarks ==&lt;br /&gt;
&lt;br /&gt;
From a real T1 startup (osimdev), in order:&lt;br /&gt;
# Per-prim/script object loading messages&lt;br /&gt;
# &amp;quot;[SCENE]: Region {0} ({1}) registered at {2},{3} with flags {4}&amp;quot; equivalent from GridService&lt;br /&gt;
# &amp;quot;Initializing script instances in T1&amp;quot;&lt;br /&gt;
# &amp;quot;[ubOde]: N prim actors loaded&amp;quot;&lt;br /&gt;
# &amp;quot;[YEngine]: StartProcessing&amp;quot;&lt;br /&gt;
# &amp;quot;[RegionReady]: Region &amp;quot;T1&amp;quot; is ready&amp;quot;&lt;br /&gt;
# &amp;quot;INITIALIZATION COMPLETE FOR T1 - LOGINS ENABLED&amp;quot;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[OpenSimulator Internals/Code Map/OpenSim]]&lt;br /&gt;
* [[OpenSimulator Internals/Code Map/Scene]]&lt;br /&gt;
* [[OpenSimulator Internals/GridService]]&lt;br /&gt;
* [[OpenSimulator Internals/Databases]]&lt;br /&gt;
* [[OpenSimulator Internals/Walkthroughs/Bring Up Grid]]&lt;/div&gt;</summary>
		<author><name>Jwbshaw</name></author>
	</entry>
</feed>