fix: tolerate stripped Excel language headers + observe background tasks + dep bumps#111
Merged
Merged
Conversation
Resolves an UnobservedTaskException downstream (Chromatics Sentry) caused
by Lumina.Excel.Exceptions.UnsupportedLanguageException thrown from inside
MemoryHandler's fire-and-forget background task on FFXIV installs whose
Excel sheets advertise only Language.None (observed on zh-TW Windows
locale with a CN-region client). The throw was happening during
ActionLookup.Resolve and was never observed, so the host AppDomain
crashed at GC time with the unhandled-task default policy.
Two layers of fix:
1. LuminaXivDatabaseProvider — tolerate missing per-language sheets.
A new private TryGetSheet<T>(GameData, Language, string) helper catches
UnsupportedLanguageException and returns null. All three async methods
(GetActionsAsync, GetStatusEffectsAsync, GetZonesAsync) now:
- Treat the iteration source (English Action/Status, default-language
TerritoryType) as required. If it fails, log one NLog warning and
return without populating the dictionary — no throw.
- Treat JP/DE/FR (and PlaceName for zones) as optional. Missing sheets
contribute string.Empty to BuildLocalization instead of crashing.
BuildLocalization's four-string signature is unchanged; CN/KR keep
their UNKNOWN_LOCALIZED_NAME defaults.
2. MemoryHandler — observe the fire-and-forget Tasks.
Both Task.Run blocks in the constructor (resource resolution and
signature resolution) now have a ContinueWith(OnlyOnFaulted) that
logs the AggregateException via the existing NLog Logger and raises
OnException so consumers can surface it. Any future exception in the
background pipeline gets observed and reported instead of becoming an
UnobservedTaskException at GC time.
Bundled in the same commit because they're related infrastructure work:
- FCS submodule bump 78d04f840 → e8908dbe5 (15 commits — "Update structs"
x3, AgentHUD UI display mode toggle bitfield, RaptureShellModule
.ChangeChatChannel return-type fix, InventoryContextEvent update,
misc ghidra import refactors).
- NLog + NLog.Schema 6.1.2 → 6.1.3 (Dependabot PRs #109 / #110).
All 179 tests pass; no integrity-test pin drift from the FCS bump.
Version: 9.0.33 → 9.0.34.
Co-Authored-By: Claude Sonnet 4.6 <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.
Summary
Resolves an
UnobservedTaskExceptionreported by a downstream consumer (Chromatics, via Sentry) whose user runs a zh-TW Windows locale against what appears to be a CN-region FFXIV install. Lumina 7.4 rejectsGetSheet<T>(Language.English)when the sheet'sHeaderFile.Languagescontains onlyLanguage.None; the throw fires insideMemoryHandler's fire-and-forget background task and was never observed, so the host AppDomain crashes at GC time on the default unhandled-task policy.Two layers of fix, plus three bundled cleanups.
1.
LuminaXivDatabaseProvider- tolerate missing per-language sheetsNew private
TryGetSheet<T>(GameData, Language, string)helper catchesUnsupportedLanguageExceptionand returnsnull. All three async methods now:Action/Statussheets, default-languageTerritoryType. If unavailable, log one NLog warning and return without populating the dictionary - no throw.PlaceNamelookups for zones) as optional. Missing sheets contributestring.EmptytoBuildLocalizationinstead of crashing.BuildLocalization's four-string signature is preserved; CN/KR keep theirConstants.UNKNOWN_LOCALIZED_NAMEdefaults.2.
MemoryHandler- observe the fire-and-forget tasksBoth
Task.Runblocks in the constructor (resource resolution and signature resolution) now have.ContinueWith(OnlyOnFaulted)continuations that log theAggregateExceptionvia the existingLoggerand raiseOnExceptionso consumers can surface it. Future exceptions in either background pipeline get observed and reported instead of becomingUnobservedTaskExceptionat GC time.3. Bundled in the same release
78d04f840 → e8908dbe5(15 commits -Update structs×3, AgentHUD UI display mode bitfield,RaptureShellModule.ChangeChatChannelreturn-type fix,InventoryContextEventupdate, misc ghidra tooling refactors). No integrity-test pin drift.Test plan
dotnet test- 179/179 passing🤖 Generated with Claude Code