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

Windows still panics in some cases #433

Closed
sophiajt opened this issue Aug 28, 2020 · 4 comments · Fixed by #434
Closed

Windows still panics in some cases #433

sophiajt opened this issue Aug 28, 2020 · 4 comments · Fixed by #434
Labels

Comments

@sophiajt
Copy link

sophiajt commented Aug 28, 2020

Hi all,

Thanks for the fixes to, I think we managed to fix some of our Windows instability with this PR: #359

Unfortunately, users are still reporting very similar issues. I haven't been able to reproduce it, yet, but I wanted to file an issue in case you are able to reproduce: nushell/nushell#2440

Happy to help wherever we can.

@gwenn
Copy link
Collaborator

gwenn commented Aug 28, 2020

A backtrace would be helpful.

@sophiajt
Copy link
Author

@gwenn - I'll ask and see if I can get a backtrace

@Lucretiel
Copy link
Contributor

Lucretiel commented Sep 2, 2020

I've tracked down the specific issue to here:

let res = self.set_console_cursor_position(info.dwCursorPosition);
if let Err(error::ReadlineError::Io(ref e)) = res {
if e.kind() == ErrorKind::Other && e.raw_os_error() == Some(87) {

The problem is that, when running in a terminal that isn't cmd.exe (like Windows Terminal), set_console_cursor_position returns an error code 87, which matches ErrorKind::InvalidInput, not ErrorKind::Other. It appears that errno 87 is always InvalidInput (per https://github.com/rust-lang/rust/blob/master/library/std/src/sys/windows/mod.rs#L64), so I think this line needs to be changed. I'll submit a PR making the change.

@gwenn
Copy link
Collaborator

gwenn commented Sep 13, 2020

v6.3.0 released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants