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

editor sample crashes on windows every other invokation #44

Closed
pm100 opened this issue Nov 3, 2023 · 4 comments
Closed

editor sample crashes on windows every other invokation #44

pm100 opened this issue Nov 3, 2023 · 4 comments

Comments

@pm100
Copy link
Contributor

pm100 commented Nov 3, 2023

it seems to be something to do with enabling and detecting raw mode

If i reset my terminal and run it, its fine, then if I close and run again the screen is not cleared, the edit windows open and can be used but is odd

image

on ^q it crashes

image

run again all is fine

I bet this is a windows issue, I will drill into it (I am ex MSFT guy, windows is my env) once I finish the select work

@rhysd
Copy link
Owner

rhysd commented Nov 4, 2023

Can you paste the entire backtrace as text in code block with RUST_BACKTRACE=1?

@pm100
Copy link
Contributor Author

pm100 commented Nov 4, 2023

here you go

thread 'main' panicked at examples\editor.rs:364:10:itch buffer
called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: "Initial console modes not set" }
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library\std\src\panicking.rs:595
   1: core::panicking::panic_fmt
             at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library\core\src\panicking.rs:67
   2: core::result::unwrap_failed
             at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library\core\src\result.rs:1652
   3: enum2$<core::result::Result<tuple$<>,std::io::error::Error> >::unwrap<tuple$<>,std::io::error::Error>
             at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33\library\core\src\result.rs:1077
   4: editor::impl$4::drop
             at .\examples\editor.rs:359
   5: core::ptr::drop_in_place<editor::Editor>
             at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33\library\core\src\ptr\mod.rs:497
   6: editor::main
             at .\examples\editor.rs:370
   7: core::ops::function::FnOnce::call_once<enum2$<core::result::Result<tuple$<>,std::io::error::Error> > (*)(),tuple$<> >
             at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33\library\core\src\ops\function.rs:250
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
error: process didn't exit successfully: `target\debug\examples\editor.exe f1` (exit code: 101)
PS C:\work\origtta\tui-textarea>

@rhysd
Copy link
Owner

rhysd commented Nov 4, 2023

Thanks. I'll check it tomorrow.

@rhysd
Copy link
Owner

rhysd commented Nov 6, 2023

I could reproduce this. But I'm not sure this is an issue of the example implementation.

@rhysd rhysd closed this as completed in 9ec2f32 Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants