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

ICE on unwrap on windows #38933

Closed
GuillaumeGomez opened this issue Jan 8, 2017 · 4 comments
Closed

ICE on unwrap on windows #38933

GuillaumeGomez opened this issue Jan 8, 2017 · 4 comments
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@GuillaumeGomez
Copy link
Member

GuillaumeGomez commented Jan 8, 2017

Here is the full output:

D:\process-viewer> cargo build
   Compiling process_viewer v0.0.4 (file:///D:/process-viewer)
error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: run with 'RUST_BACKTRACE=1' for a backtrace

thread 'rustc' panicked at 'called 'Result::unwrap()' on an 'Err' value: JoinPathsError { inner: JoinPathsError }', C:\bot\slave\nightly-dist-rustc-win-gnu-64\build\src\libcore\result.rs:845
stack backtrace:
   0:         0x6eab09f2 - <unknown>
   1:         0x6eab01d1 - <unknown>
   2:         0x6eab1bba - <unknown>
   3:         0x6eab1a56 - <unknown>
   4:         0x6eab1979 - <unknown>
   5:         0x6eab18fb - <unknown>
   6:         0x6eac1a55 - <unknown>
   7:         0x6cf0d86f - <unknown>
   8:         0x6cfc95e5 - <unknown>
   9:         0x6cfbfbd3 - <unknown>
  10:         0x6cfb7806 - <unknown>
  11:         0x6d006e56 - <unknown>
  12:         0x6cf0ae35 - <unknown>
  13:         0x6eab4fb8 - <unknown>
  14:         0x6cf29054 - <unknown>
  15:         0x6eaae482 - <unknown>
  16:     0x7ffa36618363 - <unknown>

error: Could not compile 'process_viewer'.

To learn more, run the command again with --verbose.

I'm running on windows with the following version:

D:\process-viewer>rustc --version
rustc 1.16.0-nightly (4ecc85beb 2016-12-28)

And here is the "problematic" code:

#[cfg(target_os = "windows")]
extern crate pkg_config;

#[cfg(target_os = "windows")]
fn main() {
    use std::env;
    let libs_to_find = ["glib-2.0", "gobject-2.0", "pango-1.0", "gio-2.0", "atk-1.0",
                        "gdk-pixbuf-2.0", "cairo", "gdk-3", "gtk-3"];
    if let Ok(lib_dir) = env::var("GTK_LIB_DIR") {
        for lib_ in libs_to_find.iter() {
            println!("cargo:rustc-link-lib=dylib={}", lib_);
        }
        println!("cargo:rustc-link-search=native={}", lib_dir);
    } else {
        for lib in libs_to_find.iter() {
            pkg_config::probe_library(lib).unwrap();
        }
    }
}

#[cfg(not(target_os = "windows"))]
fn main() {}

I have put the problematic branch/PR here.

@ollie27
Copy link
Member

ollie27 commented Jan 8, 2017

What's the value of the PATH and GTK_LIB_DIR environment variables? They need to not contain any "s.

@ollie27
Copy link
Member

ollie27 commented Jan 8, 2017

rustc -L """ hello.rs produces what might be the same crash on x86_64-pc-windows-msvc rustc 1.16.0-nightly (47c8d9fdc 2017-01-08):

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: run with `RUST_BACKTRACE=1` for a backtrace

thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: JoinPathsError { inner: JoinPathsError }', C:\bot\slave\nightly-dist-rustc-win-msvc-64\build\src\libcore\result.rs:845
stack backtrace:
   0:     0x7ffea9fdfe70 - std::panicking::Location::line::h8c528bbdf4eef8a3
   1:     0x7ffea9fdf2f2 - std::panicking::Location::line::h8c528bbdf4eef8a3
   2:     0x7ffea9fe2d3d - std::panicking::rust_panic_with_hook::h7abc6e334345e341
   3:     0x7ffea9fe2b88 - std::panicking::begin_panic_fmt::h661e01bdd0e9618c
   4:     0x7ffea9fe2af4 - std::panicking::begin_panic_fmt::h661e01bdd0e9618c
   5:     0x7ffea9fe2a89 - rust_begin_unwind
   6:     0x7ffea9ff3d87 - core::panicking::panic_fmt::hf3abcb5bc11ff49d
   7:     0x7ffeaa240bd6 - <unknown>
   8:     0x7ffeaa32752c - rustc_driver::driver::count_nodes::h761a1dba824a4f1e
   9:     0x7ffeaa31b822 - rustc_driver::driver::count_nodes::h761a1dba824a4f1e
  10:     0x7ffeaa30f4b5 - rustc_driver::driver::compile_input::h44e43be0fc34a1a1
  11:     0x7ffeaa3658a7 - rustc_driver::run_compiler::h5e34a930c0929e5c
  12:     0x7ffeaa23e1ce - <unknown>
  13:     0x7ffea9fe5e01 - _rust_maybe_catch_panic
  14:     0x7ffeaa26c836 - <unknown>
  15:     0x7ffea9fdd33e - std::sys::imp::thread::Thread::new::h7a1b2b1b6bab390a
  16:     0x7ffede858363 - BaseThreadInitThunk

edit: This is probably a dupe of #23667 and/or #32891.

@GuillaumeGomez
Copy link
Member Author

There is not supposed to have any but I can't confirm it right now.

@sanxiyn sanxiyn added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Jan 9, 2017
@GuillaumeGomez
Copy link
Member Author

@ollie27: I'm working on it.

bors added a commit that referenced this issue Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

3 participants