Skip to content

v0.3.2 — upgrade deadlock fix (desktop exe now really refreshes)

Choose a tag to compare

@UnknowCao UnknowCao released this 04 Sep 03:16
· 15 commits to main since this release

Fixes: the desktop whale exe never actually upgraded — so fixes you installed never reached the file you double-click.

Why this happened

v0.3.1 shipped the cold-card stutter fix, but upgraders kept seeing the stutter. Diagnosis: the desktop DSH Harness.exe was still the old binary. The canonical upgrade flow deadlocks itself:

  1. menu Full Exit → double-click the whale — the OLD desktop exe starts running (cold card),
  2. the server boots, the new plugin activates and tries to refresh the desktop exe,
  3. Windows locks the image of a running process against writes → EBUSY, swallowed by the auto-install catch.

So through the normal flow the desktop copy never upgraded — only the copy under ~\.dsh\launcher\ did.

The fix

copyReplacingLocked(): when the destination is locked, rename the running image aside (DSH Harness.exe.old — renaming a running image IS allowed on Windows; the classic updater trick used by VS Code/Chrome installers) and write the new binary at the original path. Swap-aside copies are cleaned up on later installs once their process has exited.

Verified live with a running image lock: direct copy → EBUSY (bug reproduced), rename running exe → OK, new binary lands at the original path.

Note for one-time transitions up from older versions: the very first whale launch after upgrading may still run the previous binary (it was already in memory); from the next double-click on, you are on the new one.

Upgrade

dsh plugin --profile web add github:UnknowCao/dsh-dock#v0.3.2

Restart dsh web once. Sessions persist as always.

Full changelog: compare v0.3.1...v0.3.2.