Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thread main panicked at src/text.rs:206:17 attempt to subtract with overflow #197

Closed
Tracked by #196
CosmicHorrorDev opened this issue Dec 14, 2023 · 0 comments · Fixed by #217
Closed
Tracked by #196
Labels
C-bug Category: Something isn't working

Comments

@CosmicHorrorDev
Copy link
Collaborator

This is from the unreleased text changes, so this bug isn't out yet. It would be good to fix it before it even gets released. Expanding and scrolling through collapsible sections usually does the trick. Needs a dev build to actually fail on the overflow since release builds disable that check by default

$ RUST_BACKTRACE=1 c r -- ../typst/README.md
    Finished dev [unoptimized + debuginfo] target(s) in 0.14s
     Running `target/debug/inlyne ../typst/README.md`
thread 'main' panicked at src/text.rs:206:17:
attempt to subtract with overflow
stack backtrace:
   0: rust_begin_unwind
             at /rustc/1a06ac5b5d7c9331e8de1aa1fd7e9d3533034b44/library/std/src/panicking.rs:645:5
   1: core::panicking::panic_fmt
             at /rustc/1a06ac5b5d7c9331e8de1aa1fd7e9d3533034b44/library/core/src/panicking.rs:72:14
   2: core::panicking::panic
             at /rustc/1a06ac5b5d7c9331e8de1aa1fd7e9d3533034b44/library/core/src/panicking.rs:127:5
   3: inlyne::text::TextBox::find_hoverable
   4: inlyne::Inlyne::find_hoverable::{{closure}}
   5: core::option::Option<T>::and_then
   6: inlyne::Inlyne::find_hoverable
   7: inlyne::Inlyne::find_hoverable::{{closure}}
   8: core::option::Option<T>::and_then
   9: inlyne::Inlyne::find_hoverable
  10: inlyne::Inlyne::run::{{closure}}
  11: winit::platform_impl::platform::x11::EventLoop<T>::drain_events::{{closure}}::{{closure}}
  12: winit::platform_impl::platform::sticky_exit_callback
  13: winit::platform_impl::platform::x11::EventLoop<T>::drain_events::{{closure}}
  14: winit::platform_impl::platform::x11::event_processor::EventProcessor<T>::process_event
  15: winit::platform_impl::platform::x11::EventLoop<T>::drain_events
  16: winit::platform_impl::platform::x11::EventLoop<T>::run_return::single_iteration
  17: winit::platform_impl::platform::x11::EventLoop<T>::run_return
  18: winit::platform_impl::platform::x11::EventLoop<T>::run
  19: winit::platform_impl::platform::EventLoop<T>::run
  20: winit::event_loop::EventLoop<T>::run
  21: inlyne::Inlyne::run
  22: inlyne::main
  23: core::ops::function::FnOnce::call_once
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant