Skip to content

static call to invalid vtable: VtableObject(VtableObject(object_ty=error::Error + 'static)) #21200

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
JoelLarson opened this issue Jan 15, 2015 · 3 comments
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@JoelLarson
Copy link

Tried using the iron framework on Mac OS X Yosemite 10.10.1 with rustc 1.0.0-nightly (170c4399e 2015-01-14 00:41:55 +0000) and run into this issue. I have been trying to compile this with rust since 2015-01-12 version.

I'm not very knowledgable with the language itself or any systems programming languages, so if anything else is required for information, I'll reply ASAP.

Thanks!

#![allow(unstable)]

extern crate iron;

use iron::prelude::*;
use iron::status;

fn main() {

  fn hello_world(_req: &mut Request) -> IronResult<Response> {
    Ok(Response::with((status::Ok, "Hello World!")))
  }

  let web_server = Iron::new(hello_world);

  web_server.listen("localhost:3000").unwrap();

  println!("On 3000");
}
Joels-MacBook-Pro:testing joellarson$ RUST_BACKTRACE=1 cargo build --verbose
       Fresh mucell v0.1.10
       Fresh gcc v0.1.4
       Fresh typeable v0.0.7
       Fresh matches v0.1.2
       Fresh rustc-serialize v0.2.7
       Fresh pkg-config v0.1.4
       Fresh modifier v0.0.7
       Fresh unicase v0.0.2
       Fresh unsafe-any v0.2.1
       Fresh regex v0.1.10
       Fresh phantom v0.0.3
       Fresh error v0.1.1
       Fresh url v0.2.16
       Fresh log v0.1.9
       Fresh typemap v0.0.7
       Fresh mime v0.0.6
       Fresh plugin v0.2.0
       Fresh time v0.1.12
       Fresh openssl-sys v0.2.15
       Fresh openssl v0.2.15
       Fresh cookie v0.1.8
       Fresh hyper v0.1.0
       Fresh iron v0.0.12
   Compiling testing v0.0.1 (file:///Users/joellarson/Desktop/testing)
     Running `rustc /Users/joellarson/Desktop/testing/src/main.rs --crate-name testing --crate-type bin -g --out-dir /Users/joellarson/Desktop/testing/target --emit=dep-info,link -L dependency=/Users/joellarson/Desktop/testing/target -L dependency=/Users/joellarson/Desktop/testing/target/deps --extern iron=/Users/joellarson/Desktop/testing/target/deps/libiron-937a4530a2de6745.rlib -L native=/usr/lib -L native=/Users/joellarson/Desktop/testing/target/build/time-7c7fc3eb0c12ad75/out`
error: internal compiler error: static call to invalid vtable: VtableObject(VtableObject(object_ty=error::Error + 'static))
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/src/libsyntax/diagnostic.rs:182

stack backtrace:
   1:        0x1099c542c - sys::backtrace::write::hdb7f697d27de389bRUt
   2:        0x1099e70cf - failure::on_fail::hc3e325285010b54dIYz
   3:        0x109953d8e - rt::unwind::begin_unwind_inner::h36a19ac9f276bc4fyGz
   4:        0x10763e12f - rt::unwind::begin_unwind::h12427766859804144783
   5:        0x10763ea9b - diagnostic::Handler::bug::h4388eb3258e711c3A1F
   6:        0x106c0bd00 - metadata::tydecode::parse_existential_bounds_::h3194231158501185017
   7:        0x106382566 - trans::meth::trans_static_method_callee::ha5eb63d60b5595e3ldz
   8:        0x10637f384 - trans::callee::trans::h76890ac62fc507d2Aag
   9:        0x10638838e - trans::callee::trans_call_inner::h1156024838687242042
  10:        0x10638efc3 - trans::expr::trans_rvalue_dps_unadjusted::haaa64df86d8f51f43Si
  11:        0x10634670b - trans::expr::trans_into::h5aef78bf9a4e7f6dMyh
  12:        0x106347298 - trans::controlflow::trans_block::h6b5de6eb7d02efc8C3d
  13:        0x10640f0ac - trans::base::trans_closure::hc19f8000b1806971y0t
  14:        0x106332937 - trans::base::trans_fn::h681d426bfa056ab5dbu
  15:        0x1063344b3 - trans::monomorphize::monomorphic_fn::h5816f05940831b2dFpd
  16:        0x106384089 - trans::callee::trans_fn_ref_with_substs::haadc472d75988beaIxg
  17:        0x10638284e - trans::meth::trans_static_method_callee::ha5eb63d60b5595e3ldz
  18:        0x1063accbb - trans::expr::trans_def_fn_unadjusted::h4bcf18d21a58877cqfj
  19:        0x1063a4720 - trans::expr::trans_def::hca0fe9c0c2d940f8yIi
  20:        0x10638ccd6 - trans::expr::trans_unadjusted::h0735e2024f7ef4d2Qji
  21:        0x106347716 - trans::expr::trans::h4ea42cb60041647egCh
  22:        0x106358541 - trans::callee::trans_args::h410c047778d877aczch
  23:        0x106389258 - trans::callee::trans_call_inner::h1156024838687242042
  24:        0x10638efc3 - trans::expr::trans_rvalue_dps_unadjusted::haaa64df86d8f51f43Si
  25:        0x10634670b - trans::expr::trans_into::h5aef78bf9a4e7f6dMyh
  26:        0x106447609 - trans::tvec::write_content::hde07101d16564dc0XHy
  27:        0x10638ebe1 - trans::expr::trans_rvalue_dps_unadjusted::haaa64df86d8f51f43Si
  28:        0x10634670b - trans::expr::trans_into::h5aef78bf9a4e7f6dMyh
  29:        0x10642a9f4 - trans::_match::trans_match_inner::hc02d383154268dc5rkx
  30:        0x10638e28b - trans::expr::trans_rvalue_dps_unadjusted::haaa64df86d8f51f43Si
  31:        0x10638ca0a - trans::expr::trans_unadjusted::h0735e2024f7ef4d2Qji
  32:        0x106347716 - trans::expr::trans::h4ea42cb60041647egCh
  33:        0x1063a78d8 - trans::expr::trans_addr_of::h93887aee9b739adcHKj
  34:        0x10638cea1 - trans::expr::trans_unadjusted::h0735e2024f7ef4d2Qji
  35:        0x106347716 - trans::expr::trans::h4ea42cb60041647egCh
  36:        0x106358541 - trans::callee::trans_args::h410c047778d877aczch
  37:        0x106389258 - trans::callee::trans_call_inner::h1156024838687242042
  38:        0x10638efc3 - trans::expr::trans_rvalue_dps_unadjusted::haaa64df86d8f51f43Si
  39:        0x10638ca0a - trans::expr::trans_unadjusted::h0735e2024f7ef4d2Qji
  40:        0x106347716 - trans::expr::trans::h4ea42cb60041647egCh
  41:        0x106358541 - trans::callee::trans_args::h410c047778d877aczch
  42:        0x10638a7ae - trans::callee::trans_call_inner::h4203845190985061913
  43:        0x10638da36 - trans::expr::trans_rvalue_dps_unadjusted::haaa64df86d8f51f43Si
  44:        0x10634670b - trans::expr::trans_into::h5aef78bf9a4e7f6dMyh
  45:        0x106347298 - trans::controlflow::trans_block::h6b5de6eb7d02efc8C3d
  46:        0x10640f0ac - trans::base::trans_closure::hc19f8000b1806971y0t
  47:        0x106332937 - trans::base::trans_fn::h681d426bfa056ab5dbu
  48:        0x1063344b3 - trans::monomorphize::monomorphic_fn::h5816f05940831b2dFpd
  49:        0x106384089 - trans::callee::trans_fn_ref_with_substs::haadc472d75988beaIxg
  50:        0x10638284e - trans::meth::trans_static_method_callee::ha5eb63d60b5595e3ldz
  51:        0x1063accbb - trans::expr::trans_def_fn_unadjusted::h4bcf18d21a58877cqfj
  52:        0x1063a4720 - trans::expr::trans_def::hca0fe9c0c2d940f8yIi
  53:        0x10638ccd6 - trans::expr::trans_unadjusted::h0735e2024f7ef4d2Qji
  54:        0x106347716 - trans::expr::trans::h4ea42cb60041647egCh
  55:        0x106358541 - trans::callee::trans_args::h410c047778d877aczch
  56:        0x106389258 - trans::callee::trans_call_inner::h1156024838687242042
  57:        0x10638efc3 - trans::expr::trans_rvalue_dps_unadjusted::haaa64df86d8f51f43Si
  58:        0x10634670b - trans::expr::trans_into::h5aef78bf9a4e7f6dMyh
  59:        0x106447609 - trans::tvec::write_content::hde07101d16564dc0XHy
  60:        0x10638ebe1 - trans::expr::trans_rvalue_dps_unadjusted::haaa64df86d8f51f43Si
  61:        0x10634670b - trans::expr::trans_into::h5aef78bf9a4e7f6dMyh
  62:        0x10642a9f4 - trans::_match::trans_match_inner::hc02d383154268dc5rkx
  63:        0x10638e28b - trans::expr::trans_rvalue_dps_unadjusted::haaa64df86d8f51f43Si
  64:        0x10638ca0a - trans::expr::trans_unadjusted::h0735e2024f7ef4d2Qji
  65:        0x106347716 - trans::expr::trans::h4ea42cb60041647egCh
  66:        0x1063a78d8 - trans::expr::trans_addr_of::h93887aee9b739adcHKj
  67:        0x10638cea1 - trans::expr::trans_unadjusted::h0735e2024f7ef4d2Qji
  68:        0x106347716 - trans::expr::trans::h4ea42cb60041647egCh
  69:        0x106358541 - trans::callee::trans_args::h410c047778d877aczch
  70:        0x106389258 - trans::callee::trans_call_inner::h1156024838687242042
  71:        0x10638efc3 - trans::expr::trans_rvalue_dps_unadjusted::haaa64df86d8f51f43Si
  72:        0x10638ca0a - trans::expr::trans_unadjusted::h0735e2024f7ef4d2Qji
  73:        0x106347716 - trans::expr::trans::h4ea42cb60041647egCh
  74:        0x106358541 - trans::callee::trans_args::h410c047778d877aczch
  75:        0x106389258 - trans::callee::trans_call_inner::h1156024838687242042
  76:        0x10638efc3 - trans::expr::trans_rvalue_dps_unadjusted::haaa64df86d8f51f43Si
  77:        0x10634670b - trans::expr::trans_into::h5aef78bf9a4e7f6dMyh
  78:        0x106347298 - trans::controlflow::trans_block::h6b5de6eb7d02efc8C3d
  79:        0x10638e59b - trans::expr::trans_rvalue_dps_unadjusted::haaa64df86d8f51f43Si
  80:        0x10634670b - trans::expr::trans_into::h5aef78bf9a4e7f6dMyh
  81:        0x10642a9f4 - trans::_match::trans_match_inner::hc02d383154268dc5rkx
  82:        0x10638e28b - trans::expr::trans_rvalue_dps_unadjusted::haaa64df86d8f51f43Si
  83:        0x10634670b - trans::expr::trans_into::h5aef78bf9a4e7f6dMyh
  84:        0x106347298 - trans::controlflow::trans_block::h6b5de6eb7d02efc8C3d
  85:        0x10640f0ac - trans::base::trans_closure::hc19f8000b1806971y0t
  86:        0x106332937 - trans::base::trans_fn::h681d426bfa056ab5dbu
  87:        0x1063344b3 - trans::monomorphize::monomorphic_fn::h5816f05940831b2dFpd
  88:        0x106384089 - trans::callee::trans_fn_ref_with_substs::haadc472d75988beaIxg
  89:        0x106381b83 - trans::callee::trans_fn_ref::h9cbd6741cc72124fTlg
  90:        0x10635f2dd - trans::meth::trans_method_callee::h6edd4c4662a3051227y
  91:        0x1063898f4 - trans::callee::trans_call_inner::h4203845190985061913
  92:        0x10638da36 - trans::expr::trans_rvalue_dps_unadjusted::haaa64df86d8f51f43Si
  93:        0x10638ca0a - trans::expr::trans_unadjusted::h0735e2024f7ef4d2Qji
  94:        0x106347716 - trans::expr::trans::h4ea42cb60041647egCh
  95:        0x1063459e5 - trans::controlflow::trans_stmt_semi::h31d22e492a026488L2d
  96:        0x106346f87 - trans::controlflow::trans_block::h6b5de6eb7d02efc8C3d
  97:        0x10640f0ac - trans::base::trans_closure::hc19f8000b1806971y0t
  98:        0x106332937 - trans::base::trans_fn::h681d426bfa056ab5dbu
  99:        0x10632dfdb - trans::base::trans_item::h970b17007f7423b0yyu
  100:        0x10641522c - trans::base::trans_crate::h092473b9f8aaff97fuv
 ... <frames omitted>

Could not compile `testing`.

Caused by:
  Process didn't exit successfully: `rustc /Users/joellarson/Desktop/testing/src/main.rs --crate-name testing --crate-type bin -g --out-dir /Users/joellarson/Desktop/testing/target --emit=dep-info,link -L dependency=/Users/joellarson/Desktop/testing/target -L dependency=/Users/joellarson/Desktop/testing/target/deps --extern iron=/Users/joellarson/Desktop/testing/target/deps/libiron-937a4530a2de6745.rlib -L native=/usr/lib -L native=/Users/joellarson/Desktop/testing/target/build/time-7c7fc3eb0c12ad75/out` (status=101)
@jdm jdm added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Jan 15, 2015
@mkaufmann
Copy link

I am not sure but this looks a lot like #20676 . There seems to be a fix in #21089. If you need it urgently you could try to built rust yourself from that version. Don't know about the timeline when it will be merged into rust

@JoelLarson
Copy link
Author

Crap. I'd have not posted about this if search would have returned with that result. I agree that it is most likely the same problem. I will test it when I get some time and report back.

@tamird
Copy link
Contributor

tamird commented Apr 21, 2015

Looks like this was a dupe of #20676 which was fixed in #21089. @steveklabnik close?

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

5 participants