cosmic-files icon indicating copy to clipboard operation
cosmic-files copied to clipboard

[BUG] Crash when loading details pane for selected high-resolution image

Open iamkartiknayak opened this issue 1 year ago • 2 comments

Cosmic-files version:

cosmic-files:
  Installed: 0.1.0~1727141419~22.04~e5674da

Issue/Bug description: When selecting a high-resolution image in Cosmic Files and opening the details pane, the application crashes. This issue seems to occur consistently with images of higher resolution, and the app becomes unresponsive after attempting to load the file details.

Steps to reproduce:

https://github.com/user-attachments/assets/7435592c-a8ac-418e-8927-53dae6f702e6

Expected behavior: The details pane should load the image information without causing a crash

Other notes: Image details: clipboard_image.jpg: JPEG image data, JFIF standard 1.02, aspect ratio, density 1x1, segment length 16, baseline, precision 8, 10000x4526, components 3

Image src: https://www.wallpaperflare.com/silhouette-of-person-standing-in-front-of-tree-wallpaper-game-animation-illustration-wallpaper-hib/download

iamkartiknayak avatar Sep 25 '24 13:09 iamkartiknayak

Looks that I created duplicated issue - https://github.com/pop-os/cosmic-files/issues/509 Can you check backtrace in system journal?

qarmin avatar Sep 28 '24 06:09 qarmin

Looks that I created duplicated issue - #509 Can you check backtrace in system journal?

It looks like the same issue

[2024-09-28T07:25:46Z ERROR wgpu::backend::wgpu_core] Handling wgpu errors as fatal by default
thread 'main' panicked at /home/kartik/.cargo/git/checkouts/wgpu-53e70f8674b08dd4/20fda69/wgpu/src/backend/wgpu_core.rs:2990:5:
wgpu error: Validation Error

Caused by:
    In Device::create_buffer
      note: label = `image upload buffer`
    Not enough memory left.


stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: wgpu::backend::wgpu_core::default_error_handler
   3: core::ops::function::Fn::call
   4: <wgpu::backend::wgpu_core::ContextWgpuCore as wgpu::context::Context>::device_create_buffer
   5: <T as wgpu::context::DynContext>::device_create_buffer
   6: <wgpu::Device as wgpu::util::device::DeviceExt>::create_buffer_init
   7: iced_wgpu::image::atlas::Atlas::upload_allocation
   8: iced_wgpu::image::atlas::Atlas::upload
   9: iced_wgpu::image::raster::Cache::upload
  10: iced_wgpu::image::Pipeline::prepare
  11: iced_wgpu::backend::Backend::prepare
  12: iced_wgpu::backend::Backend::present
  13: iced_wgpu::window::compositor::present
  14: <iced_renderer::compositor::Compositor as iced_graphics::compositor::Compositor>::present
  15: iced_winit::multi_window::run_instance::{{closure}}
  16: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut
  17: winit::platform_impl::platform::wayland::event_loop::EventLoop<T>::poll_events_with_timeout
  18: winit::platform_impl::platform::EventLoop<T>::run_on_demand
  19: iced_winit::multi_window::run
  20: cosmic_files::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

iamkartiknayak avatar Sep 28 '24 07:09 iamkartiknayak

This appears to be fixed using the source image.

WatchMkr avatar Mar 06 '25 00:03 WatchMkr

I tested it again using the image source & the issue doesn't seem to be fixed.

https://github.com/user-attachments/assets/92929918-ab17-4fc0-9222-d3be6b69095a

iamkartiknayak avatar Mar 06 '25 04:03 iamkartiknayak