Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign up"called `Result::unwrap()` on an `Err` value: Utf8Error { valid_up_to: 2 }" ICE in stable #33778
Comments
This comment has been minimized.
This comment has been minimized.
|
@netvl Try doing a |
This comment has been minimized.
This comment has been minimized.
|
@Diggsey Can (probably) confirm. I got this same error when switching from nightly-msvc to stable-gnu after aborting a build. |
jordanbray
referenced this issue
May 22, 2016
Closed
Error compiling on stable, works in nightly #33799
This comment has been minimized.
This comment has been minimized.
mkollaro
commented
May 23, 2016
|
Same here. I'm not sure what caused it, but I was switching around between nightly and stable before. Works in nightly, fails in stable. Once it started happening, it was happening every time. Running
|
steveklabnik
added
the
I-ICE
label
May 24, 2016
This comment has been minimized.
This comment has been minimized.
|
I got the same error running It's probably unrelated but just before it panicked I set up the new error format with I have a file in extern crate my_crate;
#[test]
...And the panic did not occur when I commented out When I changed the code and it compiled with nightly I was able to compile with stable again.
|
This was referenced May 31, 2016
This comment has been minimized.
This comment has been minimized.
|
This seems to be getting lots of hits, is something that's fixed on nightly? Perhaps something that can be backported to beta? |
alexcrichton
added
I-nominated
T-compiler
labels
May 31, 2016
alexcrichton
referenced this issue
May 31, 2016
Closed
rustbuild: `make clean` doesn't clean enough #33986
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton I'm not sure what's causing this -- you think it's a rustc bug? |
This comment has been minimized.
This comment has been minimized.
|
@nikomatsakis yes:
This may be fixed on both nightly and beta, as the only transition I can get to break is nightly to stable. I basically just want to confirm that we know what happened here and that it is indeed fixed and future-proofed. |
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton hmm maybe I'm just being dense but I at least don't know what caused this and/or if it is fixed. =) |
This was referenced Jun 1, 2016
This comment has been minimized.
This comment has been minimized.
|
I suspect the problem is due to the fact that I changed the crate hash from being a string to being a u64. It seems to me to be sort of a cargo bug -- like, why are we seeing stale metadata from a different version of the compiler? But I don't quite know how this system interacts. @alexcrichton let's chat. :) |
nikomatsakis
removed
the
I-nominated
label
Jun 2, 2016
This comment has been minimized.
This comment has been minimized.
|
triage: P-high |
rust-highfive
added
the
P-high
label
Jun 2, 2016
This comment has been minimized.
This comment has been minimized.
|
The stale metadata may be sticking around because Cargo doesn't clean out old libraries, and when the compiler is specifically looking for the If it's the case that this is the crate hash, there's probably nothing we can do about this other than issuing a point release, and it doesn't seem worth it to do that... |
This comment has been minimized.
This comment has been minimized.
|
Could rustc make sure to only use panic-free code up until the point where it's read the metadata version, and give a helpful error message instead of ICEing? |
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton I could go back to putting a string in metadata instead of just writing a u64, I guess |
This comment has been minimized.
This comment has been minimized.
|
I'll have to go poke at the code |
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton hmm for some reason I'm not seeing that failure you suggested locally... |
This comment has been minimized.
This comment has been minimized.
plumenator
commented
Jun 8, 2016
|
This can also be reproduced using rustup. $ rustup run nightly -- cargo build
# Suceeds
$ rustup run stable -- cargo build
# ICE |
This comment has been minimized.
This comment has been minimized.
|
Same error, on stable only. A |
jonas-schievink
referenced this issue
Jun 11, 2016
Closed
Compiler panic with unknown identifier followed by function call in if statement #34217
This comment has been minimized.
This comment has been minimized.
cholcombe973
commented
Jun 21, 2016
|
I'm hitting this also but a cargo clean doesn't fix it. |
brson
added
the
regression-from-stable-to-nightly
label
Jun 23, 2016
This comment has been minimized.
This comment has been minimized.
|
@rust-lang/lang Can somebody be assigned to this one? It's P-high. |
brson
added
the
I-nominated
label
Jun 23, 2016
This comment has been minimized.
This comment has been minimized.
|
arguably this is perhaps not a regression... @arielb1 says the problem is caused by new versions of the compiler generating metadata that old versions of rustc cannot handle. (We are supposed to have a metadata guard but the issue arises before the metadata guard fires.) |
This comment has been minimized.
This comment has been minimized.
|
Issues here:
|
This comment has been minimized.
This comment has been minimized.
|
simplest thing may be to just go back to writing a string instead of a u64, if someone knows the precise place that @nikomatsakis was referring to in his comment above. |
netvl commentedMay 21, 2016
I suddenly got the following error when compiling my crate:
Here are the crate sources: immeta.zip
Apparently there is no such error on travis, so I think this may be caused by some weird interaction of rustc with rustup, but I don't know for sure.
rustc version:
cargo version:
rustup version: