Skip to content

Pin WinDbg/TTD version instead of always downloading latest (Fix #1130) - #1140

Open
xusheng6 wants to merge 3 commits into
devfrom
fix_1130_pin_windbg
Open

Pin WinDbg/TTD version instead of always downloading latest (Fix #1130)#1140
xusheng6 wants to merge 3 commits into
devfrom
fix_1130_pin_windbg

Conversation

@xusheng6

@xusheng6 xusheng6 commented Jul 23, 2026

Copy link
Copy Markdown
Member

The latest WinDbg release (1.2606.22001.0) crashes the DbgEng TTD adapter on stop (#1129). Rather than always pulling the newest build, the installer now pins a known-good version.

Changes

  • Pin 1.2603.20001.0 (second-latest, verified working) and download its MSIX bundle directly by URL, skipping the appinstaller manifest.
  • Fallback: if the pinned download fails at any step (e.g. Microsoft removes it from the CDN), fall back to the old flow — download the appinstaller manifest and install the latest version — so installation still succeeds.
  • Refactored the shared download → verify → extract → install logic into a helper reused by both paths.

To adopt a newer WinDbg once validated, bump the single kPinnedVersion constant.

The change might look large than expected because it removes the functionality to update the WinDbg to the latest version, but refactors to keep the way to fallback to install the latest if the pinned version does not work (e.g., then MS changes the URL and we are unaware of it)

TODO: we might with to expose the version of windbg to download as a configurable setting that defaults to 1.2603.20001.0 and the user can override it if they know what they are doing

…latest (Fix #1130)

The latest WinDbg release (1.2606.22001.0) crashes the DbgEng TTD adapter on
stop (#1129). The installer now downloads a pinned version (1.2603.20001.0)
directly by URL, and falls back to the latest version via the appinstaller
manifest if the pinned download fails.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@xusheng6
xusheng6 requested a review from plafosse July 24, 2026 17:06
@xusheng6 xusheng6 added this to the Krypton milestone Aug 11, 2026
@xusheng6 xusheng6 self-assigned this Aug 11, 2026
xusheng6 and others added 2 commits August 11, 2026 16:08
Since we install a pinned WinDbg version rather than the latest release, there is
nothing to check online. The latest-version query was reduced to returning a
compile-time constant, but it still went through a background thread, an FFI call
and a subprocess that spawned the installer CLI to parse its JSON output.

Worse, the check itself became wrong: IsVersionUpToDate() compared with >=, so a
user who already had the broken 1.2606.22001.0 installed - exactly the population
hit by #1129/#1130 - was told they were up to date and never offered the fix.

Remove GetLatestVersion(), IsVersionUpToDate() and CompareVersions() from the
installer library, the check-update CLI command and its exit code 2, the
core/FFI/API GetLatestVersion() plumbing along with the now-unused subprocess and
JSON helpers, and the dialog's async version fetch.

The pinned version moves to windbg_version.h so the UI can display it directly.
The dialog now compares the installed version against that constant and offers
Reinstall when they match and Install when they do not - not Update, since
replacing a newer WinDbg with the validated one is a downgrade.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Weitao-Sun

Copy link
Copy Markdown

Tested on Windows with both Binary Ninja Commercial and Ultimate (binaryninja_win64_5.4.10384-test_*).

Verified that the installer downloads the pinned WinDbg version (1.2603.20001.0) and falls back to the latest available version when the pinned version is unavailable.

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