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

bug: windows: panic: read coninput events: The I/O operation has been aborted because of either a thread exit or an application request. #1324

Closed
aymanbagabas opened this issue Feb 10, 2025 · 0 comments

Comments

@aymanbagabas
Copy link
Member

Related: antonmedv/walk#160 (comment)
Related: #1305

Describe the bug
When a program is using tea.Exec, Bubble Tea doesn't handle cancelIO errors while reading input events, giving the following error.

The I/O operation has been aborted because of either a thread exit or an application request.

Setup
Please complete the following information along with version numbers, if applicable.

  • OS Windows
  • Shell pwsh
  • Terminal Emulator Windows Terminal Preview
  • Terminal Multiplexer none

To Reproduce
Steps to reproduce the behavior:

  1. go run github.com/antonmedv/walk@v1.11.0
  2. Edit a file
  3. Quit the subprocess
  4. See error

Source Code
This is related to inputreader_windows.go and key_windows.go.

Expected behavior
Shouldn't give an error and Bubble Tea should cancel the IO gracefully

Screenshots

Image

aymanbagabas added a commit that referenced this issue Feb 10, 2025
This gracefully handles windows.CancelIo errors.

Fixes: #1324
aymanbagabas added a commit that referenced this issue Feb 10, 2025
This gracefully handles windows.CancelIo errors.

Fixes: c8d6005 (fix: use CancelIoEx to cancel Windows conInputReader across threads (#1305))
Fixes: #1324
aymanbagabas added a commit that referenced this issue Feb 10, 2025
This gracefully handles windows.CancelIo errors.

Fixes: c8d6005 (fix: use CancelIoEx to cancel Windows conInputReader across threads (#1305))
Fixes: #1324
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

1 participant