iced-rs / iced

A cross-platform GUI library for Rust, inspired by Elm
https://iced.rs
MIT License
22.96k stars 1.06k forks source link

Crash when resizing window with scrollable #2398

Open lufte opened 3 weeks ago

lufte commented 3 weeks ago

Is there an existing issue for this?

Is this issue related to iced?

What happened?

The scrollable iced example crashes when resizing its window. You need to run it, scroll almost to the bottom, and start resizing the window over and over, the slower the better. After a few (~20) tries it fails to draw the window (you get the effect where the border is drawn multiple times in a "cascading" way) and it crashes as soon as you let go of the mouse button.

This happens on Linux. Iced prints the following warning upon running: MESA-INTEL: warning: Ivy Bridge Vulkan support is incomplete. Not sure if it's related.

What is the expected behavior?

No crashing :)

Version

master

Operating System

Linux

Do you have any log output?

thread 'main' panicked at /home/lufte/.cargo/git/checkouts/winit-57d3141eaf559308/592bd15/src/platform_impl/linux/x11/event_processor.rs:1319:18:                                                                    
Failed to focus input context: XError { description: "BadPixmap (invalid Pixmap parameter)", error_code: 4, request_code: 148, minor_code: 1 }                                                                       
stack backtrace:                                                                                                                                                                                                     
   0:     0x559e507e2036 - std::backtrace_rs::backtrace::libunwind::trace::h6e4a662bea54ccfc                                                                                                                         
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5                                                                   
   1:     0x559e507e2036 - std::backtrace_rs::backtrace::trace_unsynchronized::hb42b4eb2797d9c0e                                                                                                                     
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5                                                                          
   2:     0x559e507e2036 - std::sys_common::backtrace::_print_fmt::h2bc261f3223f4e4d                                                                                                                                 
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/sys_common/backtrace.rs:68:5                                                                                       
   3:     0x559e507e2036 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h9cca0343d66d16a8                                                                                      
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/sys_common/backtrace.rs:44:22                                                                                      
   4:     0x559e5080e730 - core::fmt::rt::Argument::fmt::h8b666c45176be671                                                                                                                                           
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/core/src/fmt/rt.rs:142:9
   5:     0x559e5080e730 - core::fmt::write::h4311bce0ee536615                                                                                                                                                       
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/core/src/fmt/mod.rs:1120:17                                                                                                
   6:     0x559e507de85f - std::io::Write::write_fmt::h0685c51539d0a0cd                                                                                                                                              
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/io/mod.rs:1846:15                                                                                                  
   7:     0x559e507e1e14 - std::sys_common::backtrace::_print::h25f19b1d64e81f86                                                                                                                                     
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/sys_common/backtrace.rs:47:5                                                                                       
   8:     0x559e507e1e14 - std::sys_common::backtrace::print::h2fb8f70628a241ed                                                                                                                                      
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/sys_common/backtrace.rs:34:9                                                                                       
   9:     0x559e507e34e7 - std::panicking::default_hook::{{closure}}::h05093fe2e3ef454d                                                                                                                              
  10:     0x559e507e3249 - std::panicking::default_hook::h5ac38aa38e0086d2                                                                                                                                           
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/panicking.rs:292:9                                                                                                 
  11:     0x559e507e3978 - std::panicking::rust_panic_with_hook::hed79743dc8b4b969                                                                                                                                   
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/panicking.rs:781:13                                                                                                
  12:     0x559e507e3852 - std::panicking::begin_panic_handler::{{closure}}::ha437b5d58f431abf                                                                                                                       
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/panicking.rs:659:13                                                                                                
  13:     0x559e507e2536 - std::sys_common::backtrace::__rust_end_short_backtrace::hd98e82d5b39ec859                                                                                                                 
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/sys_common/backtrace.rs:171:18                                                                                     
  14:     0x559e507e35a4 - rust_begin_unwind                                                                                                                                                                         
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/panicking.rs:647:5                                                                                                 
  15:     0x559e4f1e9e95 - core::panicking::panic_fmt::hc69c4d258fe11477                                                                                                                                             
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/core/src/panicking.rs:72:14                                                                                                
  16:     0x559e4f1ea4d3 - core::result::unwrap_failed::hff299ec748d62aab                                                                                                                                            
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/core/src/result.rs:1649:5                                                                                                  
  17:     0x559e4f264a72 - core::result::Result<T,E>::expect::h07016921a98297a6                                                                                                                                      
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/core/src/result.rs:1030:23                                                                                                 
  18:     0x559e4f358137 - winit::platform_impl::platform::x11::event_processor::EventProcessor<T>::xinput2_focused::hb023b1baef46b3db                                                                               
                               at /home/lufte/.cargo/git/checkouts/winit-57d3141eaf559308/592bd15/src/platform_impl/linux/x11/event_processor.rs:1317:13                                                             
  19:     0x559e4f356c9f - winit::platform_impl::platform::x11::event_processor::EventProcessor<T>::process_xevent::hab8fac61d38a95e6                                                                                
                               at /home/lufte/.cargo/git/checkouts/winit-57d3141eaf559308/592bd15/src/platform_impl/linux/x11/event_processor.rs:239:25                                                              
  20:     0x559e4f351cb3 - winit::platform_impl::platform::x11::event_processor::EventProcessor<T>::process_event::hcd5d45c30d34c2a7                                                                                 
                               at /home/lufte/.cargo/git/checkouts/winit-57d3141eaf559308/592bd15/src/platform_impl/linux/x11/event_processor.rs:80:9                                                                
  21:     0x559e4f1eb98b - winit::platform_impl::platform::x11::EventLoop<T>::drain_events::ha1494fb658569ef6                                                                                                        
                               at /home/lufte/.cargo/git/checkouts/winit-57d3141eaf559308/592bd15/src/platform_impl/linux/x11/mod.rs:626:13                                                                          
  22:     0x559e4f1ecbeb - winit::platform_impl::platform::x11::EventLoop<T>::single_iteration::hb630e804827f5ef2                                                                                                    
                               at /home/lufte/.cargo/git/checkouts/winit-57d3141eaf559308/592bd15/src/platform_impl/linux/x11/mod.rs:557:9                                                                           
  23:     0x559e4f1edba5 - winit::platform_impl::platform::x11::EventLoop<T>::poll_events_with_timeout::h096a9e89a1d4300c                                                                                            
                               at /home/lufte/.cargo/git/checkouts/winit-57d3141eaf559308/592bd15/src/platform_impl/linux/x11/mod.rs:541:9                                                                           
  24:     0x559e4f1eb5cf - winit::platform_impl::platform::x11::EventLoop<T>::pump_events::h94be47b85773d360                                                                                                         
                               at /home/lufte/.cargo/git/checkouts/winit-57d3141eaf559308/592bd15/src/platform_impl/linux/x11/mod.rs:447:13                                                                          
  25:     0x559e4f1ebec5 - winit::platform_impl::platform::x11::EventLoop<T>::run_on_demand::h9090175a622a6dfa                                                                                                       
                               at /home/lufte/.cargo/git/checkouts/winit-57d3141eaf559308/592bd15/src/platform_impl/linux/x11/mod.rs:408:19                                                                          
  26:     0x559e4f1fbfce - winit::platform_impl::platform::EventLoop<T>::run_on_demand::hebec03a02d98a954                                                                                                            
                               at /home/lufte/.cargo/git/checkouts/winit-57d3141eaf559308/592bd15/src/platform_impl/linux/mod.rs:829:56                                                                              
  27:     0x559e4f1fc8d6 - winit::platform_impl::platform::EventLoop<T>::run::h8efea93dca01da0c                                                                                                                      
                               at /home/lufte/.cargo/git/checkouts/winit-57d3141eaf559308/592bd15/src/platform_impl/linux/mod.rs:822:9                                                                               
  28:     0x559e4f2e95f7 - winit::event_loop::EventLoop<T>::run::hcd179614278d97ed                                                                                                                                   
                               at /home/lufte/.cargo/git/checkouts/winit-57d3141eaf559308/592bd15/src/event_loop.rs:249:9                                                                                            
  29:     0x559e4f32c528 - iced_winit::application::run::{{closure}}::h23b3414d3623e90e                                                                                                                              
                               at /home/lufte/Downloads/iced/winit/src/application.rs:274:13                                                                                                                         
  30:     0x559e4f2a08a8 - futures_executor::local_pool::block_on::{{closure}}::h5761401ec1fcc497
                               at /home/lufte/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-executor-0.3.28/src/local_pool.rs:317:23
  31:     0x559e4f2a06fe - futures_executor::local_pool::run_executor::{{closure}}::hc8c6b22e3bd9ef50
                               at /home/lufte/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-executor-0.3.28/src/local_pool.rs:90:37
  32:     0x559e4f28605d - std::thread::local::LocalKey<T>::try_with::h1a413fe75ef03bae
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/thread/local.rs:286:16
  33:     0x559e4f285db1 - std::thread::local::LocalKey<T>::with::hd740e707be60ba4c
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/thread/local.rs:262:9
  34:     0x559e4f2a0644 - futures_executor::local_pool::run_executor::hfccbab46169a05ac
                               at /home/lufte/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-executor-0.3.28/src/local_pool.rs:86:5
  35:     0x559e4f2a0827 - futures_executor::local_pool::block_on::h6798b2e6bbb59f60
                               at /home/lufte/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-executor-0.3.28/src/local_pool.rs:317:5
  36:     0x559e4f2eb7e5 - iced::application::Application::run::hb53041f54ff17527
                               at /home/lufte/Downloads/iced/src/application.rs:234:12
  37:     0x559e4f2ebda7 - iced::program::Program<P>::run_with::h14bbcfe225f3f7a2
                               at /home/lufte/Downloads/iced/src/program.rs:247:9
  38:     0x559e4f2eb97d - iced::program::Program<P>::run::h0d50eeab0ec7d957
                               at /home/lufte/Downloads/iced/src/program.rs:171:9
  39:     0x559e4f31660b - scrollable::main::he878932f4e2c8c8b
                               at /home/lufte/Downloads/iced/examples/scrollable/src/main.rs:13:5
  40:     0x559e4f237072 - core::ops::function::FnOnce::call_once::h9971f16588b5f9a8
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/core/src/ops/function.rs:250:5
  41:     0x559e4f307f95 - std::sys_common::backtrace::__rust_begin_short_backtrace::hdef6055f87e15e9d
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/sys_common/backtrace.rs:155:18
  42:     0x559e4f26e0e6 - std::rt::lang_start::{{closure}}::h8c51a787b980d503
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/rt.rs:166:18
  43:     0x559e507d9291 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h8c00837184d6f522
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/core/src/ops/function.rs:284:13
  44:     0x559e507d9291 - std::panicking::try::do_call::hfd8273c3b0a89311
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/panicking.rs:554:40
  45:     0x559e507d9291 - std::panicking::try::h389092b34a7cd1de
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/panicking.rs:518:19
  46:     0x559e507d9291 - std::panic::catch_unwind::hd784b6d233abd2d5
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/panic.rs:142:14
  47:     0x559e507d9291 - std::rt::lang_start_internal::{{closure}}::h8d693c96d9aec4f8
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/rt.rs:148:48
  48:     0x559e507d9291 - std::panicking::try::do_call::h62b442e92648318b
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/panicking.rs:554:40
  49:     0x559e507d9291 - std::panicking::try::h3dd33ffb0232e2bf
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/panicking.rs:518:19
  50:     0x559e507d9291 - std::panic::catch_unwind::h388a168fe640f06a
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/panic.rs:142:14
  51:     0x559e507d9291 - std::rt::lang_start_internal::hdaf8b62dc8f7de54
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/rt.rs:148:20
  52:     0x559e4f26e0ba - std::rt::lang_start::h22b4144d2561094d
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/rt.rs:165:17
  53:     0x559e4f31a39e - main
  54:     0x7fd2225e56ca - __libc_start_call_main
                               at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
  55:     0x7fd2225e5785 - __libc_start_main_impl
                               at ./csu/../csu/libc-start.c:360:3
  56:     0x559e4f1ea891 - _start
  57:                0x0 - <unknown>