Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix missing SVG icons in Windows binaries#4496

Merged
ahojnnes merged 1 commit into
maincolmap/colmap:mainfrom
user/jsch/windows-qt-svg-fixcolmap/colmap:user/jsch/windows-qt-svg-fixCopy head branch name to clipboard
Jul 2, 2026
Merged

Fix missing SVG icons in Windows binaries#4496
ahojnnes merged 1 commit into
maincolmap/colmap:mainfrom
user/jsch/windows-qt-svg-fixcolmap/colmap:user/jsch/windows-qt-svg-fixCopy head branch name to clipboard

Conversation

@ahojnnes

@ahojnnes ahojnnes commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Fixes: #4490

Problem

The SVG toolbar/menu icons do not render in the distributed Windows binaries produced by CI — they show up blank.

The GUI loads all icons via QIcon(":/media/*.svg") (embedded Qt resources). For Qt to rasterize an SVG at runtime it needs two plugins deployed alongside the executable:

  • iconengines/qsvgicon.dll (icon engine used by QIcon for .svg)
  • imageformats/qsvg.dll

Inspecting the artifact from a recent main run confirmed:

  • bin/Qt6Svg.dll ✅ present
  • plugins/imageformats/ had only qgif/qico/qjpegqsvg.dll missing
  • plugins/iconengines/directory did not exist at all

Root cause

A vcpkg triplet mismatch in build-windows.yml. The export contains qtbase:x64-windows, qtbase:x64-windows-release, and qtsvg:x64-windows-release — i.e. qtsvg is installed only for x64-windows-release. But the packaging step copied plugins from x64-windows:

cp -r vcpkg_export/colmap/installed/x64-windows/Qt6/plugins install

That grabs qtbase's base plugins but silently misses both qtsvg plugins. The DLLs were already copied from x64-windows-release, which is why Qt6Svg.dll was present but orphaned.

Fix

  • Copy plugins from x64-windows-release — the triplet COLMAP is actually built against and where qtsvg lives (consistent with the DLL copy). This is a strict superset of what was copied before, plus the missing SVG plugins.
  • Add a fail-fast guard asserting both SVG plugins exist after the copy. The bug was invisible at build time (blank icons only appear at runtime), so the check prevents a silent regression.

No C++ or vcpkg.json changes were needed — qtsvg was already a gui dependency; the defect was purely in packaging.

The GUI loads all toolbar/menu icons via QIcon(":/media/*.svg"), which
requires Qt's SVG plugins (iconengines/qsvgicon.dll and
imageformats/qsvg.dll) to be deployed alongside the executable.

The Windows packaging step copied the Qt plugins from the x64-windows
triplet, but qtsvg is only installed for the x64-windows-release triplet
that COLMAP is actually built against. As a result the SVG plugins were
silently omitted while Qt6Svg.dll (copied from the release bin) was
present but unusable, leaving all icons blank in the distributed
binaries.

Copy the plugins from x64-windows-release instead, consistent with the
DLL copy, and add a guard that fails the build if the SVG plugins are
missing so this silent regression cannot reoccur.
@ahojnnes
ahojnnes enabled auto-merge (squash) July 2, 2026 13:01
@ahojnnes
ahojnnes requested review from B1ueber2y, lpanaf and sarlinpe July 2, 2026 13:03
@ahojnnes
ahojnnes merged commit ef755a9 into main Jul 2, 2026
14 checks passed
@ahojnnes
ahojnnes deleted the user/jsch/windows-qt-svg-fix branch July 2, 2026 13:18
@ahojnnes ahojnnes mentioned this pull request Jul 17, 2026
3 tasks
ahojnnes added a commit that referenced this pull request Jul 17, 2026
Prepares the **4.1.1** patch release by cherry-picking important
bug/build fixes that landed on `main` since `4.1.0`, plus one
previously-unmerged fix. Features, refactors, algorithm changes,
benchmarks, docs-site infra, and dependency upgrades from `main` are
intentionally excluded.

### Included fixes

**Bug / correctness**
- Fix feature matching slowdown from process-global omp critical in
RANSAC (#4553) — restores the ~4–6x matching perf regressed in 4.1.0
- Fix: rescale already-undistorted images when `max_image_size` is
provided (#4512)
- Load mapper database lazily instead of at GUI startup (#4501) *(see
note below)*
- Show image/point viewer metadata when images are missing on disk
(#4546)

**Build / packaging**
- Fix missing SVG icons in Windows binaries (#4496)
- Fix Caspar CUDA build with MSVC forced includes (#4481)
- Fail Caspar build early on CUDA arch < 7.0 (#4495)
- Fix glog color support version detection (#4479)

**GUI**
- Tint UI icons to palette for dark theme legibility (#4478)

**Docs**
- Document quaternion order (wxyz vs xyzw) in `read_rig_config` binding
(#4526)
- Fix stale usage example in `IncrementalMapper` doc comment (#4531)
- Add Fedora build instructions to `install.rst` (#4509)
- Fix typos in user-facing help string and FAQ (#4549)

**Previously unmerged**
- Fix misspelled pycolmap enum name `GPSTransfromEllipsoid` →
`GPSTransformEllipsoid` (#4551)

### ⚠️ Breaking change
#4551 removes `pycolmap.GPSTransfromEllipsoid` (present since ≤4.1.0)
with **no** backward-compatible alias. Downstream code must switch to
`pycolmap.GPSTransformEllipsoid`. This is unusual for a patch release
and must be highlighted in the 4.1.1 release notes.

### Notes
- #4501 required a manual conflict resolution: it was authored on top of
the GUI mapper-selection feature (#4487), which is **not** part of this
patch. The dependency on `UpdateMapperControls()` / `mapper_type_` was
removed and replaced with the 4.1.0 baseline's existing control-state
handling; the net behavior (no database read at GUI startup / project
reset) is preserved.
- All other commits cherry-picked cleanly (`-x` references retained).

### Still TODO before tagging
- [ ] Version bump to 4.1.1
- [ ] CHANGELOG entry (incl. the breaking-change callout)
- [ ] Full build + test run across platforms (CI)

---------

Co-authored-by: WhuAegeanSea <whuaegeansea@gmail.com>
Co-authored-by: Shaohui Liu <b1ueber2y@gmail.com>
Co-authored-by: Behnam Asadi <behnam.asadi@gmail.com>
Co-authored-by: Mohammad Ali <m.aliadnanrauf@gmail.com>
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.

No Icon Displayed on Windows

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.