[Feature] Mapper: surface map-file parse errors and room-mismatch details in the game window
Maintainers usually reply within 5 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
Research direction
Start with the swallowed exceptions in MapZoneRepository.Load, ZoneRoomIndex.Scan, and MapperViewModel (TryAutoLoadZoneFor and LoadSelectedZone), then the mismatch path in src/Genie.Core/Mapper/AutoMapperEngine.cs. Done means a malformed Map*.xml produces a game-window [mapper] line with file and line/column, and an exits mismatch names the nearest candidate and the differing exits. The issue spans several subsystems and includes design choices, so confirm the scope with maintainers before starting.
Written by the indexing model from the issue text.
Description
Summary
Two related pieces of mapper feedback from Discord (Miskton, 2026-11-06), raised while preparing a community map PR:
- Map-file parse errors should be consistent and prominent. If one of the
Map*.xmlfiles in the Maps directory fails to parse, the user should get a clear notice saying which file and why — not a silently missing zone. - Room mismatches need more information. The Genie 4 mapper at least echoes a room-description mismatch; a mismatch on exits silently fails to match in both clients. Map authors iterating on a new map need to see what the mapper saw vs. what the map file says, so they can fix the file.
"some more consistent and prominent notices if there's a parsing error in an XML file would probably be helpful. And maybe some more information about room mismatches. It seems like the G4 mapper at least is moderately good about showing a room description mismatch, but if there's a mismatch on exits it may just silently fail to match."
Context: the new-map PR is in GenieClient/Maps (likely https://github.com/GenieClient/Maps/pull/268, Hollow Eve 2026). The author did multiple passes over every room fixing matching issues by trial and error — exactly the loop better diagnostics would shorten.
Current behaviour (Genie 5, beta.9.10.1)
Part 1 — map-file parse errors are swallowed
Every path that reads a zone XML drops the exception, so a map with a stray &, an unclosed tag, or a bad encoding just vanishes:
| Path | What happens on a malformed file |
|---|---|
MapZoneRepository.Load |
catch { return null; } — the XmlException (which carries file line/column) is discarded |
Genie4MapImporter.ImportDirectory |
catch { /* skip malformed files */ } |
ZoneRoomIndex.Scan |
"unreadable zones are skipped" — no count, no names |
MapperViewModel auto-detect index build |
catch { continue; } then if (zone is null) continue; — the zone silently drops out of cross-zone auto-detect, so #goto into it and arrival auto-switch both fail with no hint why |
MapperViewModel.LoadSelectedZone |
LoadStatus = "Could not load {file}.xml" — no reason, and only shown in the mapper panel's small grey status line, never in the game window |
The auto-detect summary line ("Indexed for auto-detect: N fingerprints, M server ids") does not say how many files were skipped.
Only MapsUpdater does this well — per-file errors are collected and reported in the update summary.
Genie 4 for comparison: AutoMapper.RoomOnDisk echoes [AutoMapper] Invalid maps in genie map directory: <file> {message} straight into the game window. Genie 5 has no equivalent.
Part 2 — room-mismatch diagnostics are hidden
The engine matches a room through tiers (server id → graph walk → title+exits fingerprint → reverse arc → description-only → title + any-exit-overlap). When nothing matches:
- The engine fires
RoomNotFoundInZone; the app answers withLoadStatusset to eitherNo local zone contains "<title>" with exits …orEngine can't match "<title>" (exits: …) in '<zone>'. - That text appears only in the mapper panel's 10pt status line (and in the Live Audit log if that is on). It never reaches the game window.
- The
[mapper] -> NO MATCH in zone …echo and the per-move match-tier echo exist, but only under#config mapperdebug. - A description mismatch where title+exits still match uniquely is accepted silently — no notice at all, which is the one case Genie 4 does announce (
[AutoMapper] Room description mismatch #id). - An exits mismatch (title matches, zero compass-exit overlap, description differs) produces the "can't match" status above — and nothing says which exits differed. Genie 4 does not check exits at all (
// Check exits here in a later version), so a map author gets no help from either client.
Net effect: when a freshly authored room fails to match, the player sees the map view stop following them and nothing else. The information needed to fix the map file (expected title/exits/description vs. what the file holds for the nearest candidate) is computed but discarded.
Proposed
Part 1 — parse errors
MapZoneRepository.Loadkeeps returning null for callers, but records the failure (file name +XmlExceptionmessage incl. line/column) on aLastLoadError/ out-param, or exposes aTryLoad(path, out zone, out error).- Every directory scan (auto-detect index,
ZoneRoomIndex.Scan,ImportDirectory) collects the skipped files and the app echoes one[mapper]system line per bad file into the game window at connect/scan time, e.g.[mapper] Skipped Map123_Foo.xml: '=' is an unexpected token. Line 418, position 27. - The "Indexed for auto-detect" summary appends
, N file(s) skipped (see above)when N > 0. LoadSelectedZonefailure includes the reason and also echoes to the game window.
Part 2 — mismatch feedback
- On a no-match in a zone that the index says should contain the room, echo a
[mapper]line to the game window (not just the status strip) naming the nearest candidate(s) by title and showing the live exits vs. the node's exits, and whether the description matched. Example:
[mapper] Room "Hollow Eve Festival, Midway" not matched in Map1_Crossing. Nearest: #4120 (exits in map: n, s, w — live: n, e, s; description differs). - Keep this on by default (it only fires on a miss), with the existing
#config mapperdebugstill owning the verbose per-move tier trace. - Optional parity nicety: when a match succeeds on title+exits but the description differs, echo
Room description mismatch #idlike Genie 4 does, gated behind a#config mappernotify/ Record-mode so it does not spam normal play.
Verification
- Drop a deliberately broken
Map999_Test.xml(unclosed tag) into Maps, connect: expect a[mapper] Skipped …line with line/column, and the index summary showing 1 skipped. - Edit a known room's exits in a copy of a map, walk into it: expect the mismatch line naming the candidate and the differing exits.
#config mapperdebug truestill produces the full tier trace; off by default produces only the miss/skip lines.
Related
- Map room-matching tiers and the lookup-only/record-mode split:
src/Genie.Core/Mapper/AutoMapperEngine.cs - Cross-zone auto-detect:
src/Genie.App/ViewModels/MapperViewModel.cs(TryAutoLoadZoneFor)
- Dominant language
- C#
- Stars
- 2
- Forks
- 5
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 22
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from GenieClient/Genie5
-
bug
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
GenieClient/Genie5#496 ·
Maintainers usually reply within 5 days
-
enhancement g4-regression
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
GenieClient/Genie5#494 ·
Maintainers usually reply within 5 days
-
area:ui-dock enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
GenieClient/Genie5#462 ·
Maintainers usually reply within 5 days
-
area:mapper bug est:<1d P2
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
GenieClient/Genie5#449 · 1 comment ·
Maintainers usually reply within 5 days
-
[Bug] Maps ▸ Update from Official Repo / Repair Maps give no notification of success or failurePossibly taken A pull request linked to this issue is open or already merged. Openarea:mapper area:updater bug est:<1d P3
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
GenieClient/Genie5#423 · 1 assignee ·
Maintainers usually reply within 5 days
All issues in GenieClient/Genie5
Similar issues
-
documentation good first issue kind:task level:starter size:s
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Arggon/ArggonStores#66 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
[Tool] MockAPIOpenhas-image has-license has-readme new-tool ready-to-approve repo-verified
Difficulty 1/5 Under an hour Newbie friendliness 72/100
shanselman/TinyToolTown#956 ·
Maintainers usually reply within 2 days
-
bug frontend
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
[Bug]: Native build script prints a traceback when Git is missing from PATHPossibly taken @Jaisuryan-web claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
KnifeLemon/Filee#1953 ·
Maintainers usually reply within 1 day