-
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
rust compiler crash #117017
Comments
Do you still get this crash after running |
Cargo clean didn't fix the issue. During my last compilation attempt I got a pop up window from macOS stating that applications used all available memory and asking to 'force quit' some of them, this was not sufficient and I got to restart my mac ... So testing code modification to get rid of this issue is not easy ... the compilation attempt is very very long and now result in crashing my computer
|
I identify the problematic lines (searching among my latest code modification). It appears that the issue is in the display function, the compiler crash if I try to lef align the number and work fine if I don't : write!(f, "{:4} ", self.matrix_na[(i, j)])?; write!(f, "{:<4} ", self.matrix_na[(i, j)])?; in the function impl fmt::Display for ScoreMat {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
for c in ALL_RESIDUES {
write!(f, "{} ", c)?;
}
writeln!(f)?;
for i in 0..DIM {
for j in 0..DIM {
write!(f, "{:4} ", self.matrix_na[(i, j)])?;
}
writeln!(f)?;
}
write!(f, "")
}
} So I can move forward... I hope this extra bit of information will help you fix the compiler bug. |
I was too optimistic ... I try adding a few lines of codes (not modifying the display function) and the compiler crashed again ... So sometime the compiler crash everytime, even after cargo clean, and sometimes (when I comment/change a problematic line of code and I think I got it fixed), I have to cargo clean before every build to get it working. I'm on a MacBook Air M2 so this is maybe partly related to this issue shekohex/flutterust#21 |
I fixed this ICE in #113562. If you update to the latest stable, probably with |
Following your advice I have updated to the latest stable version.
It no longer crash but it still fail to compile without cargo clean. I now got " error: linking with |
The problem now is that you are trying to I think it's technically possible for ELF to support this, but by default relocation offsets or something are 32 bits. And in any case, you probably don't mean to do be doing what you're doing. |
Thanks for your rapid answers, and for fixing my code ;)
to
fixed all my problems. I'm new to rust and was previously using Java where one can pack data files within the distributed jar file and access them, I kind of struggled to find information on how to do this in Rust. I erroneously assumed the include_dir macro was just a way to get the correct path toward the data files packed within the executable version of the project and I didn't realized that it was an instruction to copy the folder, which in my case is already in the project folder... |
I added the '.txt' extension to the BLOSUM62 file to be able to upload it. I've just started trying to use Rust, and this is a work in progress, but the compiler crash is holding me back since I have no idea how to resolve this issue and continue working on the code.
Code
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: