Skip to content

rustc panicked at 'LocalTableInContext: key not found', libcore/option.rs:960:5 #51798

Closed

Description

I'm sorry, I haven't reduced this at all, and I'm sure the code is awful, but the error message said you'd appreciate a bug report.

I tried this code:

jeremyBanks/0dmg@ae3b7d2
using cargo clean && RUST_BACKTRACE=1 cargo run --verbose

I expected to see this happen: my program would run, or the compiler would give one of its typical helpful error messages!

Instead, this happened:

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: rustc 1.28.0-nightly (01cc982e9 2018-06-24) running on x86_64-unknown-linux-gnu

note: compiler flags: -C debuginfo=2 -C incremental --crate-type bin

note: some of the compiler flags provided by cargo are hidden

Meta

I am using the Windows Linux Subsystem thing with Debian or Ubuntu, I think.

rustc --version --verbose:

rustc 1.28.0-nightly (01cc982e9 2018-06-24)
binary: rustc
commit-hash: 01cc982e936120acb0424e41de14e42ba2d88c6f
commit-date: 2018-06-24
host: x86_64-unknown-linux-gnu
release: 1.28.0-nightly
LLVM version: 6.0

cargo --version --verbose:

cargo 1.28.0-nightly (e2348c2db 2018-06-07)
release: 1.28.0
commit-hash: e2348c2db296ce33428933c3ab8786d5f3c54a2e
commit-date: 2018-06-07

Backtrace:

error: internal compiler error: no type-dependent def for method call                                                                                                                        
  --> src/server.rs:48:17                                                                                                                                                                    
   |                                                                                                                                                                                         
48 |                 display.write_to(&mut encoded_image, image::ImageOutputFormat::PNG);                                                                                                    
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                     
                                                                                                                                                                                             
thread 'rustc' panicked at 'LocalTableInContext: key not found', libcore/option.rs:960:5                                                                                                     
stack backtrace:                                                                                                                                                                             
   0:     0x7f6d10abf07e - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h1b3a1496bdd47d5b                                                                                      
                               at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49                                                                                                              
   1:     0x7f6d10a96046 - std::sys_common::backtrace::print::h2f040662be69463e                                                                                                              
                               at libstd/sys_common/backtrace.rs:71                                                                                                                          
                               at libstd/sys_common/backtrace.rs:59                                                                                                                          
   2:     0x7f6d10ac60ed - std::panicking::default_hook::{{closure}}::h796d09e60146b74e                                                                                                      
                               at libstd/panicking.rs:211                                                                                                                                    
   3:     0x7f6d10ac5e60 - std::panicking::default_hook::h591ad3dc45e922d2                                                                                                                   
                               at libstd/panicking.rs:227                                                                                                                                    
   4:     0x7f6d0d0ed855 - rustc::util::common::panic_hook::h93012055300dea77                                                                                                                
   5:     0x7f6d10ac6873 - std::panicking::rust_panic_with_hook::h704ba6b5b270af4d                                                                                                           
                               at libstd/panicking.rs:515                                                                                                                                    
   6:     0x7f6d10ac65c9 - std::panicking::continue_panic_fmt::hf3634b62bc28487a                                                                                                             
                               at libstd/panicking.rs:426                                                                                                                                    
   7:     0x7f6d10ac6315 - rust_begin_unwind                                                                                                                                                 
                               at libstd/panicking.rs:337                                                                                                                                    
   8:     0x7f6d10b4025b - core::panicking::panic_fmt::hf24f6f6052fa35b2                                                                                                                     
                               at libcore/panicking.rs:92                                                                                                                                    
   9:     0x7f6d10b18bd1 - core::option::expect_failed::hcb17cddc36ef26d5                                                                                                                    
                               at libcore/option.rs:960                                                                                                                                      
  10:     0x7f6d0f62519a - <rustc_privacy::TypePrivacyVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_expr::h9e6d5b384161a649                                             
  11:     0x7f6d0f60820b - rustc::hir::intravisit::walk_local::h9923da8b04f99efa                                                                                                             
  12:     0x7f6d0f607dae - rustc::hir::intravisit::walk_block::h33929fd27434ca57                                                                                                             
  13:     0x7f6d0f62512c - <rustc_privacy::TypePrivacyVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_expr::h9e6d5b384161a649                                             
  14:     0x7f6d0f60820b - rustc::hir::intravisit::walk_local::h9923da8b04f99efa                                                                                                             
  15:     0x7f6d0f607dae - rustc::hir::intravisit::walk_block::h33929fd27434ca57                                                                                                             
  16:     0x7f6d0f62512c - <rustc_privacy::TypePrivacyVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_expr::h9e6d5b384161a649                                             
  17:     0x7f6d0f61671e - rustc::hir::intravisit::walk_expr::he552c42b919e1b81                                                                                                              
  18:     0x7f6d0f62512c - <rustc_privacy::TypePrivacyVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_expr::h9e6d5b384161a649                                             
  19:     0x7f6d0f62512c - <rustc_privacy::TypePrivacyVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_expr::h9e6d5b384161a649                                             
  20:     0x7f6d0f624d1c - <rustc_privacy::TypePrivacyVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_nested_body::hdc8c701d5e5bd510                                      
  21:     0x7f6d0f625cd8 - <rustc_privacy::TypePrivacyVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_impl_item::h072602c658b2a316                                        
  22:     0x7f6d0f617662 - rustc::hir::intravisit::walk_item::h470024412920b632                                                                                                              
  23:     0x7f6d0f6259ed - <rustc_privacy::TypePrivacyVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_item::ha50b33ab6440822d                                             
  24:     0x7f6d0f617976 - rustc::hir::intravisit::walk_item::h470024412920b632                                                                                                              
  25:     0x7f6d0f6259ed - <rustc_privacy::TypePrivacyVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_item::ha50b33ab6440822d                                             
  26:     0x7f6d0f628eb7 - rustc_privacy::privacy_access_levels::hd31f9a283676d277                                                                                                           
  27:     0x7f6d0ce0aa38 - rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::privacy_access_levels<'tcx>>::compute::hd400623c3414d3e2    
  28:     0x7f6d0cd51f03 - rustc::ty::context::tls::with_context::h03c6fdd2edf55524                                                                                                          
  29:     0x7f6d0cc70498 - rustc::dep_graph::graph::DepGraph::with_task_impl::ha5a5ab6b46058ac3                                                                                              
  30:     0x7f6d0cddee22 - rustc::ty::context::tls::with_related_context::ha15b602b83ee2289                                                                                                  
  31:     0x7f6d0cf02a32 - rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job::hbe6ac0c34ea931e3                                            
  32:     0x7f6d0cfc01b4 - rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query::h9b8bc4da9a1e7848                                                       
  33:     0x7f6d10e6c082 - rustc::util::common::time::h0fa6f741c87b6466                                                                                                                      
  34:     0x7f6d10f02332 - rustc::ty::context::tls::enter_context::h84146176419ecbc3                                                                                                         
  35:     0x7f6d10eb248a - <std::thread::local::LocalKey<T>>::with::heeb19f7ad79c895c                                                                                                        
  36:     0x7f6d10e19c52 - rustc::ty::context::TyCtxt::create_and_enter::h55f2408bc01b7235                                                                                                   
  37:     0x7f6d10e5d010 - rustc_driver::driver::compile_input::hcefbb4026998c8a0                                                                                                            
  38:     0x7f6d10ee7eab - rustc_driver::run_compiler_with_pool::hf3c65b5bd222c3ca                                                                                                           
  39:     0x7f6d10e4c95b - <scoped_tls::ScopedKey<T>>::set::h8edaec88de07c236                                                                                                                
  40:     0x7f6d10e221cd - syntax::with_globals::hb0aff83358220802                                                                                                                           
  41:     0x7f6d10eba4b2 - std::sys_common::backtrace::__rust_begin_short_backtrace::hbd943a03a0952add                                                                                       
  42:     0x7f6d10ad49e9 - __rust_maybe_catch_panic                                                                                                                                          
                               at libpanic_unwind/lib.rs:105                                                                                                                                 
  43:     0x7f6d10e59fbd - <F as alloc::boxed::FnBox<A>>::call_box::hbe51a9318c82f125                                                                                                        
  44:     0x7f6d10ac561a - std::sys_common::thread::start_thread::h9f808e1cb13674ec                                                                                                          
                               at /checkout/src/liballoc/boxed.rs:650                                                                                                                        
                               at libstd/sys_common/thread.rs:24                                                                                                                             
  45:     0x7f6d10a95015 - std::sys::unix::thread::Thread::new::thread_start::h668a95d388fe6493                                                                                              
                               at libstd/sys/unix/thread.rs:90                                                                                                                               
  46:     0x7f6d0acf76b9 - start_thread                                                                                                                                                      
  47:     0x7f6d1076741c - clone                                                                                                                                                             
  48:                0x0 - <unknown>                                                                                                                                                         
query stack during panic:                                                                                                                                                                    
#0 [privacy_access_levels] privacy access levels                                                                                                                                             
end of query stack                                                                                                                                                                           
error: aborting due to previous error                                                                                                                                                        
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions