Skip to content

[BUG] unexpected crash #258

@jakubguzek

Description

@jakubguzek

General Information
Version: 0.9.1
Installation Method: cargo install --locked wiki-tui
Operating System: Ubuntu 22.04

Used configuration (if available): default

Describe the bug
An unexpected crash after searching for: "Moon", and selecting first result

To Reproduce

  1. Open new tmux session.
  2. Open new wiki-tui
  3. Create new window
  4. Go back to wiki-tui
  5. search for "Moon"
  6. Select first result (this article, https://en.wikipedia.org/wiki/Moon)

Expected behavior
Article is shown.

Crash report (if available)

name = "wiki-tui"
operating_system = "Ubuntu 22.04 (jammy) [64-bit]"
crate_version = "0.9.1"
explanation = """
Panic occurred in file '/home/jakub/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/string.rs' at line 2043
"""
cause = "assertion failed: self.is_char_boundary(n)"
method = "Panic"
backtrace = """

   0: 0x650a40275c5c - core::panicking::panic::had768957450a0f86
   1: 0x650a40318142 - <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold::hf8212db6b577a0fc
   2: 0x650a4035a3e4 - <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter::hacce49964c460215
   3: 0x650a402f8080 - ratatui::widgets::list::List::new::h8b1da2f1e5dc47cc
   4: 0x650a402beb9a - wiki_tui::components::page::PageComponent::render_contents::h1873004ffbcb8e2a
   5: 0x650a402c3160 - <wiki_tui::components::page::PageComponent as wiki_tui::components::Component>::render::ha6733d5f4afea895
   6: 0x650a402a7f2d - <wiki_tui::app::AppComponent as wiki_tui::components::Component>::render::h782e6c72cbe6ebe9
   7: 0x650a40291b20 - ratatui::terminal::terminal::Terminal<B>::draw::hd83e3bfd675324f8
   8: 0x650a4027a32b - tokio::runtime::park::CachedParkThread::block_on::h66e3be98bd109014
   9: 0x650a4028e1cc - tokio::runtime::context::runtime::enter_runtime::h28ee437f3bc607ef
  10: 0x650a4029a21b - tokio::runtime::runtime::Runtime::block_on::h4a880110513d130b
  11: 0x650a40295dca - wiki_tui::main::h67009a6381e41fc1
  12: 0x650a40295eb3 - std::sys::backtrace::__rust_begin_short_backtrace::h1075a126005f1a85
  13: 0x650a402969ad - std::rt::lang_start::{{closure}}::h205341b5957050af
  14: 0x650a407439e0 - std::rt::lang_start_internal::h15895544e2012228
  15: 0x650a40295ea5 - main
  16: 0x7d6122429d90 - __libc_start_call_main
                at ./csu/../sysdeps/nptl/libc_start_call_main.h:58
  17: 0x7d6122429e40 - __libc_start_main_impl
                at ./csu/../csu/libc-start.c:392
  18: 0x650a40276255 - _start
  19:        0x0 - <unresolved>"""

Checklist

  • checked other issues for the same bug
  • read CONTRIBUTING.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugThis fixes a bug. Increment the minor version

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions