egui icon indicating copy to clipboard operation
egui copied to clipboard

fix: Assertion in egui_extras::FileLoader::load

Open bircni opened this issue 7 months ago • 1 comments

This pull request modifies the BytesLoader implementation for FileLoader in crates/egui_extras/src/loaders/file_loader.rs to improve thread safety and handle unexpected states more gracefully.

Changes to thread safety and state handling:

  • Updated the cache logic to check if the uri exists in the cache before inserting the result. If the uri is not found, a log message is added to indicate the loading was canceled. This change prevents overwriting cache entries unexpectedly.

  • Closes https://github.com/emilk/egui/issues/6755

  • [x] I have followed the instructions in the PR template

bircni avatar May 03 '25 19:05 bircni

Preview available at https://egui-pr-preview.github.io/pr/6995-patch6755 Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

github-actions[bot] avatar May 03 '25 19:05 github-actions[bot]

@emilk done Sorry completely forgot about this

bircni avatar Jun 26 '25 22:06 bircni

@emilk there seems to be no Occupied Poll only has Ready and Pending

bircni avatar Jun 26 '25 22:06 bircni

okay late night coding is bad haha oops

bircni avatar Jun 26 '25 22:06 bircni

Thanks!

emilk avatar Jun 27 '25 09:06 emilk