Skip to content

Conversation

rafialhamd
Copy link

Updated with correct image path to FIX Panic Error:

thread 'main' panicked at examples\clipboard\main.rs:111:58:
called Result::unwrap() on an Err value: Error { domain: g-io-error-quark, code: 1, message: "Error opening file C:\github.com\gtk-rs\gtk4-rs\examples\examples\clipboard\asset.png: No such file or directory" }

@bilelmoussaoui
Copy link
Member

The path would always be wrong based on from where you run the demo...

@sdroege
Copy link
Member

sdroege commented Sep 3, 2025

Maybe the file can just be include_bytes! and then we use a memory input stream here?

@rafialhamd
Copy link
Author

Maybe the file can just be include_bytes! and then we use a memory input stream here?

I believe that should be solution, and NOT my PR.

The path would always be wrong based on from where you run the demo...

Just found that my PR code works in examples BUT NOT from the parent directory.
So, the PR fixes one issue and causes another.

This needs a separate issue/fix.

@rafialhamd rafialhamd closed this Sep 8, 2025
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.

3 participants