Comments (2)
I'm not sure what @IceDragon200 did to trigger the panic, but here's a backtrace I got from a similar issue...
To reproduce:
- make terminal window really small (like 10x10)
- enter command prompt by typing:
:
Root cause: division by zero in prompt.rs line 118.
let max_col = area.width / BASE_WIDTH;
let height = ((self.completion.len() as u16 + max_col - 1) / max_col);
In the above area.width = 16
and BASE_WIDTH
is hard coded to 30, causing max_col
to be zero.
Looks like the command prompt doesn't handle terminal window size correctly, issue #54 was a very similar bug related to BASE_WIDTH
and terminal size.
#1 0x0000555556353f54 in std::panicking::rust_panic_with_hook ()
at library/std/src/panicking.rs:610
#2 0x0000555556353a67 in std::panicking::begin_panic_handler::{{closure}} ()
at library/std/src/panicking.rs:495
#3 0x0000555556351a3c in std::sys_common::backtrace::__rust_end_short_backtrace<closure-0,!> () at library/std/src/sys_common/backtrace.rs:141
#4 0x00005555563539f9 in std::panicking::begin_panic_handler ()
at library/std/src/panicking.rs:493
#5 0x00005555556dbdd1 in core::panicking::panic_fmt ()
at library/core/src/panicking.rs:92
#6 0x00005555556dbd1d in core::panicking::panic () at library/core/src/panicking.rs:50
#7 0x0000555555896ed5 in hx::ui::prompt::Prompt::render_prompt (self=0x555557626b50,
area=..., surface=0x7fffffffbec0, cx=0x7fffffff9c88)
at helix-term/src/ui/prompt.rs:118
#8 0x0000555555897706 in hx::ui::prompt::{{impl}}::render (self=0x555557626b50,
area=..., surface=0x7fffffffbec0, cx=0x7fffffff9c88)
at helix-term/src/ui/prompt.rs:273
#9 0x00005555557386de in hx::compositor::Compositor::render (self=0x7fffffffbea0,
cx=0x7fffffff9c88) at helix-term/src/compositor.rs:137
#10 0x00005555557d58ec in hx::application::Application::render (self=0x7fffffffbea0)
at helix-term/src/application.rs:79
#11 0x00005555557d704d in hx::application::Application::handle_terminal_events (
self=0x7fffffffbea0, event=...) at helix-term/src/application.rs:138
#12 0x00005555557d6679 in hx::application::{{impl}}::event_loop::{{closure}} ()
at helix-term/src/application.rs:96
#13 0x000055555571e76b in core::future::from_generator::{{impl}}::poll (
self=..., cx=0x7fffffffbe18)
at /home/rsalminen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
#14 0x00005555557d904f in hx::application::{{impl}}::run::{{closure}} ()
at helix-term/src/application.rs:254
#15 0x000055555571e159 in core::future::from_generator::{{impl}}::poll (
self=..., cx=0x7fffffffbe18)
at /home/rsalminen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
#16 0x00005555557dbee7 in hx::main::{{closure}} () at helix-term/src/main.rs:169
#17 0x000055555571d7f9 in core::future::from_generator::{{impl}}::poll (
self=..., cx=0x7fffffffbe18)
at /home/rsalminen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
#18 0x00005555558b4060 in tokio::park::thread::{{impl}}::block_on::{{closure}}<core::future::from_generator::GenFuture> ()
at /home/rsalminen/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.6.1/src/park/thread.rs:263
from helix.
Fixed by #121
from helix.
Related Issues (20)
- Soft-hyphen character breaks render and movement HOT 1
- failed to build HOT 1
- Display LSP provider information in diagnostics
- Allow customizing lsp gutter symbols
- Allow to disable themes background HOT 1
- File autocomplete in :open breaks with symlinks HOT 1
- `CTRL+c` causes Helix to crash after Nushell LSP crashes HOT 1
- Space / global search feature is broken HOT 3
- Weird behaviour: sometimes 'normal' parts of Latex code get highlighted as warning.
- support multiple root directories for file picker HOT 4
- Extremely slow python autocomplete performance HOT 3
- Display recent files at the top of file picker HOT 2
- Auto-Complete adds double $ character after choosing a value from the dropdown menu
- lua-language-server exits on start
- Feature Request: Custom Snippet Support
- Enhancement: Custom Snippet Support HOT 1
- Clojure-lsp go to definition not working for dependencies/core library functions
- Insert cursor bar style
- sequences of commands interact poorly with interactive commands in mappings
- Crash when trying to debug: "no entry found for key" HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from helix.