Fix dbtool-gui Windows launch failure from malformed Qt manifest - #525
Open
Yaraslaut wants to merge 1 commit into
Open
Fix dbtool-gui Windows launch failure from malformed Qt manifest#525Yaraslaut wants to merge 1 commit into
Yaraslaut wants to merge 1 commit into
Conversation
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>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
dbtool-gui.exefails to start on Windows with "the application has failed to start because its side-by-side configuration is incorrect."qt_add_executable) declares thetrustInfo/requestedPrivilegesblock with nestedasm.v2/asm.v3namespaces. After the linker merges manifests, therequestedExecutionLevelelement ends up with a namespace-prefixedms_asmv2:levelattribute instead of a plainlevel. The Windows activation-context loader rejects this — the event log reports "The required attributelevelis missing from elementrequestedExecutionLevel" — 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.src/tools/dbtool-gui/dbtool-gui.manifestwith a clean, flat structure and a plainlevel="asInvoker"attribute, and attach it to the target underif(WIN32)viatarget_sources. Qt's_qt_internal_finalize_windows_appexplicitly skips its own manifest generation when the target already carries a*.manifestsource (seeQtPublicWindowsHelpers.cmake), so this is the supported override hook and is immune to the upstream bug. No-op on macOS/Linux.Testing
dbtool-guiwith theclangcl-releasepreset; extracted the embedded manifest withmt.exeand confirmed it now contains<requestedExecutionLevel level="asInvoker" uiAccess="false"/>— noms_asmv2:prefix.cmake --install; verified the installedout\install\clangcl-release\bin\dbtool-gui.execarries the corrected manifest.Manual test checklist
dbtool-gui.exelaunches from a freshclangcl-releaseinstall on a clean Windows machine.dbtool-gui-tests/dbtool-gui-qmltesttargets, 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