Skip to content

Compiler panicked while executing cargo run #35872

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

Closed
Limeth opened this issue Aug 21, 2016 · 4 comments
Closed

Compiler panicked while executing cargo run #35872

Limeth opened this issue Aug 21, 2016 · 4 comments

Comments

@Limeth
Copy link

Limeth commented Aug 21, 2016

The compiler panicked while I was refractoring some code.

I tried this code:

I don't know what exactly caused it.
This is the code that causes the panic.
Limeth/euclider@f2a750b
I then found this prevents the panic.
Limeth/euclider@6490490

I expected to see this happen: Compilation errors displayed.

Instead, this happened: Compiler panicked.

Meta

rustc --version --verbose:

Compiling euclider v0.16.0 (file:///home/limeth/workspace/rust/euclider)
rustc 1.13.0-nightly (499484f56 2016-08-18)
binary: rustc
commit-hash: 499484f56d336f4628a6fa016626beb3ef21ba81
commit-date: 2016-08-18
host: x86_64-unknown-linux-gnu
release: 1.13.0-nightly
    Finished debug [unoptimized + debuginfo] target(s) in 0.5 secs

Backtrace:

$ env RUST_BACKTRACE=1 RUST_NEW_ERROR_FORMAT=1 cargo run --release -- --scene scenes/4d.json
   Compiling euclider v0.16.0 (file:///home/limeth/workspace/rust/euclider)
warning[E0122]: trait bounds are not (yet) enforced in type definitions
   --> src/universe/entity/surface.rs:256:1
    |
256 | pub type PaletteBlendFunction<C: Blend<Color=C> + ComponentWise> =
    | ^

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 `Option::unwrap()` on a `None` value', ../src/libcore/option.rs:326
stack backtrace:
   1:     0x7f0f4e993629 - std::sys::backtrace::tracing::imp::write::h482d45d91246faa2
   2:     0x7f0f4e9a3d1c - std::panicking::default_hook::_{{closure}}::h89158f66286b674e
   3:     0x7f0f4e9a2027 - std::panicking::default_hook::h9e30d428ee3b0c43
   4:     0x7f0f4e9a2838 - std::panicking::rust_panic_with_hook::h2224f33fb7bf2f4c
   5:     0x7f0f4e9a26d2 - std::panicking::begin_panic::hcb11a4dc6d779ae5
   6:     0x7f0f4e9a2600 - std::panicking::begin_panic_fmt::h310416c62f3935b3
   7:     0x7f0f4e9a2581 - rust_begin_unwind
   8:     0x7f0f4ea0daef - core::panicking::panic_fmt::hc5789f4e80194729
   9:     0x7f0f4ea0da1b - core::panicking::panic::h1953378f4b37b561
  10:     0x7f0f4d087f3c - rustc_typeck::check::compare_method::compare_impl_method::_{{closure}}::h08bef90d287aed42
  11:     0x7f0f4cfe4099 - rustc_typeck::check::compare_method::compare_impl_method::he3538453c2efe177
  12:     0x7f0f4cff8de2 - rustc_typeck::check::check_impl_items_against_trait::hb105ca8bb42a0b3d
  13:     0x7f0f4cff65a2 - rustc_typeck::check::check_item_type::hba3733559d49be1e
  14:     0x7f0f4cfeedeb - _<rustc_typeck..check..CheckItemTypesVisitor<'a, 'tcx> as rustc..hir..intravisit..Visitor<'tcx>>::visit_item::h369cacffbaa18923
  15:     0x7f0f4cff0ceb - rustc_typeck::check::check_item_types::h81e44a5d40f450fd
  16:     0x7f0f4d068323 - rustc_typeck::check_crate::h8ec8b2f490f5dc28
  17:     0x7f0f4ed82b03 - rustc_driver::driver::phase_3_run_analysis_passes::_{{closure}}::h45e03cee16dcf298
  18:     0x7f0f4ed4f546 - rustc_driver::driver::phase_3_run_analysis_passes::hc0de40cea97d81a1
  19:     0x7f0f4ed3bf02 - rustc_driver::driver::compile_input::hd9ecc57abd3cba85
  20:     0x7f0f4ed6e756 - rustc_driver::run_compiler::h184264500271cc39
  21:     0x7f0f4ecb48c2 - std::panicking::try::do_call::h17a7a17ad7240c5c
  22:     0x7f0f4e9b2086 - __rust_maybe_catch_panic
  23:     0x7f0f4ecce26a - _<F as alloc..boxed..FnBox<A>>::call_box::h93f9128277b2964a
  24:     0x7f0f4e9a03f2 - std::sys::thread::Thread::new::thread_start::he0bf102845911132
  25:     0x7f0f46cb9183 - start_thread
  26:     0x7f0f4e5db37c - clone
  27:                0x0 - <unknown>

error: Could not compile `euclider`.

To learn more, run the command again with --verbose.
@Limeth
Copy link
Author

Limeth commented Aug 21, 2016

I updated the issue with a correct link, sorry for the confusion.

@Limeth
Copy link
Author

Limeth commented Aug 21, 2016

This fixed the panic: Limeth/euclider@6490490

@TimNN
Copy link
Contributor

TimNN commented Aug 21, 2016

Duplicate of #35869

@Limeth
Copy link
Author

Limeth commented Aug 21, 2016

Thanks for investigating.

@Limeth Limeth closed this as completed Aug 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants