Skip to content

fix(studio): a card or thumbnail not drawn yet no longer prints "Error loading image" - #485

Merged
jub0t merged 1 commit into
jub0t:mainfrom
igorgbr:fix/quiet-missing-cache-images
Oct 21, 2026
Merged

jub0t merged 1 commit into
jub0t:mainfrom
igorgbr:fix/quiet-missing-cache-images

Conversation

@igorgbr

@igorgbr igorgbr commented Oct 21, 2026

Copy link
Copy Markdown

What does this PR do?

On a fresh launch the terminal fills with lines like

Error loading image from ~/.local/share/app.concat.editor/cards/concat.vignette-….jpg: No such file or directory (os error 2)

one for every effect card, and importing media into a new project prints the same for its cache/art/….thumb.jpg. The message comes from slint::Image::load_from_path, which prints every load that fails. Nothing is actually wrong: the card is still being drawn on the concat cards thread and the shelf falls back to the bundled card, and the thumbnail is generated right after. It is only noise, but it buries real warnings in the log.

  • host::image_at now returns None when the path is not a file, before asking Slint (the same check as Card::is_drawn).
  • package_art loads the package's preview.png and the drawn card through image_at instead of calling Slint directly.

A file that exists but fails to decode is still reported by Slint.

How to test

  1. rm -rf ~/.local/share/app.concat.editor/cards
  2. cargo dev — no Error loading image lines on launch, and the effect shelves still show their pictures.
  3. Create a new project and import a video — no .thumb.jpg error.

Tested on NixOS 26.05 (KDE, Wayland), GTX 1050 Ti on Vulkan.

Checklist

  • cargo fmt --check passes
  • cargo clippy -p concat --no-deps -- -D warnings passes
  • cargo test passes — the concat test binary could not be built here (15 GB RAM; rustc is killed past 10 GB, see nix build failure #225). Left to CI; the change touches no tested code path.
  • python3 scripts/locales.py run (if UI text changed) — n/a
  • New source files have a licence header — n/a

Note on clippy: inside the flake's nix develop the toolchain is nixpkgs' Rust 1.97, not the pinned 1.93.1, and the workspace-wide run fails on clippy::manual_option_zip in concat-media/src/decode.rs, which this PR does not touch.

Investigated and written with help from Claude; tested by me on the setup above.

…r loading image"

image_at and package_art handed every cached path to
slint::Image::load_from_path, which prints an error for each file
that is missing. On a first launch that is every effect card, and
after an import it is the new media's thumbnail, so the terminal
filled with 'Error loading image from ... No such file or directory'
while the fallbacks (bundled card, regenerated thumb) worked fine.

image_at now returns None for a path that is not a file, and
package_art loads through it. A file that exists but will not decode
is still reported by Slint.

Signed-off-by: igorgbr <igorgphotoarte@gmail.com>
@igorgbr
igorgbr force-pushed the fix/quiet-missing-cache-images branch from 543e24d to 29bd5fa Compare October 21, 2026 11:29
@igorgbr igorgbr changed the title concat: don't ask Slint for cached pictures not drawn yet fix(studio): a card or thumbnail not drawn yet no longer prints "Error loading image" Oct 21, 2026
@jub0t
jub0t merged commit 2756209 into jub0t:main Oct 21, 2026
1 of 9 checks passed
@igorgbr
igorgbr deleted the fix/quiet-missing-cache-images branch October 21, 2026 13:09
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.

2 participants