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

Inconsistent UTF8Error #45

Open
brian6932 opened this issue Aug 19, 2022 · 1 comment
Open

Inconsistent UTF8Error #45

brian6932 opened this issue Aug 19, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@brian6932
Copy link

brian6932 commented Aug 19, 2022

Command used to start the recording: powersession rec -c pwsh foo.txt -f

1..10 | % -pa { ascii-image-converter FeelsDankMan.png -b --threshold 109 -W 30 | dotacat }
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀

⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿hread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: FromUtf8Error { bytes: [53, 59, 49, 51, 50, 59, 49, 54, 109, 226, 163, 191, 27, 91, 51, 56, 59, 50, 59, 50, 52, 49, 59, 49, 50, 48, 59, 50, 51, 109, 226, 163, 191, 27, 91, 51, 56, 59, 50, 59, 50, 52, 54, 59, 49, 48, 56, 59, 51, 48, 109, 226, 163, 132, 27, 91, 51, 56, 59, 50, 59, 50, 53, 48, 59, 57, 53, 59, 51, 57, 109, 226, 160, 128, 27, 91, 51, 56, 59, 50, 59, 50, 53, 51, 59, 56, 51, 59, 52, 56, 109, 226, 160, 128, 27, 91, 51, 56, 59, 50, 59, 50, 53, 52, 59, 55, 50, 59, 53, 57, 109, 226, 160, 128, 27, 91, 51, 56, 59, 50, 59, 50, 53, 52, 59, 54, 49, 59, 54, 57, 109, 226, 160, 128, 27, 91, 51, 56, 59, 50, 59, 50, 53, 51, 59, 53, 48, 59, 56, 49, 109, 226, 160, 128, 27, 91, 51, 56, 59, 50, 59, 50, 53, 49, 59, 52, 49, 59, 57, 51, 109, 226, 160, 128, 27, 91, 51, 56, 59, 50, 59, 50, 52, 55, 59, 51, 50, 59, 49, 48, 53, 109, 226, 160, 128, 27, 91, 51, 56, 59, 50, 59, 50, 52, 50, 59, 50, 52, 59, 49, 49, 56, 109, 226, 160, 128, 27, 91, 51, 56, 59, 50, 59, 51, 56, 59, 50, 53, 48, 59, 57, 54, 109, 27, 91, 49, 52, 59, 49, 72, 226, 160, 128, 27, 91, 51, 56, 59, 50, 59, 52, 56, 59, 50, 53, 51, 59, 56, 52, 109, 226, 160, 128, 27, 91, 51, 56, 59, 50, 59, 53, 56, 59, 50, 53, 52, 59, 55, 50, 109, 226, 160, 128, 27, 91, 51, 56, 59, 50, 59, 54, 57, 59, 50, 53, 52, 59, 54, 49, 109, 226, 160, 128, 27, 91, 51, 56, 59, 50, 59, 56, 48, 59, 50, 53, 51, 59, 53, 49, 109, 226, 160, 128, 27, 91, 51, 56, 59, 50, 59, 57, 50, 59, 50, 53, 49, 59, 52, 49, 109, 226, 160, 128, 27, 91, 51, 56, 59, 50, 59, 49, 48, 53, 59, 50, 52, 55, 59, 51, 50, 109, 226, 160, 128, 27, 91, 51, 56, 59, 50, 59, 49, 49, 55, 59, 50, 52, 51, 59, 50, 53, 109, 226, 160, 128, 27, 91, 51, 56, 59, 50, 59, 49, 50, 57, 59, 50, 51, 55, 59, 49, 56, 109, 226, 163, 190, 27, 91, 51, 56, 59, 50, 59, 49, 52, 50, 59, 50, 51, 48, 59, 49, 50, 109, 226, 163, 191, 27, 91, 51, 56, 59, 50, 59, 49, 53, 52, 59, 50, 50, 50, 59, 56, 109, 226, 163, 191, 27, 91, 51, 56, 59, 50, 59, 49, 54, 54, 59, 50, 49, 51, 59, 52, 109, 226, 163, 191, 27, 91, 51, 56, 59, 50, 59, 49, 55, 56, 59, 50, 48, 51, 59, 50, 109, 226, 163, 191, 27, 91, 51, 56, 59, 50, 59, 49, 57, 48, 59, 49, 57, 50, 59, 50, 109, 226, 163, 191, 27, 91, 51, 56, 59, 50, 59, 50, 48, 48, 59, 49, 56, 49, 59, 50, 109, 226, 163, 191, 27, 91, 51, 56, 59, 50, 59, 50, 49, 48, 59, 49, 54, 57, 59, 52, 109, 226, 163, 191, 27, 91, 51, 56, 59, 50, 59, 50, 50, 48, 59, 49, 53, 55, 59, 55, 109, 226, 163, 191, 27, 91, 51, 56, 59, 50, 59, 50, 50, 56, 59, 49, 52, 53, 59, 49, 49, 109, 226, 163, 191, 27, 91, 51, 56, 59, 50, 59, 50, 51, 53, 59, 49, 51, 50, 59, 49, 54, 109, 226, 163, 191, 27, 91, 51, 56, 59, 50, 59, 50, 52, 49, 59, 49, 50, 48, 59, 50, 51, 109, 226, 163, 191, 27, 91, 51, 56, 59, 50, 59, 50, 52, 54, 59, 49, 48, 56, 59, 51, 48, 109, 226, 163, 191, 27, 91, 51, 56, 59, 50, 59, 50, 53, 48, 59, 57, 53, 59, 51, 57, 109, 226, 163, 191, 27, 91, 51, 56, 59, 50, 59, 50, 53, 51, 59, 56, 51, 59, 52, 56, 109, 226, 163, 166, 27, 91, 51, 56, 59, 50, 59, 50, 53, 52, 59, 55, 50, 59, 53, 57, 109, 226, 161, 128, 27, 91, 51, 56, 59, 50, 59, 50, 53, 52, 59, 54, 49, 59, 54, 57, 109, 226, 160, 128, 27, 91, 51, 56, 59, 50, 59, 50, 53, 51, 59, 53, 48, 59, 56, 49, 109, 226, 160, 128, 27, 91, 51, 56, 59, 50, 59, 50, 53, 49, 59, 52, 49, 59, 57, 51, 109, 226, 160, 128, 27, 91, 51, 56, 59, 50, 59, 50, 52, 55, 59, 51, 50, 59, 49, 48, 53, 109, 226, 160, 128, 27, 91, 51, 56, 59, 50, 59, 50, 52, 50, 59, 50, 52, 59, 49, 49, 56, 109, 226, 160, 128, 27, 91, 51, 56, 59, 50, 59, 50, 51, 54, 59, 49, 55, 59, 49, 51, 48, 109, 226, 160, 128, 27, 91, 51, 56, 59, 50, 59, 52, 56, 59, 50, 53, 51, 59, 56, 52, 109, 27, 91, 49, 54, 59, 49, 72, 226, 160, 128, 27, 91, 51, 56, 59, 50, 59, 53, 56, 59, 50, 53, 52, 59, 55, 50, 109, 226, 160, 128, 27, 91, 51, 56, 59, 50, 59, 54, 57, 59, 50, 53, 52, 59, 54, 49, 109, 226, 160, 128, 27, 91, 51, 56, 59, 50, 59, 56, 48, 59, 50, 53, 51, 59, 53, 49, 109, 226, 160, 128, 27, 91, 51, 56, 59, 50, 59, 57, 50, 59, 50, 53, 49, 59, 52, 49, 109, 226, 160, 128, 27, 91, 51, 56, 59, 50, 59, 49, 48, 53, 59, 50, 52, 55, 59, 51, 50, 109, 226, 160, 128, 27, 91, 51, 56, 59, 50, 59, 49, 49, 55, 59, 50, 52, 51, 59, 50, 53, 109, 226, 160, 128, 27, 91, 51, 56, 59, 50, 59, 49, 50, 57, 59, 50, 51, 55, 59, 49, 56, 109, 226, 163, 188, 27, 91, 51, 56, 59, 50, 59, 49, 52, 50, 59, 50, 51, 48, 59, 49, 50, 109, 226, 163], error: Utf8Error { valid_up_to: 1022, error_len: None } }', src\commands\record.rs:134:72
stack backtrace:
   0:     0x7ff7359c757f - <unknown>
   1:     0x7ff7359def8a - <unknown>
   2:     0x7ff7359c02f9 - <unknown>
   3:     0x7ff7359c9d6b - <unknown>
   4:     0x7ff7359c995e - <unknown>
   5:     0x7ff7359ca361 - <unknown>
   6:     0x7ff7359ca21d - <unknown>
   7:     0x7ff7359c7e87 - <unknown>
   8:     0x7ff7359c9ef9 - <unknown>
   9:     0x7ff7359f32b5 - <unknown>
  10:     0x7ff7359f33c3 - <unknown>
  11:     0x7ff73577a274 - <unknown>
  12:     0x7ff7357857fb - <unknown>
  13:     0x7ff7359cdb1c - <unknown>
  14:     0x7ffd6567117e - BaseThreadInitThunk
  15:     0x7ffd663442db - RtlUserThreadStart
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: SendError { .. }', src\terminal\impl_win\terminal.rs:249:52
stack backtrace:
   0:     0x7ff7359c757f - <unknown>
   1:     0x7ff7359def8a - <unknown>
   2:     0x7ff7359c02f9 - <unknown>
   3:     0x7ff7359c9d6b - <unknown>
   4:     0x7ff7359c995e - <unknown>
   5:     0x7ff7359ca361 - <unknown>
   6:     0x7ff7359ca21d - <unknown>
   7:     0x7ff7359c7e87 - <unknown>
   8:     0x7ff7359c9ef9 - <unknown>
   9:     0x7ff7359f32b5 - <unknown>
  10:     0x7ff7359f33c3 - <unknown>
  11:     0x7ff7357796c6 - <unknown>
  12:     0x7ff7357854f5 - <unknown>
  13:     0x7ff7359cdb1c - <unknown>
  14:     0x7ffd6567117e - BaseThreadInitThunk
  15:     0x7ffd663442db - RtlUserThreadStart

It only seems to happen when the window is large, and when the command is executed soon after starting the recording

Demo: https://asciinema.org/a/3OiCukK9QIST6x1w5nSYihJGx
Here it works fine: https://asciinema.org/a/NWSQI94bKJKBfpi3XTqAg0e0g
Also seems to happen on an infinite loop, when doing:

for (;;) { ascii-image-converter FeelsDankMan.png -b --threshold 109 -W 30 | dotacat }

Demo for infinite loop: https://asciinema.org/a/cya0M11mhyfXfvKcXLqjj3ztJ

OS: Windows 10
Shell: PowerShell v7.3.0-preview.7
Terminal: alacritty 0.10.1 (2844606)

@brian6932
Copy link
Author

brian6932 commented Aug 19, 2022

Even if there is no loop, it can still occur if this command is done early enough:

ascii-image-converter FeelsDankMan.png -b --threshold 109 -W 30 | dotacat

image

@ibigbug ibigbug added the bug Something isn't working label Aug 21, 2022
@ibigbug ibigbug self-assigned this Aug 21, 2022
@ibigbug ibigbug mentioned this issue Aug 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants