Skip to content

Fix dbtool-gui Windows launch failure from malformed Qt manifest - #525

Open
Yaraslaut wants to merge 1 commit into
masterfrom
fix/dbtool-gui-windows-manifest
Open

Fix dbtool-gui Windows launch failure from malformed Qt manifest#525
Yaraslaut wants to merge 1 commit into
masterfrom
fix/dbtool-gui-windows-manifest

Conversation

@Yaraslaut

Copy link
Copy Markdown
Member

Summary

  • dbtool-gui.exe fails to start on Windows with "the application has failed to start because its side-by-side configuration is incorrect."
  • Root cause (not a missing DLL): Qt 6.11.x's auto-generated application manifest (from qt_add_executable) declares the trustInfo/requestedPrivileges block with nested asm.v2/asm.v3 namespaces. After the linker merges manifests, the requestedExecutionLevel element ends up with a namespace-prefixed ms_asmv2:level attribute instead of a plain level. The Windows activation-context loader rejects this — the event log reports "The required attribute level is missing from element requestedExecutionLevel" — and the process cannot start. All runtime DLLs are present and correct; only the manifest is malformed. This is an upstream Qt regression, not project code.
  • Fix: Add a hand-authored src/tools/dbtool-gui/dbtool-gui.manifest with a clean, flat structure and a plain level="asInvoker" attribute, and attach it to the target under if(WIN32) via target_sources. Qt's _qt_internal_finalize_windows_app explicitly skips its own manifest generation when the target already carries a *.manifest source (see QtPublicWindowsHelpers.cmake), so this is the supported override hook and is immune to the upstream bug. No-op on macOS/Linux.

Testing

  • Rebuilt dbtool-gui with the clangcl-release preset; extracted the embedded manifest with mt.exe and confirmed it now contains <requestedExecutionLevel level="asInvoker" uiAccess="false"/> — no ms_asmv2: prefix.
  • Re-ran cmake --install; verified the installed out\install\clangcl-release\bin\dbtool-gui.exe carries the corrected manifest.
  • Launched the installed binary: it now starts and runs cleanly, and no new SideBySide error is logged in the Windows Application event log. Before the fix it failed instantly.

Manual test checklist

  • Confirm dbtool-gui.exe launches from a fresh clangcl-release install on a clean Windows machine.
  • (Optional, follow-up) The Qt manifest warning still fires for the dbtool-gui-tests / dbtool-gui-qmltest targets, which retain Qt's default manifest. If those also fail to launch, the same manifest can be applied to them — out of scope for this fix.

🤖 Generated with Claude Code

Qt 6.11.x's auto-generated application manifest emits the
requestedExecutionLevel element under a prefixed asm.v2 namespace. After
linker manifest merging the level attribute ends up namespace-qualified
(ms_asmv2:level), which the Windows activation-context loader rejects:

  "The required attribute level is missing from element
   requestedExecutionLevel."

The visible symptom is that dbtool-gui.exe refuses to start with "the
application has failed to start because its side-by-side configuration is
incorrect" -- the DLLs are all present; only the manifest is malformed.

Supply our own valid manifest (plain, unprefixed level attribute) and
attach it to the target on Windows. Qt's _qt_internal_finalize_windows_app
skips its manifest generation when the target already carries a *.manifest
source, so this cleanly overrides the broken default and is immune to the
upstream regression. No-op on macOS/Linux.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Yaraslaut
Yaraslaut requested a review from a team as a code owner July 17, 2026 08:10
@Yaraslaut Yaraslaut self-assigned this Jul 17, 2026
@github-actions github-actions Bot added the CLI command line interface tools label Jul 17, 2026
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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

Labels

CLI command line interface tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant