Skip to content

[Bug]: popupmedia decoding_keeps_the_caps fails on macOS and Windows (decoders depend on build features) #1697

Closed

Description

@deniial00

Before you start

  • I searched the existing issues and did not find a duplicate.
  • This is a bug report, not a usage question (questions belong in Discussions).

What happened?

popupmedia::tests::decoding_keeps_the_caps (added by #1465) fails on main's own CI on macOS and Windows, and on every pull request that merges main. Linux passes.

Runner Failing assertion Result
ubuntu-latest none passes
macos-latest popupmedia.rs:557 (TIFF) left Err(NotPicture), right Err(Unsupported("TIFF"))
windows-latest, windows-11-arm popupmedia.rs:554 (BMP) left Err(NotPicture), right Err(Unsupported("BMP"))

Cause: popupmedia::decode says "format not supported" only when the image crate has no decoder for the guessed format. Which decoders exist depends on Cargo feature unification across the workspace, and arboard (the clipboard under egui-winit/eframe, enabled by apps/rustgis) adds one per platform in its own manifest:

  • Windows: [target."cfg(windows)".dependencies.image] with features png, bmp (arboard 3.6.1). cargo tree --workspace --target x86_64-pc-windows-msvc -e features -i image shows image feature "bmp" from arboard via egui-winit (arboard feature) via eframe (clipboard) via rustgis.
  • macOS: [target.'cfg(target_os = "macos")'.dependencies.image] with feature tiff.

With the decoder present, the test's fake BM…/II*\0… bytes reach the real decoder, which fails and is reported as NotPicture. A real BMP on Windows or TIFF on macOS would also get a different message than on Linux ("not a picture" vs "BMP pictures aren't supported"), and would be shown or not by accident of the build. Locally on macOS the test passes with cargo test -p rustgis-ui-egui --lib decoding_keeps_the_caps and fails with cargo test -p rustgis-ui-egui -p rustgis --lib decoding_keeps_the_caps (and in cargo xtask ci).

Steps to reproduce

  1. On macOS (or Windows), from a clean checkout of main.
  2. Run cargo test -p rustgis-ui-egui -p rustgis --lib decoding_keeps_the_caps.
  3. See the assertion left: Err(NotPicture), right: Err(Unsupported("TIFF")) (BMP on Windows).

Expected behavior

The pop-up decides which picture formats it shows from its own list (PNG, JPEG, WebP, GIF), so any other format says "Picture unavailable: pictures aren't supported" on every platform, and the test passes with any feature set.

Planned fix: decode checks the guessed format against that list before decoding; the test is kept, and the docs name the formats shown.

How are you running RustGIS?

Desktop app (built from source)

Version

f62c795

Operating system, browser and graphics

macOS (Apple Silicon), Windows x64 and ARM64 (CI runners)

Sample data

None needed.

Screenshots or logs

CI runs linked above.

Activity

  1. self-assigned this
    on Nov 9, 2026
  2. deniial00 commented on Nov 9, 2026

    @deniial00
    MemberAuthor

    I'm working on this. Plan: popupmedia::decode checks the guessed format against an explicit list (PNG, JPEG, WebP, GIF) before decoding, so BMP, TIFF and any other format give "Picture unavailable: pictures aren't supported" on every platform, whatever decoders the build has. The existing test stays; docs name the formats shown.

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions