Repository navigation
Conversation
The Gateway's `commands` and `values` listing modes load the mods to list theirs. Waypoint Tools then writes data/waypoint-tools/loaded.json with the listing's process, which exits without unloading it, so Give item found no running game with the mod loaded until the mod loaded again (turning it off and on in Mods fixed it). AskGateway now asks one question at a time, keeps loaded.json as a running Gateway wrote it, and puts it back when the question wrote over it and that Gateway still runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A player on LocalExile v0.4.2-beta with Waypoint Tools 1.0.0 loaded in game got "Give item uses the Waypoint Tools mod, and no running game has it loaded" every time. Turning the mod off and on in Mods fixed it.
Cause
Give item counts the mod as loaded when
data/waypoint-tools/loaded.jsonnames a process that still runs. The Gateway'scommandsandvalues <kind>listing modes callStartMods()before they print (to list the mods' commands), so Waypoint Tools also loads in that short-lived process. It writesloaded.jsonwith the listing's pid, and the process exits without unloading it. Waypoint runs those modes from the Console (command list, argument suggestions) and the lab layout, so after either one,loaded.jsonnames a dead process until the mod loads again in the real Gateway, which is what the Mods off/on did.Reproduced on a source checkout:
dotnet GameServer.Gateway.dll commandsrewroteloaded.jsonwith its own pid and left it there after exiting 0.Fix
CommandCatalog.AskGateway(shared by Windows and Linux):loaded.jsonif a running process wrote it (WaypointToolsMod.KeepLoaded);WaypointToolsMod.PutBack). A reload, unload or stopped Gateway in the meantime leaves the file as it is.This works with the released mod 1.0.0 and any server version. The root fix belongs in the mod: waypoint-tools should not write
loaded.jsonfrom a listing process, and on unload should delete it only if it names its own process. That can follow in LocalExile-Mods.Checks
dotnet build Waypoint.slnxandWaypoint.Linux.slnx: 0 warningsdotnet test Waypoint.slnx: 405 passed (2 new tests inWaypointToolsModTests)tests/Launcher.Checks: 201 passedModControl.Tests.ps1andMods.Tests.ps1, which fail the same way onmainwithout this change🤖 Generated with Claude Code