Skip to content

#PR1 Bug-Fixes#261

Open
diaverso wants to merge 3 commits into
Foxlider:masterfrom
diaverso:pr/1-bug-fixes
Open

#PR1 Bug-Fixes#261
diaverso wants to merge 3 commits into
Foxlider:masterfrom
diaverso:pr/1-bug-fixes

Conversation

@diaverso
Copy link
Copy Markdown

@diaverso diaverso commented May 15, 2026

FASTER/Models/ArmaMod.cs, FASTER/Models/SteamWebApi.cs

FASTER/Models/BasicCfg.cs

FASTER/ViewModel/DeploymentViewModel.cs

FASTER/ViewModel/SteamUpdaterViewModel.cs

  • [BUG] Mod status on updates #242: mod.Status was set to NotComplete in the early cancellation path before any download started
  • [BUG] Application crash when updating mods #259: Task.Factory.StartNew(async ()=>) returns Task; missing .Unwrap() caused ContinueWith to fire instantly instead of after async work; converted lambda to async + await, added .Unwrap()
  • [BUG] Bug name #238: NullReferenceException accessing SteamClient.Credentials.Username after SteamClient was nulled; save username before disposal

⬇️ Next: #PR2 Community-PRs

…alization (Foxlider#115, Foxlider#131, Foxlider#167, Foxlider#238, Foxlider#242, Foxlider#251, Foxlider#254, Foxlider#255, Foxlider#259)

FASTER/Models/ArmaMod.cs, FASTER/Models/SteamWebApi.cs
- Foxlider#167: Show one-time warning after 3 failed retries if Steam API Key is
  invalid; check response.IsSuccessStatusCode in ApiCall() so errors
  propagate to retry logic with a meaningful reason

FASTER/Models/BasicCfg.cs
- Foxlider#251/Foxlider#115: PerfPreset getter always returns "Custom" so JSON
  deserialization called the setter and reset MaxMsgSend to 256 on every
  profile clone; fixed with [Newtonsoft.Json.JsonIgnore]

FASTER/ViewModel/DeploymentViewModel.cs
- Foxlider#254: LinkMod/DeleteLink called Directory.Delete(path, true) on symlinks,
  which destroyed the source mod folder; now checks FileAttributes.ReparsePoint
- Foxlider#131: DeployAll() crashed when InstallPath didn't exist; added guard +
  user-facing error message; added UnauthorizedAccessException handler
  with Developer Mode / run-as-Admin guidance

FASTER/ViewModel/SteamUpdaterViewModel.cs
- Foxlider#242: mod.Status was set to NotComplete in the early cancellation path
  before any download started
- Foxlider#259: Task.Factory.StartNew(async ()=>) returns Task<Task>; missing
  .Unwrap() caused ContinueWith to fire instantly instead of after async
  work; converted lambda to async + await, added .Unwrap()
- Foxlider#238: NullReferenceException accessing SteamClient.Credentials.Username
  after SteamClient was nulled; save username before disposal

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@diaverso diaverso mentioned this pull request May 15, 2026
@diaverso
Copy link
Copy Markdown
Author

@jupster I did what you asked me to do.

SonarCloud rule S2696 flags writing to static fields from instance
methods. Extracted _apiKeyWarningShown write into TryShowApiKeyWarning()
static method so the field is only accessed from static context.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jupster jupster requested review from Foxlider and jupster May 15, 2026 21:57
@jupster
Copy link
Copy Markdown
Collaborator

jupster commented May 15, 2026

@jupster I did what you asked me to do.

Appreciate it. Ill work to go through them when I can.

…ash logging

FASTER/Models/SteamWebApi.cs
- S2699: Replace throw new Exception() with throw new HttpRequestException()
  so callers can catch a specific type instead of base Exception

FASTER/ViewModel/SteamUpdaterViewModel.cs
- S3776: Extract inner async lambda from RunModsUpdater into
  ProcessModDownloadAsync(ArmaMod mod) private method, reducing
  cognitive complexity from 36 to well below the 25 limit

FASTER/App.xaml.cs
- Add AppDomain.UnhandledException, DispatcherUnhandledException and
  TaskScheduler.UnobservedTaskException handlers that write to the
  debug log file — captures silent fatal crashes (e.g. native exceptions
  from BytexDigital.Steam during DownloadAsync) that bypass try/catch

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants