docs: bnstoolkit 0.1.0 crash postmortem + manual-restart note #71

Merged
Matt merged 1 commits from docs/bnstoolkit-discussion-postmortem into main 2026-06-07 00:19:21 +00:00
@@ -1,8 +1,45 @@
# bnstoolkit M0 — discussion points for testing session # bnstoolkit M0 — discussion points for testing session
> Built 2026-06-07 (early hours UTC). Shipped via pack v0.34.0. > Built 2026-06-07 (early hours UTC). Shipped via pack v0.34.0 then hotfixed via v0.34.1.
> Repo: http://10.16.5.102:3000/minecraft/bnstoolkit > Repo: http://10.16.5.102:3000/minecraft/bnstoolkit
> Jar: `bnstoolkit-0.1.0.jar` (15.6 KB) > Jar: `bnstoolkit-0.1.1.jar` (15.6 KB)
## ⚠ Server status: needs a manual Start
The first deploy (`0.1.0`) crashed the dedicated server during mod
construction — see "Bug caught + fixed" below. The fixed jar (`0.1.1`)
is already staged in `/srv/fast/brass-sigil-server/server/mods/`, but
the JVM exited cleanly so systemd didn't auto-restart and I deliberately
didn't try to brute-force the admin panel credentials.
**To bring the server back: click Start in the web admin panel
([http://glados:8080](http://glados:8080)) when you wake up.** The new
boot should load `bnstoolkit-0.1.1` cleanly. Verification:
```
sudo journalctl -u brass-sigil-server.service --since "2 minutes ago" \
| grep -E "bnstoolkit|Done \([0-9]+|ModLoadingException"
```
Look for `[bnstoolkit] common setup complete` AND no `ModLoadingException`.
## Bug caught + fixed (0.1.0 → 0.1.1)
```
IllegalArgumentException: class uk.sijbers.bnstoolkit.BnsToolkit
has no @SubscribeEvent methods, but register was called anyway.
```
I called `NeoForge.EVENT_BUS.register(this)` in the @Mod constructor
without yet having any `@SubscribeEvent` methods on the class. NeoForge
21.1 treats that as fatal at construct-mods time. Removed the call;
will come back together with the first real event handler in M1.
**Why local `./gradlew build` didn't catch it:** the build step only
compiles + jars. The construct-mods phase only runs when a real
NeoForge instance loads the mod. Action item for M1: add a
`gameTestServer` Gradle run config that boots the dedicated server
profile in CI-style so this class of bug fails locally next time.
## What this is ## What this is