Skip to content

thread 'main' panicked at 'called Result::unwrap() on an Err value: ParseFloatError { kind: Invalid }', crates/proc_macro_srv/src/rustc_server.rs:514:32 stack backtrace: #5974

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
0x8f701 opened this issue Sep 11, 2020 · 14 comments
Labels
S-unactionable Issue requires feedback, design decisions or is blocked on other work

Comments

@0x8f701
Copy link

0x8f701 commented Sep 11, 2020

## Output channel: Rust Analyzer Language Server Trace

[Error  - 2:37:27 PM] Request textDocument/codeLens failed.
  Message: Rust Analyzer is still loading...
  Code: -32801 
[Error  - 2:37:27 PM] Request textDocument/documentSymbol failed.
  Message: Rust Analyzer is still loading...
  Code: -32801 
[Error  - 2:37:29 PM] Request textDocument/codeLens failed.
  Message: Rust Analyzer is still loading...
  Code: -32801 
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseFloatError { kind: Invalid }', crates/proc_macro_srv/src/rustc_server.rs:514:32
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:78
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:59
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1076
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1537
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:62
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: 
std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:198
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:217
  10: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:526
  11: rust_begin_unwind
             at src/libstd/panicking.rs:437
  12: core::panicking::panic_fmt
             at src/libcore/panicking.rs:85
  13: core::option::expect_none_failed
             at src/libcore/option.rs:1269
  14: <proc_macro_srv::rustc_server::Rustc as proc_macro_srv::proc_macro::bridge::server::Literal>::f32
  15: <proc_macro_srv::proc_macro::bridge::server::Dispatcher<proc_macro_srv::
proc_macro::bridge::server::MarkedTypes<S>> as proc_macro_srv::proc_macro::bridge::server::DispatcherTrait>::dispatch
  16: <proc_macro_srv::proc_macro::bridge::closure::Closure<A,R> as core::convert::From<&mut F>>::from::call
  17: proc_macro::bridge::closure::Closure<A,R>::call
             at src/libproc_macro/bridge/closure.rs:27
  18: proc_macro::bridge::client::Literal::string::{{closure}}
             at src/libproc_macro/bridge/client.rs:237
  19: proc_macro::bridge::client::<impl proc_macro::bridge::Bridge>::with::{{closure}}
             at src/libproc_macro/bridge/client.rs:321
  20: 
proc_macro::bridge::client::BridgeState::with::{{closure}}::{{closure}}
             at src/libproc_macro/bridge/client.rs:286
  21: proc_macro::bridge::scoped_cell::ScopedCell<T>::replace
             at src/libproc_macro/bridge/scoped_cell.rs:74
  22: proc_macro::bridge::client::BridgeState::with::{{closure}}
             at src/libproc_macro/bridge/client.rs:284
  23: std::thread::local::LocalKey<T>::try_with
             at /rustc/4fb7144ed159f94491249e86d5bbd033b5d60550/src/libstd/thread/local.rs:262
  24: std::thread::local::LocalKey<T>::with
             at /rustc/4fb7144ed159f94491249e86d5bbd033b5d60550/src/libstd/thread/local.rs:239
  25: proc_macro::bridge::client::BridgeState::with
             at src/libproc_macro/bridge/client.rs:283
  26: proc_macro::bridge::client::<impl proc_macro::bridge::Bridge>::with
             at src/libproc_macro/bridge/client.rs:314
  27: proc_macro::bridge::
client::Literal::string
             at src/libproc_macro/bridge/client.rs:230
  28: proc_macro::Literal::string
             at src/libproc_macro/lib.rs:1034
  29: proc_macro2::imp::Literal::string
             at /home/cheng/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-1.0.19/src/wrapper.rs:824
  30: proc_macro2::Literal::string
             at /home/cheng/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-1.0.19/src/lib.rs:1133
  31: syn::lit::LitStr::new
             at /home/cheng/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.39/src/lit.rs:133
  32: failure_derive::fail_derive_impl
             at /home/cheng/.cargo/registry/src/github.com-1ecc6299db9ec823/failure_derive-0.1.8/src/lib.rs:50
  33: failure_derive::fail_derive
             at /home/cheng/.cargo/registry/src/github.com-1ecc6299db9ec823/failure_derive-0.1.8/src/lib.rs:37
  34: failure_derive::Fail
             at /home/cheng/.cargo/registry/src/github.com-1ecc6299db9ec823/failure_derive-0.1.8/<::synstructure::macros::decl_derive macros>:16
  35: core::ops::function::FnOnce::call_once
             at /rustc/4fb7144ed159f94491249e86d5bbd033b5d60550/src/libcore/ops/function.rs:232
  36: proc_macro::bridge::client::Client<fn(proc_macro::TokenStream) .> proc_macro::TokenStream>::expand1
::run::{{closure}}
             at /rustc/4fb7144ed159f94491249e86d5bbd033b5d60550/src/libproc_macro/bridge/client.rs:394
  37: proc_macro::bridge::client::run_client::{{closure}}::{{closure}}
             at /rustc/4fb7144ed159f94491249e86d5bbd033b5d60550/src/libproc_macro/bridge/client.rs:362
  38: proc_macro::bridge::scoped_cell::ScopedCell<T>::set::{{closure}}
             at /rustc/4fb7144ed159f94491249e86d5bbd033b5d60550/src/libproc_macro/bridge/scoped_cell.rs:79
  39: proc_macro::bridge::scoped_cell::ScopedCell<T>::replace
             at /rustc/4fb7144ed159f94491249e86d5bbd033b5d60550/src/libproc_macro/bridge/scoped_cell.rs:74
  40: proc_macro::bridge::scoped_cell::ScopedCell<T>::set
             at /rustc/4fb7144ed159f94491249e86d5bbd033b5d60550/src/libproc_macro/bridge/scoped_cell.rs:79

  41: proc_macro::bridge::client::<impl proc_macro::bridge::Bridge>::enter::{{closure}}
             at /rustc/4fb7144ed159f94491249e86d5bbd033b5d60550/src/libproc_macro/bridge/client.rs:310
  42: std::thread::local::LocalKey<T>::try_with
             at /rustc/4fb7144ed159f94491249e86d5bbd033b5d60550/src/libstd/thread/local.rs:262
  43: std::thread::local::LocalKey<T>::with
             at /rustc/4fb7144ed159f94491249e86d5bbd033b5d60550/src/libstd/thread/local.rs:239
  44: proc_macro::bridge::client::<impl proc_macro::bridge::Bridge>::enter
             at /rustc/4fb7144ed159f94491249e86d5bbd033b5d60550/src/libproc_macro/bridge/client.rs:310
  45: proc_macro::bridge::client::run_client::{{closure}}
             at /rustc/4fb7144ed159f94491249e86d5bbd033b5d60550/src/libproc_macro/bridge/client.rs:355
  46: <std::
panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/4fb7144ed159f94491249e86d5bbd033b5d60550/src/libstd/panic.rs:318
  47: std::panicking::try::do_call
             at /rustc/4fb7144ed159f94491249e86d5bbd033b5d60550/src/libstd/panicking.rs:303
  48: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:86
  49: std::panicking::try
             at /rustc/4fb7144ed159f94491249e86d5bbd033b5d60550/src/libstd/panicking.rs:281
  50: std::panic::catch_unwind
             at /rustc/4fb7144ed159f94491249e86d5bbd033b5d60550/src/libstd/panic.rs:394
  51: proc_macro::bridge::client::run_client
             at /rustc/4fb7144ed159f94491249e86d5bbd033b5d60550/src/libproc_macro/bridge/client.rs:354
  52: proc_macro::bridge::client::Client<fn(proc_macro::TokenStream) .> proc_macro::TokenStream>::expand1::run
             at /rustc/4fb7144ed159f94491249e86d5bbd033b5d60550/src/libproc_macro/bridge/client.rs:394
  53: proc_macro_srv::proc_macro::bridge::server::run_server
  54: proc_macro_srv::dylib::Expander::expand

  55: proc_macro_srv::cli::run
  56: rust_analyzer::main
  57: std::rt::lang_start::{{closure}}
  58: std::rt::lang_start_internal::{{
closure}}
             at src/libstd/rt.rs:52
  59: std::panicking::try::do_call
             at src/libstd/panicking.rs:348
  60: std::panicking::try
             at src/libstd/panicking.rs:325
  61: std::panic::catch_unwind
             at src/libstd/panic.rs:394
  62: std::rt::lang_start_internal
             at src/libstd/rt.rs:51
  63: main
  64: __libc_start_main
  65: _start
@0x8f701
Copy link
Author

0x8f701 commented Sep 11, 2020

rust-analyzer: eb7136f

@0x8f701
Copy link
Author

0x8f701 commented Sep 11, 2020

I have the feelings that it happens often while typing ;

use crate::error::Result;
                        |

@lnicola
Copy link
Member

lnicola commented Sep 11, 2020

Which Rust toolchain are you using?

@0x8f701
Copy link
Author

0x8f701 commented Sep 11, 2020

@lnicola nightly

@lnicola
Copy link
Member

lnicola commented Sep 11, 2020

#5651 / #5773, although the error message seems different.

@0x8f701
Copy link
Author

0x8f701 commented Sep 11, 2020

@lnicola it reminds me of #5864, because when this error happens, it shows also something error messages like [SEMICON]....

@lnicola
Copy link
Member

lnicola commented Sep 11, 2020

Can you try with #5651?

@lnicola
Copy link
Member

lnicola commented Oct 16, 2020

@GopherJ I think this was fixed, are you still seeing it?

@Cooie
Copy link

Cooie commented Nov 30, 2020

I have a similar issue with neovim + coc.nvim + coc-rust-analyzer

image

Neovim is not responding for about 1s every time when I choose/type directly unwrap() or unwrap_err().

FYI:
rust-analyzer: 2020-11-30
neovim: 0.4.4
coc.nvim: 0.0.79
coc-rust-analyzer: 0.18.0
OS: macOS 11.0.1
iTerm2: Build 3.4.2beta3

@bjorn3
Copy link
Member

bjorn3 commented Nov 30, 2020

Does the server log show a panic? If not, this is a separate issue.

@Cooie
Copy link

Cooie commented Dec 1, 2020

No, there is no panic log from the server log.

@flodiebold
Copy link
Member

@GopherJ are you still encountering this?

@flodiebold flodiebold added the S-unactionable Issue requires feedback, design decisions or is blocked on other work label Dec 21, 2020
@0x8f701
Copy link
Author

0x8f701 commented Dec 22, 2020

@flodiebold indeed I didn't see it anymore, is there any action behind this? if yes I think it can be closed

@flodiebold
Copy link
Member

Maybe #5651, but there were also lots of other changes to the proc macro code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-unactionable Issue requires feedback, design decisions or is blocked on other work
Projects
None yet
Development

No branches or pull requests

5 participants