5284
Pathfinder; Race Conditions for Check for Updates Dialog
Pathfinder

Changes made for Pathfinder V5. PC's.

If AreUpdatesAvailable completes before ShowDialog() (which is likely since the check is fast when there are no packages), the callback fires while the dialog handle doesn't exist yet. With my DialogBase.Invoke fix, the Invoke is silently dropped — so the dialog never gets StopProgress or AskQuestion called on it. Result: dialog opens and spins forever with no way to dismiss it except cancel.

The fix is to reorder: create the dialog and force its handle to be created before starting the async work.

Reordered: Create the dialog and access .Handle to force handle creation before BeginInvoke. This guarantees the dialog can receive Invoke calls when the callback fires. Race window closed: Now UpdateCallback will always find a valid handle, so it can call StopProgress or AskQuestion properly — no more infinite spinner. Combined with the earlier DialogBase.Invoke guard, the dialog flow should be solid: handle exists when callback fires (normal case), and even if there's some bizarre timing edge case, the guard prevents a crash.

Model Version Released
Pathfinder PC 5.01.47.3700 4/10/2026