Part of the engine reference. This page covers the two
places where the simulation gives up on another machine in a match, the reason
it records each time, and how MJOLNIR's lobby DLL writes those reasons to
fireteam.log. It exists for the mass drops seen in playtests (#488, #498).
| Subsystem | The simulation's network channels (one link to each machine) and views (its per-machine replication state) |
| Tag data | None |
| Simulation code | HaloSimulation_tag_release.dll, CU4 (build pin below) |
| Our code | native/lobby/mjolnir_lobby.c: hook_channel_close, hook_view_set_mode, hook_view_kill, hook_sim_send |
| Tools | fireteam.log (close:, view: and sim: lines), node tools/remote/instances.mjs log <n> |
| Status | Both layers traced; the logging is in the lobby DLL from MJOLNIRLobby 0.39.1. Seen live on 2026-12-02, on game copies on one PC and between PC 1 and a second PC: a client crashing, a client leaving, the host leaving, a match ending, and the peer's reason on a connect-closed in both directions. Not yet seen: a reason-8 kill or the world's drop to joining. |
Every claim carries one of four labels, defined in how to research and verify: [traced] read from the simulation's code, [data] measured on shipped tags, [live] seen in the running game, [inferred] a reading that fits the rest and has not been tested on its own.
The idea in one paragraph
Each machine in a match has a channel to every other machine, and the simulation keeps a view of every remote machine on top of it. Either can end on its own. A channel closes with a reason number, and when it was connected it sends the other side a connect-closed message carrying that number. A view is killed with a reason number of its own, stored in the view. A view is killed by the machine that decides to, which in a match is usually the host, so a joiner's log alone cannot say why the host let it go. The lobby DLL logs both numbers on every machine (a kill through the setter of a view already at mode 0 changes nothing and is not logged), and a joiner also logs the reason inside each connect-closed it receives. When a whole lobby drops at once, the host's log names the first cause.
How the simulation uses it
Build pin
| File | Meteorite/Binaries/Win64/HaloSimulation_tag_release.dll |
| Game build | CU4 (config/hce-build.lock.json) |
| Size | 14,668,560 bytes |
| SHA-256 | C8C144404ADF61A9DE821C996682A7E66ABADD7E530397D3BBDE31C123203BF7 |
| Image base | 0x180000000 (addresses below are RVAs: add the base for Ghidra) |
Code map
| RVA | Role | Label |
|---|---|---|
0x4cfe10 | Closes a channel: (channel, reason). If the channel is connected (state 5 at +0x10cc) and the reason is not 6, it first sends connect-closed. It then stores the reason at +0x10d0 and clears the ids at +0x10c4. | traced |
0x4cfa80 | A channel's idle check. Closes with 7 when set-up outlasts its limit, with 9 when the channel's unreachable flag (+0x1250) is set, and with whatever number the connection under it gives when that connection reports itself lost. | traced |
0x5317aa | In the message handler 0x52fa90: a connect-closed whose first id matches the channel closes it with 10. | traced |
0x5318f0 | Sends one session message: (gateway, address, type, size, data). Connect-closed is type 3, 12 bytes: the peer's id for the channel, ours, and the reason. | traced |
0x50c770 | Sets a view's mode: (view, mode, id). Mode at view +0x40, id at +0x44. Every kill goes through it with mode 0 and id -1. | traced |
0x50d050 | Kills a view with a reason passed in: (view, reason). Called only from the view message handler. | traced |
0x4fcc20 | Drops a world back to joining: every in-game view (mode 5) of type 2 or 4 goes to mode 4. Called from four places, one of them the inactivity check below. | traced |
0x4faf07 | The inactivity check's call to 0x4fcc20. When the share of inactive machines passes a threshold, the world drops to joining; past a time limit, the machines are booted instead (0x546ef0). The threshold lives in data the DLL fills at run time (0x1252bdc). | traced |
Channel close reasons
The number each caller of 0x4cfe10 passes, where its meaning shows in the
code. The rest are logged as bare numbers.
| Reason | Logged as | Where | Label |
|---|---|---|---|
| 0 | no reason | an ordinary teardown | traced |
| 4 | connecting took too long | 0x4d0c40, called from the idle check: a time limit on connecting. The host retries a crashed client every 3 s or so, each try ending in a 4. | traced, live |
| 7 | set-up took too long | the idle check | traced |
| 9 | unreachable | the idle check, from the channel's unreachable flag. Logged by the machine left behind, 1 to 14 s after the other one went. | traced, live |
| 10 | the peer closed it | the message handler, on a connect-closed | traced |
| 11, 12 | connection lost | the idle check, when the connection under the channel reports itself lost; the connection picks the number | traced |
| 14 | its owner let go | 0x5225d0 (found 2026-10-03). The host's channel to a client that left the match. | traced, live |
| 3, 16, 17, 18 and others | the number only | several callers; meanings not worked out. 17 is what a client logged after its host left. | traced |
View reasons
A view's reason is stored at +0x3c. Every caller that kills one sets mode 0
through 0x50c770 and then stores the reason in the very next instruction,
mov dword [reg+3Ch], imm32 [traced]: every call site was listed. The
lobby DLL reads the number from that instruction, so no address in our code
names a reason. The one caller that stores a register, 0x50d050, is hooked
on its own.
| Reason | Logged as | Where it is set | Label |
|---|---|---|---|
| 1 | its channel closed | 0x4dc2a0, which the channel's close calls (it is in the kill's caller chain), then the view is torn down | traced, live |
| 6 | the other machine dropped its view | the view message handler, through 0x50d050. Logged by the machine that stays when the other leaves: the host when a client leaves, a client when the host does. | traced, live |
| 7 | refused change or stalled join | the setter itself, for a change it does not allow (traced); and the world's join code in 0x4f7924, 0x4fbfe0 and 0x4fc230, whose exact tests are not worked out (inferred) | traced |
| 8 | players not acknowledged | 0x4c9989: a machine's acknowledgement lacks a player this machine has in the game | traced |
| 9, 10, 11 | replication failed | three checks in the view's update (0x50c560), each a flag in the object at the view's +0x10 (+0x2da, +0x93f1, +0xa3e0) (traced); that the flags mean replication failed is a reading (inferred) | traced |
| 12, 15 | the number only | 0x547d0d and 0x50c715; meanings not worked out | traced |
A view's channel is at +0x58 [traced] (its teardown clears the channel's
owner there), so a view: line and a close: line about the same machine
name the same channel.
What the log lines say
fireteam.log, on every player's machine:
close: channel <ptr> state <s> reason <n> (<name>)[; the peer's reason <m> (<name>)] from <callers>
view: view <ptr> (type <t>, channel <ptr> state <s>) killed in mode <m>, reason <n> (<name>), at sim+<rva>; from <callers>
view: view <ptr> (type <t>, channel <ptr> state <s>) mode <a> -> <b> (id <i>), at sim+<rva>; from <callers>
sim: send connect-closed (size 12) ids <peer's> <ours> reason <n> (<name>), from sim+<rva>
- The peer's reason appears on a close with reason 10. The message handler holds the decoded connect-closed on its stack; the DLL finds it from the handler's own compare instruction, so a joiner sees why the host closed.
- Mode changes show a world dropping to joining as a burst of
5 -> 4linesat sim+4fccaa; the next frame infromsays which of its four callers did it (s4faf0cis the inactivity check). - Each kind is limited per 30 s (12 closes, 16 kills, 48 mode changes), with one line saying when the rest are not logged.
The same events in the log, live
Three game copies on PC 1 (tools/remote/instances.mjs), one hosting Blood
Gulch slayer, 2026-12-02 [live]:
| Event | Host's log | Client's log |
|---|---|---|
| A client joins | nothing for that view (see below) | its view of the host climbs 1 -> 2 -> 3 -> 4 -> 5 in one tick, from the view message handler |
| A client's process is killed | 14 s after it was last heard: close ... reason 9 (unreachable), send connect-closed ... reason 9, then view ... killed in mode 5, reason 1 (its channel closed); a close ... reason 4 every 3 s while it retries; session-disband 12 s later | (gone) |
| The host leaves the match | its own view torn down: mode 5 -> 0 without a reason, at sim+50c291; session-disband | view ... killed in mode 5, reason 6, then close ... reason 17 |
| A client leaves the match | view ... killed in mode 5, reason 6, then close ... reason 14 5 s later | its own view torn down, then close ... reason 9 |
Then between two PCs, 2026-12-02 [live]: a game copy on PC 1 hosting Blood Gulch slayer alone, and a second PC on another account joining it mid-match:
| Event | Host's log | Second PC's log |
|---|---|---|
| The second PC joins mid-match | its player made as joined in progress; no view line (the climb is a direct write) | its view of the host climbs 1 -> 2 -> 3 -> 4 -> 5 in one tick |
| The host ends the match (END GAME) | its view torn down without a reason, session-disband, then close ... reason 14 (its owner let go) and send connect-closed ... reason 14 | its view torn down, leave-session, then close ... reason 10 (the peer closed it); the peer's reason 14 (its owner let go) |
| The second PC's game is closed | view ... killed in mode 5, reason 6, at sim+4c96b1, then close ... reason 9 (unreachable) a second later | its own view torn down, then close ... reason 14 and its connect-closed, which arrived after the host had closed |
The same second PC with PC 1's own game hosting (not a copy), both on this lobby, the same day:
| Event | Host's log | Second PC's log |
|---|---|---|
| The second PC joins mid-match | its player put in by the inject, no faults; no view line | its view of the host climbs 1 -> 2 -> 3 -> 4 -> 5; the match fades in |
| The host ends the match (END GAME) | its view torn down without a reason, session-disband, then close ... reason 10 (the peer closed it); the peer's reason 14 (its owner let go) | its view torn down, leave-session, then close ... reason 14 and send connect-closed ... reason 14 |
| The second PC's game is closed | Party reports the device gone about 3 s after it was last heard; then close ... reason 9 (unreachable), view ... killed in mode 5, reason 1 (its channel closed), a close ... reason 4 every 3 s while it retries, and session-disband 12 s later. The host played on alone. | its network went first: close ... reason 9 (unreachable), then its view killed with reason 1 |
So at a match end either side can close first. Among the copies too, the client's channel closed first, with 14. Whichever side closes second, its log has the other side's reason. Closing a joiner's game, the same way both times, gave the host two different lines: reason 6 when the game tore its view down before its network went, and close 9 then kill reason 1 when the network went first. The host's reason follows the order the leaving game shuts down in.
The host's views of its clients do not go through the setter as they
climb. The world's join code writes their mode directly (immediate stores to
+0x40 at 0x4f7946, 0x4fc148, 0x4fc1d9, 0x4fc271, 0x4fc2a3 and
0x52e069) [traced, live]: the host logged no mode line while two clients
joined. Every kill and the drop to joining (0x4fcca5) do call the setter, so
the host's log still names each view it lets go. A host-side join timeline
would need the world's join code hooked or its views read each tick.
A leaving machine's connect-closed does not arrive. In every leave the side that stayed closed its channel as unreachable (reason 9), with 14 or with 17 on its own, and never logged a close with reason 10: by the time the leaving machine sent its connect-closed, the link under it was gone. The peer's reason shows when one side closes a channel whose link still works: at a match end [live], and as in the 2026-11-28 drops.
Open questions
| Question | Why it matters | How to settle it |
|---|---|---|
| Is #488's mass drop a reason-8 kill on the host? | It decides the fix: the order in which players are acknowledged, not the network. | A host we control, one client in the game, a second joining mid-match; read the host's view: lines at the drop. That takes three machines on three accounts. It could not be set up on 2026-12-02 with two PCs and game copies, which share one account: a copy joining a match under way crashes in its world's begin-play before its simulation joins (exe +0x3560ec6, reading 0x143c, with the released MJOLNIRLobby 0.38.9 too); and a second PC joining a match that two copies play sent its simulation join to the copy that was not hosting, since both copies carry the account's identity on its side, so the host never answered and the join gave up after 14 s (multi_instance.md). |
| Did the inactivity check drop the world in #498? | Under bursty lag, two clients going quiet could pass the threshold in a 5-7 player match. | A 5 -> 4 burst whose callers start s4fccaa s4faf0c in a host's log at the time of a drop. |
| What do reasons 12 and 15 mean, and are reasons 3, 5 and 13 still used? | They would be unnamed in a log. | Trace 0x547d0d and 0x50c715; search for stores to +0x3c that are not immediates. |
| What are view types 2, 3 and 4? | The world drop handles 2 and 4 only. A host's views of its clients were type 4 and a client's view of its host type 3 [live]. | Read where views are made. |
History
- 2026-11-28: two mass drops in the MintBlitz playtest (#488, #498). The logs showed channel closes, but not why the host let the joiners go.
- 2026-12-02: both layers traced in CU4; view reasons, the peer's reason and
mode changes added to
fireteam.log(MJOLNIRLobby 0.39.1), and checked on three game copies on one PC: a client crash, a client leaving and the host leaving each logged their reasons. Later that day, between PC 1 and a second PC: the peer's reason read worked at a match end in both directions, and closing a real player's game logged reason 6 on the host. #488's three-machine test could not be set up with two accounts. With PC 1's own game hosting and this lobby on both PCs, a mid-match join faded in, and the match end and a closed game logged their reasons.