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

Compiler panics when compiling a project in OneDrive #49895

Closed
Aryathel opened this issue Apr 12, 2018 · 7 comments
Closed

Compiler panics when compiling a project in OneDrive #49895

Aryathel opened this issue Apr 12, 2018 · 7 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ O-windows Operating system: Windows T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Aryathel
Copy link

Aryathel commented Apr 12, 2018

Issue

So I have been getting into rust recently, came across this error, and nobody I ask has any idea how to work with it. I am working on chapter 3.3, dealing with function, which I understand the logic of because it is vey similar to other languages. All my code is run using:

cargo run

The first set of code I run is:

fn main() {
    another_function(5);
}

fn another_function(x: i32) {
    println!("The value of x is: {}", x);
}

Then I try to run:

fn main() {
    another_function(5, 6);
}

fn another_function(x: i32, y: i32) {
    println!("The value of x is: {}", x);
    println!("The value of y is: {}", y);
}

The first one works fine, but then when I try to run the second set of code (again using "cargo run"), it returns this error:
rusterror

Updates

About an hour later, I have tried many different methods to no avail, including completely uninstalling rust, using "rustup self uninstall" and then reinstalling.

I can get it to work again by deleting the target folder, then running "cargo clean" ("cargo clean" does not run until the target folder is deleted), and then using "cargo run", but then as soon as any new changes are made it breaks again.

(Also I apologize for any lack of proper formatting in the error message, I am new to github as well.)

Meta

rustc 1.25.0 (84203ca 2018-03-25)
binary: rustc
commit-hash: 84203ca
commit-date: 2018-03-25
host: x86_64-pc-windows-msvc
release: 1.25.0
LLVM version: 6.0

@pietroalbini pietroalbini added O-windows Operating system: Windows I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. labels Apr 12, 2018
@pietroalbini
Copy link
Member

cc @retep998

@Aryathel
Copy link
Author

I am now closing this issue, it turns out that the folder I was storing everything in was automatically syncing to OneDrive, which meant the "target" folder was locking instead of being able to be overwritten by the "cargo run" command. I move the contents of the project to a folder that was not being synced to OneDrive and the problem was solved.

@cswl
Copy link

cswl commented Apr 12, 2018

We discussed this in Discord server.. then I noticed in the screenshot path the OneDrive
OneDrive might be locking the files during sync...

While this may affect only a small numbers of users...
The error message could be improved.. instead of panicking..

@pietroalbini
Copy link
Member

Yeah, the compiler should never panic, this is still a (diagnostics) bug.

@pietroalbini pietroalbini reopened this Apr 12, 2018
@pietroalbini pietroalbini added the A-diagnostics Area: Messages for errors, warnings, and lints label Apr 12, 2018
@pietroalbini pietroalbini changed the title New Guy, Working on the Rust Book, Strange Error Compiler panics when compiling a project in OneDrive Apr 12, 2018
@Aryathel
Copy link
Author

Oh alright, my mistake.

@pitdicker
Copy link
Contributor

Started investigating, and I think the issue was with how OneDrive started using a new method involving reparse points for dictionaries, that confused the standard library.

I am pretty sure this was fixed by #47956, but haven't tried to make a setup to test it. Issues with OneDrive started in december 2017 (#46484), and the fix landed in Rust 1.26 (this issue was with Rust 1.25).

Proposing to close.

@steveklabnik
Copy link
Member

Triage: with no comments since the previous post, I'm going to close this issue. If anyone can reproduce this bug today, please let me know and we'll re-open. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ O-windows Operating system: Windows T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants