-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
more
crashes when attempting more lines than terminal lines
#2362
Comments
Hi! Thanks for putting this in its own issue! Could you provide some more information about your setup, like OS, shell, etc? |
I am able to reproduce too:
The interesting part is if i change my shell, more doesn't works Output in
Output in
CC: @arijit79 |
Is it only happening when reading from stdin? |
It seems to be an issue with crossterm. It's enough to crash the example in crossterm with this:
tested on MacOS. |
I think this issue occurs only on MacOS. Unfortunately I don't own a Mac so I can't test it and report it back to the Could someone create an issue on their GH repo |
Could someone please give me a backtrace of the error and whether it only happens when reading from stdin or does it also happen when reading from a file directly. |
I was able to reproduce this as well.
It seems to be the former. If you have anything else you would like to check, please let me know. |
Thank you for the stack trace! Based on the line numbers in that stack trace it's this line where the unwrap panics: if event::poll(Duration::from_millis(10)).unwrap() {
// ...
} I'm not sure there is much we can do here, except maybe report this to crossterm? We should however handle this case more elegantly, but that will not fix the issue, just make the error prettier :) @gingk1212 Could you test this with the latest crossterm: cat Cargo.toml | cargo run --example event-poll-read and if that still fails on the latest crossterm open an issue there with the stack trace? If they fixed this issue in the meantime, then we'll just have to wait until we can upgrade to that version. |
Ah, it looks like there is already an issue on crossterm: crossterm-rs/crossterm#396 |
I investigated a lot of info around this issue in crossterm based projects and it looks like |
Running something like:
or
Will just crash with
The text was updated successfully, but these errors were encountered: