pop-os / libcosmic

WIP library for COSMIC applications
https://pop-os.github.io/libcosmic/cosmic/
Mozilla Public License 2.0
473 stars 49 forks source link

`user-provided comparison function does not correctly implement a total order` when clicking item in menu bar #719

Open SkyfallWasTaken opened 2 weeks ago

SkyfallWasTaken commented 2 weeks ago

When clicking the "View" item in the menubar: image

the app crashes with this error:

user-provided comparison function does not correctly implement a total order
stack backtrace:
   0:     0x55a567c3e18a - std::backtrace_rs::backtrace::libunwind::trace::h99efb0985cae5d78
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5
   1:     0x55a567c3e18a - std::backtrace_rs::backtrace::trace_unsynchronized::he2c1aa63b3f7fad8
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x55a567c3e18a - std::sys::backtrace::_print_fmt::h8a221d40f5e0f88b
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/sys/backtrace.rs:66:9
   3:     0x55a567c3e18a - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h304520fd6a30aa07
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/sys/backtrace.rs:39:26
   4:     0x55a567c6cdfb - core::fmt::rt::Argument::fmt::h5da9c218ec984eaf
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/fmt/rt.rs:177:76
   5:     0x55a567c6cdfb - core::fmt::write::hf5713710ce10ff22
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/fmt/mod.rs:1178:21
   6:     0x55a567c38fd3 - std::io::Write::write_fmt::hda708db57927dacf
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/io/mod.rs:1823:15
   7:     0x55a567c3f472 - std::sys::backtrace::BacktraceLock::print::hbcdbec4d97c91528
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/sys/backtrace.rs:42:9
   8:     0x55a567c3f472 - std::panicking::default_hook::{{closure}}::he1ad87607d0c11c5
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/panicking.rs:266:22
   9:     0x55a567c3f0de - std::panicking::default_hook::h81c8cd2e7c59ee33
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/panicking.rs:293:9
  10:     0x55a567c3fd6f - std::panicking::rust_panic_with_hook::had2118629c312a4a
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/panicking.rs:797:13
  11:     0x55a567c3fa23 - std::panicking::begin_panic_handler::{{closure}}::h7fa5985d111bafa2
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/panicking.rs:664:13
  12:     0x55a567c3e669 - std::sys::backtrace::__rust_end_short_backtrace::h704d151dbefa09c5
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/sys/backtrace.rs:170:18
  13:     0x55a567c3f6e4 - rust_begin_unwind
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/panicking.rs:662:5
  14:     0x55a567c69d43 - core::panicking::panic_fmt::h3eea515d05f7a35e
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/panicking.rs:74:14
  15:     0x55a567c6f2bb - core::slice::sort::shared::smallsort::panic_on_ord_violation::h972f60d892347b6f
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/slice/sort/shared/smallsort.rs:860:5
  16:     0x55a565b3c0be - core::slice::sort::shared::smallsort::bidirectional_merge::hb47bae6469411a98
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/slice/sort/shared/smallsort.rs:838:13
  17:     0x55a565b3c8f9 - core::slice::sort::shared::smallsort::small_sort_general_with_scratch::h5872c2bf4fd77442
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/slice/sort/shared/smallsort.rs:286:9
  18:     0x55a565b699d8 - <T as core::slice::sort::shared::smallsort::StableSmallSortTypeImpl>::small_sort::h0dc750a59da5a7d1
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/slice/sort/shared/smallsort.rs:61:9
  19:     0x55a565b699d8 - core::slice::sort::stable::quicksort::quicksort::hda4416ad029712aa
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/slice/sort/stable/quicksort.rs:25:13
  20:     0x55a565ba1052 - core::slice::sort::stable::drift::create_run::hfb4d7604c28b602b
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/slice/sort/stable/drift.rs:255:9
  21:     0x55a565ba1052 - core::slice::sort::stable::drift::sort::h9ecfb6b083497c72
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/slice/sort/stable/drift.rs:64:17
  22:     0x55a565bb935e - core::slice::sort::stable::driftsort_main::haf0c2f7b933480df
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/slice/sort/stable/mod.rs:84:5
  23:     0x55a565bb1117 - core::slice::sort::stable::sort::hf06fdd2f99a95a08
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/slice/sort/stable/mod.rs:45:5
  24:     0x55a565bb1117 - alloc::slice::stable_sort::h8e0bd360cd3f6fea
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/alloc/src/slice.rs:882:5
  25:     0x55a565bb1117 - alloc::slice::<impl [T]>::sort_by::h012f4ef4b3e7f70a
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/alloc/src/slice.rs:288:9
  26:     0x55a565bb1117 - iced_graphics::damage::group::h6c22a0f912f91840
                               at /home/skyfall/.cargo/git/checkouts/libcosmic-b367e32ffc370f4f/aaadf71/iced/graphics/src/damage.rs:52:5
  27:     0x55a5650256c5 - iced_tiny_skia::window::compositor::present::h561468e358bed6f3
                               at /home/skyfall/.cargo/git/checkouts/libcosmic-b367e32ffc370f4f/aaadf71/iced/tiny_skia/src/window/compositor.rs:196:9
  28:     0x55a5650244f1 - <iced_tiny_skia::window::compositor::Compositor as iced_graphics::compositor::Compositor>::present::h6bc46ceb619e0f1c
                               at /home/skyfall/.cargo/git/checkouts/libcosmic-b367e32ffc370f4f/aaadf71/iced/tiny_skia/src/window/compositor.rs:118:9
  29:     0x55a564ff2b25 - <iced_renderer::fallback::Compositor<A,B> as iced_graphics::compositor::Compositor>::present::he0240c28bae0b7fa
                               at /home/skyfall/.cargo/git/checkouts/libcosmic-b367e32ffc370f4f/aaadf71/iced/renderer/src/fallback.rs:367:18
  30:     0x55a564e7da86 - iced_winit::program::run_instance::{{closure}}::hd10af51eceb6d148
                               at /home/skyfall/.cargo/git/checkouts/libcosmic-b367e32ffc370f4f/aaadf71/iced/winit/src/program.rs:1391:31
  31:     0x55a564e87b57 - iced_winit::program::run::Runner<Message,F,C>::process_event::hca5ce2dbb96df1b9
                               at /home/skyfall/.cargo/git/checkouts/libcosmic-b367e32ffc370f4f/aaadf71/iced/winit/src/program.rs:447:28
  32:     0x55a564e89ed1 - <iced_winit::program::run::Runner<Message,F,C> as winit::application::ApplicationHandler>::window_event::h3d4574bfdfb0c603
                               at /home/skyfall/.cargo/git/checkouts/libcosmic-b367e32ffc370f4f/aaadf71/iced/winit/src/program.rs:321:13
  33:     0x55a564e8b0b0 - <&mut A as winit::application::ApplicationHandler>::window_event::hd3cc3fb2971de222
                               at /home/skyfall/.cargo/git/checkouts/winit-40d7deb2b0c08730/1cc02bd/src/application.rs:359:9
  34:     0x55a564e8b080 - <&mut A as winit::application::ApplicationHandler>::window_event::h53cf0d6fc4eb5a6b
                               at /home/skyfall/.cargo/git/checkouts/winit-40d7deb2b0c08730/1cc02bd/src/application.rs:359:9
  35:     0x55a564f6aa1d - winit::platform_impl::linux::wayland::event_loop::EventLoop::single_iteration::hd0a0beeb94cd2bdd
                               at /home/skyfall/.cargo/git/checkouts/winit-40d7deb2b0c08730/1cc02bd/src/platform_impl/linux/wayland/event_loop/mod.rs:458:17
  36:     0x55a564f6cd4e - winit::platform_impl::linux::wayland::event_loop::EventLoop::poll_events_with_timeout::h38a39ffc825ff4bc
                               at /home/skyfall/.cargo/git/checkouts/winit-40d7deb2b0c08730/1cc02bd/src/platform_impl/linux/wayland/event_loop/mod.rs:270:9
  37:     0x55a564f6a052 - winit::platform_impl::linux::wayland::event_loop::EventLoop::pump_app_events::h8d5d3a1f7500cebf
                               at /home/skyfall/.cargo/git/checkouts/winit-40d7deb2b0c08730/1cc02bd/src/platform_impl/linux/wayland/event_loop/mod.rs:191:13
  38:     0x55a564f6c762 - winit::platform_impl::linux::wayland::event_loop::EventLoop::run_app_on_demand::h5210440e947cf685
                               at /home/skyfall/.cargo/git/checkouts/winit-40d7deb2b0c08730/1cc02bd/src/platform_impl/linux/wayland/event_loop/mod.rs:154:19
  39:     0x55a564f6cd8a - winit::platform_impl::linux::wayland::event_loop::EventLoop::run_app::h17242c2b40d9d68b
                               at /home/skyfall/.cargo/git/checkouts/winit-40d7deb2b0c08730/1cc02bd/src/platform_impl/linux/wayland/event_loop/mod.rs:145:9
  40:     0x55a564edd783 - winit::platform_impl::linux::EventLoop::run_app::hfe90539af9217ddc
                               at /home/skyfall/.cargo/git/checkouts/winit-40d7deb2b0c08730/1cc02bd/src/platform_impl/linux/mod.rs:427:56
  41:     0x55a564e86fe7 - winit::event_loop::EventLoop::run_app::h65ab5ccab3fa9514
                               at /home/skyfall/.cargo/git/checkouts/winit-40d7deb2b0c08730/1cc02bd/src/event_loop.rs:228:9
  42:     0x55a564e86fe7 - iced_winit::program::run::h3467272cefc64625
                               at /home/skyfall/.cargo/git/checkouts/libcosmic-b367e32ffc370f4f/aaadf71/iced/winit/src/program.rs:626:28
  43:     0x55a564e0a561 - iced::program::Program::run_with::h0519c2772498412d
                               at /home/skyfall/.cargo/git/checkouts/libcosmic-b367e32ffc370f4f/aaadf71/iced/src/program.rs:183:12
  44:     0x55a564dfc4cc - cosmic::app::multi_window::MultiWindow<P>::run_with::hb57bc0496fc906a0
                               at /home/skyfall/.cargo/git/checkouts/libcosmic-b367e32ffc370f4f/aaadf71/src/app/multi_window.rs:124:9
  45:     0x55a564dfc4cc - cosmic::app::run::h335c6a43c0b2ddca
                               at /home/skyfall/.cargo/git/checkouts/libcosmic-b367e32ffc370f4f/aaadf71/src/app/mod.rs:173:14
  46:     0x55a565058352 - snowvault_gui::main::ha068451be4237b74
                               at /home/skyfall/snowball-file/crates/snowvault_gui/src/main.rs:18:5
  47:     0x55a564f8ccf2 - core::ops::function::FnOnce::call_once::haef7dbcf0b88e267
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/ops/function.rs:250:5
  48:     0x55a564ddf8f5 - std::sys::backtrace::__rust_begin_short_backtrace::h374d75a27a88b0bb
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/sys/backtrace.rs:154:18
  49:     0x55a564e9c6e6 - std::rt::lang_start::{{closure}}::hef20f616f3141028
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/rt.rs:164:18
  50:     0x55a567c30870 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h08ecba131ab90ec4
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/ops/function.rs:284:13
  51:     0x55a567c30870 - std::panicking::try::do_call::hf33a59fd8ce953f4
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/panicking.rs:554:40
  52:     0x55a567c30870 - std::panicking::try::h5005ce80ce949fd8
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/panicking.rs:518:19
  53:     0x55a567c30870 - std::panic::catch_unwind::hfbae19e2e2c5b7ed
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/panic.rs:345:14
  54:     0x55a567c30870 - std::rt::lang_start_internal::{{closure}}::ha0331c3690741813
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/rt.rs:143:48
  55:     0x55a567c30870 - std::panicking::try::do_call::hcdcbdb616b4d0295
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/panicking.rs:554:40
  56:     0x55a567c30870 - std::panicking::try::h3f2f1725a07d2256
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/panicking.rs:518:19
  57:     0x55a567c30870 - std::panic::catch_unwind::h51869e04b56b2dc3
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/panic.rs:345:14
  58:     0x55a567c30870 - std::rt::lang_start_internal::h4d90db0530245041
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/rt.rs:143:20
  59:     0x55a564e9c6ba - std::rt::lang_start::h6ca37482b5754403
                               at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/rt.rs:163:17
  60:     0x55a5650583ae - main
  61:     0x7fc3bd0cd248 - __libc_start_call_main
  62:     0x7fc3bd0cd30b - __libc_start_main@GLIBC_2.2.5
  63:     0x55a564d48015 - _start
  64:                0x0 - <unknown>

I'm using Fedora 41, with kernel version 6.11.7-300.fc41.x86_64 and Rust 1.82.0.

Code: https://github.com/SkyfallWasTaken/snowvault/tree/iced in crates/snowvault_gui. This code is just the COSMIC app template.

joshuamegnauth54 commented 1 day ago

I've seen this panic several times, but I've never been able to reliably trigger it. Does it always panic for you?

mmstick commented 1 day ago

Do you have functioning Vulkan/OpenGL hardware acceleration? The logs indicate software rendering.