-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
thread '<main>' panicked at 'failed printing to stdout: text was not valid unicode', ../src/libstd\io\stdio.rs:605 #30399
Comments
cc #23344 |
Related to #23344
Regardless of a proper approach to all of #23344, dealing with this case would be a good interim fix. |
This code crashes with the same error. let v = vec![255u8; 5000];
let s = String::from_utf8_lossy(&v);
// println!("Len {}", s.len());
println!("{}", s); |
I suppose it was inevitable that someone would run into this edge case of how we handle unicode in the console on Windows. |
I believe that this is an unfortunate result of #23344, so I'm going to close in favor of that (as that's the issue at hand here), but thanks for the report! |
The following program crashes with the following error:
Unfortunately I could not reduce the size further, if I remove larger blocks the fault disappear and I couldn't be bothered to figure out what exactly can be removed by removing single bytes:)
The fault does not appear in the playground. Possibly windows related?
The used rustc version:
rustc 1.7.0-nightly (110df04 2015-12-13) (MSVC edition)
It is running on windows 8.1 64bit.
The text was updated successfully, but these errors were encountered: