gyscos / gyscos/cursive

[BUG] Terminal unresponsive when using Cursive with crossterm-backend and echo

Open
#689 4 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
4.8k
Forks
270
Avg merge
5d 19h
Merged PRs (30d)
2

Description

(UPDATE: The bug is due to https://github.com/crossterm-rs/crossterm/issues/500 and there is work in progress to fix it at https://github.com/crossterm-rs/crossterm/pull/711)

The bug seems to be unique to the crossterm-backend, so I'm reporting the bug here: https://github.com/crossterm-rs/crossterm/issues/725

The rest of this text is copy/paste from the link above.

**Describe the bug**

Terminal is unresponsive when using Crossterm and Cursive, when enabling Cursive feature `crossterm-backend`.

Specifically, Cursive launches the TUI, but it doesn't respond to key presses.

For comparison, the same app works fine with other Cursive backends, including ncurses, pancurses, termion.

**To Reproduce**

Minimal reproduction code.

File `Cargo.toml` includes:

```toml
[dependencies]
cursive = { version = "*", features = ["crossterm-backend"] }
```

File `main.rs`:
```
fn main() {
let mut c = cursive::crossterm();
c.run();
}
```

Run:

```
./target/debug/demo
```

Cursive shows a blank screen, as expected.

Press ctrl-c to exit, as expected.

Run:

```
echo "" | ./target/debug/demo
```

Cursive shows a blank screen, as expected.

Press ctrl-c to exit-- but it doesn't work. This is the bug. A real-world app with more kinds of inputs has all of the fail, such as for Checkbox, EditView, tec.

**Expected behavior**

Expected: Cursive responds to keys.

Actual: Cursive does not responds to keys.

I've confirmed this problem happens with other kinds of UI/UX, such as other keypresses, and also by using other Cursive functionality, such as a TextView, or EditView, or Button, etc.

**OS**

macOS Ventura 13.0 on a MacBook Pro with Apple M1 Max chip

**Terminal/Console**

macOS Terminal app i.e. the default macOS terminal application

**Question**

When the Crossterm documentation states "It supports all UNIX and Windows terminals down to Windows 7", does Crossterm currently support UNIX on macOS with Apple M1? I ask because I see some past posts that discuss Crossterm macOS M1 issues/incompatibilities/roadmaps.

If yes, then what's the next step please, to troubleshoot this bug?

If no, then could a maintainer edit to the README and documentation to note that Crossterm is currently not intending to be run on macOS with Apple M1?

Thank you for your consideration.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.