onagre-launcher / onagre

A general purpose application launcher for X and wayland inspired by rofi/wofi and alfred
MIT License
514 stars 27 forks source link

Onagre crashes if the name of an application that doesn't exist is executed #16

Closed poperigby closed 3 years ago

poperigby commented 3 years ago

I tried typing in random gibberish and hitting enter, and it crashes with this error every time:

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/onagre.rs:359:61
stack backtrace:
   0: rust_begin_unwind
             at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:475
   1: core::panicking::panic_fmt
             at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/panicking.rs:85
   2: core::panicking::panic
             at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/panicking.rs:50
   3: onagre::onagre::Onagre::run_command
   4: <onagre::onagre::Onagre as iced::application::Application>::update
   5: iced_winit::application::update
   6: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
   7: iced_winit::application::run::{{closure}}
   8: winit::platform_impl::platform::wayland::event_loop::EventLoop<T>::run
   9: winit::platform_impl::platform::EventLoop<T>::run
  10: winit::event_loop::EventLoop<T>::run
  11: iced_winit::application::run
  12: onagre::onagre::run
  13: onagre::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
[2020-11-23T00:57:17Z ERROR gfx_memory::heaps] Heaps not completely freed before drop. Utilization: MemoryHeapUtilization { utilization: MemoryUtilization { used: 54467072, effective: 30081024 }, size: 8321499136 }
[2020-11-23T00:57:17Z ERROR gfx_memory::heaps] Heaps not completely freed before drop. Utilization: MemoryHeapUtilization { utilization: MemoryUtilization { used: 18538496, effective: 1212416 }, size: 8573157376 }
[2020-11-23T00:57:17Z ERROR gfx_memory::allocator::general] Memory leak: SizeEntry(256) is still used
[2020-11-23T00:57:17Z ERROR gfx_memory::allocator::general] Memory leak: SizeEntry(2048) is still used
[2020-11-23T00:57:17Z ERROR gfx_memory::allocator::general] Memory leak: SizeEntry(16384) is still used
[2020-11-23T00:57:17Z ERROR gfx_memory::allocator::general] Memory leak: SizeEntry(4194304) is still used
[2020-11-23T00:57:17Z ERROR gfx_memory::allocator::general] Memory leak: SizeEntry(1048576) is still used
[2020-11-23T00:57:17Z ERROR gfx_memory::allocator::general] Memory leak: SizeEntry(25600) is still used
[2020-11-23T00:57:17Z ERROR gfx_memory::allocator::general] Memory leak: SizeEntry(2600192) is still used
[2020-11-23T00:57:17Z ERROR gfx_memory::allocator::general] Memory leak: SizeEntry(5600000) is still used
[2020-11-23T00:57:17Z ERROR gfx_memory::allocator::general] Memory leak: SizeEntry(1400000) is still used
[2020-11-23T00:57:17Z ERROR gfx_memory::allocator::general] Memory leak: SizeEntry(12800) is still used
[2020-11-23T00:57:17Z ERROR gfx_memory::allocator::general] Memory leak: SizeEntry(240128) is still used
[2020-11-23T00:57:17Z ERROR gfx_memory::allocator::general] Memory leak: SizeEntry(60032) is still used
[2020-11-23T00:57:17Z ERROR gfx_memory::allocator::general] Memory leak: SizeEntry(40192) is still used
[2020-11-23T00:57:17Z ERROR gfx_memory::allocator::general] Memory leak: SizeEntry(36096) is still used
[2020-11-23T00:57:17Z ERROR gfx_memory::allocator::general] Memory leak: SizeEntry(16777216) is still used
[2020-11-23T00:57:17Z ERROR gfx_memory::allocator::general] Memory leak: SizeEntry(32768) is still used
[2020-11-23T00:57:17Z ERROR gfx_memory::allocator::general] Memory leak: SizeEntry(10240) is still used
[2020-11-23T00:57:17Z ERROR gfx_memory::allocator::general] Memory leak: SizeEntry(32768) is still used
[2020-11-23T00:57:17Z ERROR gfx_memory::allocator::general] Memory leak: SizeEntry(33792) is still used
[2020-11-23T00:57:17Z ERROR gfx_descriptor::allocator] DescriptorAllocator is dropped

OS: Arch Linux WM: Sway

oknozor commented 3 years ago

Panic when no valid entry is selected is the intended behavior, however there is obviously something going on with the allocator here. Thank's for pointing that out, I 'll look into it.

oknozor commented 3 years ago

Fixed in 7e67262fafa938d8cbe8bbf76c9d286594727ec5, you should now get the following error message instead of the previous stacktrace :

❯ onagre
No match found for ezakjhezrlkjhazer, exiting onagre