AmaranthineCodices / chrysanthemum

A content filtration bot for Discord.
3 stars 2 forks source link

Filtered messages with empty content crash Chrysanthemum #29

Closed AmaranthineCodices closed 2 years ago

AmaranthineCodices commented 2 years ago
called `Result::unwrap()` on an `Err` value: EmbedError { kind: DescriptionEmpty { description: "" } }

Thread 0 Crashed:
0   std                             0x5613d2c16544      std::sys_common::backtrace::__rust_end_short_backtrace (backtrace.rs:139)
1   <unknown>                       0x5613d2c18009      rust_begin_unwind (panicking.rs:517)
2   core                            0x5613d23045b1      core::panicking::panic_fmt (panicking.rs:100)
3   core                            0x5613d23046a3      core::result::unwrap_failed (result.rs:1616)
4   chrysanthemum                   0x5613d23f5cb8      chrysanthemum::filter_message_info::{{closure}}::{{closure}}
5   core                            0x5613d23dc26e      core::future::from_generator::GenFuture<T>::poll
6   core                            0x5613d23dc654      core::future::from_generator::GenFuture<T>::poll
7   core                            0x5613d23e8970      core::future::from_generator::GenFuture<T>::poll
8   core                            0x5613d23d9f3a      core::future::from_generator::GenFuture<T>::poll
9   tokio                           0x5613d248829d      tokio::runtime::task::core::CoreStage<T>::poll
10  tokio                           0x5613d238a2b3      tokio::runtime::task::harness::Harness<T>::poll
11  std                             0x5613d2bc674f      std::thread::local::LocalKey<T>::with
12  tokio                           0x5613d2bbdedc      tokio::runtime::thread_pool::worker::Context::run_task
13  tokio                           0x5613d2bbce09      tokio::runtime::thread_pool::worker::Context::run
14  tokio                           0x5613d2ba82a5      tokio::macros::scoped_tls::ScopedKey<T>::set
15  tokio                           0x5613d2bbc8dc      tokio::runtime::thread_pool::worker::run
16  tokio                           0x5613d2bc0eaf      tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
17  core                            0x5613d2ba466f      core::panic::unwind_safe::AssertUnwindSafe<T>::call_once
18  tokio                           0x5613d2bb4c41      tokio::runtime::task::harness::Harness<T>::poll
19  tokio                           0x5613d2bb3965      tokio::runtime::blocking::pool::Inner::run
20  std                             0x5613d2ba9971      std::sys_common::backtrace::__rust_begin_short_backtrace
21  core                            0x5613d2bc0718      core::ops::function::FnOnce::call_once{{vtable.shim}}
22  alloc                           0x5613d2c1bdf3      [inlined] alloc::boxed::Box<T>::call_once (boxed.rs:1691)
23  alloc                           0x5613d2c1bdf3      [inlined] alloc::boxed::Box<T>::call_once (boxed.rs:1691)
24  std                             0x5613d2c1bdf3      std::sys::unix::thread::Thread::new::thread_start (thread.rs:106)
25  <unknown>                       0x7fc8a87e4fa3      start_thread
26  <unknown>                       0x7fc8a858b4cf      clone
27  <unknown>                       0x0                 <unknown>

This can happen if e.g. a sticker is filtered.