diff --git a/Changelog/2026-10-11-character-and-server-menus.md b/Changelog/2026-10-11-character-and-server-menus.md new file mode 100644 index 0000000..9caa201 --- /dev/null +++ b/Changelog/2026-10-11-character-and-server-menus.md @@ -0,0 +1,45 @@ +# Char and Mini Remote menus: Character on top, server plugin windows below + +## What changed + +- **New server-section registry** (`UI/ServerMenus.cs`). + - Each server is defined once, with how to detect it and the command that forces it. + - Each installed plugin with windows for that server adds its items. + - A section shows only while its server is detected or forced, and only when it has at least + one item. So it appears exactly when you're on that server with one of its plugins + installed. + - Infinite Leaftide is registered in `EntryPoint.RegisterServerMenus`: + - detection: `IltInfo.IsIlt`; + - force: `/rc ilt on`; + - with RynthAi installed: the Mini Remote's Character, Quests, Pets, Banking, Gear and Games + tabs, Guardian, and Progression; + - with RynthILT installed: Bounties. + - Items are `/rc` commands, so the engine and RynthAi run the same thing. + - The engine pushes the sections to RynthAi as the `"servermenu"` remote command. It sends them + whenever they change (checked once a second from the bar's draw) and again every 30 s. +- **RynthAi dashboard, Char right-click menu:** + - Top, **Character**: Mini Remote, Spells, Skills, Inventory and Item Count. + - Bottom: the active server sections (`ServerMenus.DrawImGuiMenu`). + - When server plugins are installed but none matches the world, the bottom half shows a note + and "Treat this world as ". + - The menu's fixed list of ILT tabs, Guardian and Progression is replaced by the registry. +- **New and extended `/rc` commands:** + - `/rc spells [show|hide|toggle]`: RynthAi's Spells window. + - `/rc skills [show|hide|toggle]`: the Skills panel. + - `/rc progression`: the Skills panel on its Progression tab. + - `/rc miniremote tab `: opens the Mini Remote window on one of RynthAi's tabs. + +## Files + +- `src/RynthCore.Engine/UI/ServerMenus.cs`: new. +- `src/RynthCore.Engine/EntryPoint.cs`: `RegisterServerMenus`. +- `src/RynthCore.Engine/ImGui/ImGuiBar.cs`: calls `ServerMenus.Tick()` each frame. +- `src/RynthCore.Engine/ImGui/Panels/RynthAiFace.cs`: the Char menu (`CharMenu`, + `PanelMenuItem`) and the launcher tooltip. +- `src/RynthCore.Engine/Compatibility/RynthCoreChatCommands.cs`: `/rc spells`, `/rc skills`, + `/rc progression` and `/rc miniremote tab`. + +## Testing + +- The engine builds in Release, and ItemHudTests pass. +- In-game checks are listed in the matching RynthSuite changelog. diff --git a/Changelog/2026-10-11-gametick-chatclient-guard.md b/Changelog/2026-10-11-gametick-chatclient-guard.md new file mode 100644 index 0000000..39a980b --- /dev/null +++ b/Changelog/2026-10-11-gametick-chatclient-guard.md @@ -0,0 +1,46 @@ +# Game-tick crash guard (chatclient.dll null read) + +RynthCore.SehTrampoline.dll native version 4 (previous: 3). + +## The crash + +On 2026-10-11 two idle clients died in the same second. Both CoreCLR dumps show the same fault on +AC's main thread: + +- AC's `Client::UseTime` called into `chatclient.dll` (Turbine's chat client in the AC folder). + Three calls in, a `rep movsd` copy of about 2 MB read from address 0 + (`chatclient.dll+0x1050`, read of 0x00000000). +- Both clients at once, both idle: most likely a bad or oversized message from the chat server. +- The fault unwound into the engine's managed `UseTime` detour. CoreCLR treats a native access + violation there as an unhandled exception and ends the process, so AC's own handlers never ran. + Windows reported the follow-on fault in `coreclr.dll+0x2c27ae`, which is the runtime's fail-fast + path, not the cause. +- `native-crash.log` had no record: a null read is held back until the process exits normally, + and the fail-fast skipped that. + +## The fix + +- `native/SehTrampoline/SehTrampoline.c`: new export `SEH_GameTickThiscall` calls + `int __thiscall fn(this)` under `__try`. On an access violation it returns 0 with the faulting + address (module-relative), the data address and the module name, and writes a full record + (registers and stack sweep) to `native-crash.log`, at most 16 per process. +- `Compatibility/GameTickHooks.cs`: AC's original `UseTime` goes through that wrapper when the + loaded trampoline is version 4 or later. A caught fault drops that one tick, logs an `[ERR]` + line, and returns 1 so AC's game loop keeps running (0 would make AC shut down). After 5 faults + within 30 seconds the guard turns itself off for the session, so a client whose state is + really broken still ends instead of spinning. +- `Compatibility/SehTrampoline.cs`: the P/Invoke, and `NativeVersion` (cached). A running client + keeps the trampoline DLL it started with, so a hot-reloaded engine meeting a v3 DLL logs + "native AV guard OFF" and calls `UseTime` directly, as before. +- `native/SehTrampoline/Build-SehTrampoline.ps1`: `-NoDeploy` builds into `bin\` without + copying to the runtime folder. +- `scripts/Publish-EngineCoreClr.ps1`: a trampoline DLL held by a running client is now moved + aside (`.old-