Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tiny_skia backend panics if you have an Combobox menu with zero search results #2311

Closed
2 tasks done
blazra opened this issue Mar 6, 2024 · 0 comments · Fixed by #2364
Closed
2 tasks done

tiny_skia backend panics if you have an Combobox menu with zero search results #2311

blazra opened this issue Mar 6, 2024 · 0 comments · Fixed by #2364
Labels
bug Something isn't working

Comments

@blazra
Copy link
Contributor

blazra commented Mar 6, 2024

Is there an existing issue for this?

  • I have searched the existing issues.

Is this issue related to iced?

  • My hardware is compatible and my graphics drivers are up-to-date.

What happened?

  • Run the Combobox example with tiny-skia backend
ICED_BACKEND=tiny-skia cargo r
  • Write "ee" into the combobox text field
  • The application panics with:
thread 'main' panicked at tiny_skia/src/backend.rs:162:17:
Quad with non-normal height!

What is the expected behavior?

The application should not panic even if there are no results in the combobox menu.

Version

master

Operating System

Linux

Do you have any log output?

> RUST_BACKTRACE=1 ICED_BACKEND=tiny-skia cargo r
    Finished dev [unoptimized + debuginfo] target(s) in 0.11s
     Running `/local/home/blazekra/data/git/iced/target/debug/combo_box`
thread 'main' panicked at tiny_skia/src/backend.rs:162:17:
Quad with non-normal height!
stack backtrace:
   0: rust_begin_unwind
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:645:5
   1: core::panicking::panic_fmt
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:72:14
   2: iced_tiny_skia::backend::Backend::draw_primitive
             at /local/home/blazekra/data/git/iced/tiny_skia/src/backend.rs:162:17
   3: iced_tiny_skia::backend::Backend::draw_primitive
             at /local/home/blazekra/data/git/iced/tiny_skia/src/backend.rs:700:21
   4: iced_tiny_skia::backend::Backend::draw_primitive
             at /local/home/blazekra/data/git/iced/tiny_skia/src/backend.rs:748:21
   5: iced_tiny_skia::backend::Backend::draw
             at /local/home/blazekra/data/git/iced/tiny_skia/src/backend.rs:103:17
   6: iced_tiny_skia::window::compositor::present
             at /local/home/blazekra/data/git/iced/tiny_skia/src/window/compositor.rs:202:5
   7: <iced_renderer::compositor::Compositor as iced_graphics::compositor::Compositor>::present::{{closure}}
             at /local/home/blazekra/data/git/iced/renderer/src/compositor.rs:118:17
   8: iced_graphics::renderer::Renderer<B>::with_primitives
             at /local/home/blazekra/data/git/iced/graphics/src/renderer.rs:56:9
   9: <iced_renderer::compositor::Compositor as iced_graphics::compositor::Compositor>::present
             at /local/home/blazekra/data/git/iced/renderer/src/compositor.rs:117:18
  10: iced_winit::application::run_instance::{{closure}}
             at /local/home/blazekra/data/git/iced/winit/src/application.rs:458:23
  11: iced_winit::application::run::{{closure}}
             at /local/home/blazekra/data/git/iced/winit/src/application.rs:228:24
  12: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ops/function.rs:294:13
  13: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ops/function.rs:294:13
  14: winit::platform_impl::platform::wayland::event_loop::EventLoop<T>::single_iteration
             at /local/home/blazekra/.cargo/git/checkouts/winit-57d3141eaf559308/b91e39e/src/platform_impl/linux/wayland/event_loop/mod.rs:504:17
  15: winit::platform_impl::platform::wayland::event_loop::EventLoop<T>::poll_events_with_timeout
             at /local/home/blazekra/.cargo/git/checkouts/winit-57d3141eaf559308/b91e39e/src/platform_impl/linux/wayland/event_loop/mod.rs:323:9
  16: winit::platform_impl::platform::wayland::event_loop::EventLoop<T>::pump_events
             at /local/home/blazekra/.cargo/git/checkouts/winit-57d3141eaf559308/b91e39e/src/platform_impl/linux/wayland/event_loop/mod.rs:237:13
  17: winit::platform_impl::platform::wayland::event_loop::EventLoop<T>::run_on_demand
             at /local/home/blazekra/.cargo/git/checkouts/winit-57d3141eaf559308/b91e39e/src/platform_impl/linux/wayland/event_loop/mod.rs:201:19
  18: winit::platform_impl::platform::EventLoop<T>::run_on_demand
             at /local/home/blazekra/.cargo/git/checkouts/winit-57d3141eaf559308/b91e39e/src/platform_impl/linux/mod.rs:821:56
  19: winit::platform_impl::platform::EventLoop<T>::run
             at /local/home/blazekra/.cargo/git/checkouts/winit-57d3141eaf559308/b91e39e/src/platform_impl/linux/mod.rs:814:9
  20: winit::event_loop::EventLoop<T>::run
             at /local/home/blazekra/.cargo/git/checkouts/winit-57d3141eaf559308/b91e39e/src/event_loop.rs:249:9
  21: iced_winit::application::run
             at /local/home/blazekra/data/git/iced/winit/src/application.rs:243:13
  22: iced::application::Application::run
             at /local/home/blazekra/data/git/iced/src/application.rs:208:12
  23: iced::sandbox::Sandbox::run
             at /local/home/blazekra/data/git/iced/src/sandbox.rs:153:9
  24: combo_box::main
             at ./src/main.rs:7:5
  25: core::ops::function::FnOnce::call_once
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
@blazra blazra added the bug Something isn't working label Mar 6, 2024
blazra added a commit to blazra/iced that referenced this issue Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant