Repository navigation
fix(studio): a card or thumbnail not drawn yet no longer prints "Error loading image" - #485
Merged
Merged
Conversation
…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
force-pushed
the
fix/quiet-missing-cache-images
branch
from
October 21, 2026 11:29
543e24d to
29bd5fa
Compare
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.
What does this PR do?
On a fresh launch the terminal fills with lines like
one for every effect card, and importing media into a new project prints the same for its
cache/art/….thumb.jpg. The message comes fromslint::Image::load_from_path, which prints every load that fails. Nothing is actually wrong: the card is still being drawn on theconcat cardsthread 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_atnow returnsNonewhen the path is not a file, before asking Slint (the same check asCard::is_drawn).package_artloads the package'spreview.pngand the drawn card throughimage_atinstead of calling Slint directly.A file that exists but fails to decode is still reported by Slint.
How to test
rm -rf ~/.local/share/app.concat.editor/cardscargo dev— noError loading imagelines on launch, and the effect shelves still show their pictures..thumb.jpgerror.Tested on NixOS 26.05 (KDE, Wayland), GTX 1050 Ti on Vulkan.
Checklist
cargo fmt --checkpassescargo clippy -p concat --no-deps -- -D warningspassescargo testpasses — theconcattest 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.pyrun (if UI text changed) — n/aNote on clippy: inside the flake's
nix developthe toolchain is nixpkgs' Rust 1.97, not the pinned 1.93.1, and the workspace-wide run fails onclippy::manual_option_zipinconcat-media/src/decode.rs, which this PR does not touch.Investigated and written with help from Claude; tested by me on the setup above.