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

Panic on Completion from Within Eclipse RustDT #485

Open
lloy0076 opened this issue Jan 22, 2016 · 12 comments
Open

Panic on Completion from Within Eclipse RustDT #485

lloy0076 opened this issue Jan 22, 2016 · 12 comments

Comments

@lloy0076
Copy link

When trying to autocomplete "std::" in this program, racer.exe unexpectedly (?) panics:

use std;

fn main() {
    let x = std:: // Eclipse is setup to call racer.exe when it sees a '::' sequence.
}

I'm running under Eclipse:

Version: Mars.1 Release (4.5.1)
Build id: 20150924-1200

...with the RustDT plugin:

RustDT  0.4.2.v201511271555 com.github.rustdt.feature.group RustDT Project Team

I got:

>> Running: C:\Users\david_000\.cargo\bin\racer.exe complete-with-snippet 4 14 C:\Users\david_000\Documents\Programming\workspace\tedium\src\main.rs
PREFIX 14,14,
thread 'searcher' panicked at 'called `Option::unwrap()` on a `None` value', ../src/libcore\option.rs:367
stack backtrace:
   0:           0x8aa62c - <unknown>
   1:           0x8b28ce - <unknown>
   2:           0x873f3c - <unknown>
   3:           0x8746ab - <unknown>
   4:           0x8a6ca2 - <unknown>
   5:           0x8c73b8 - <unknown>
   6:           0x8c79f0 - <unknown>
   7:           0x4f18c2 - <unknown>
   8:           0x4efa48 - <unknown>
   9:           0x4ebac3 - <unknown>
  10:           0x4a4ea2 - <unknown>
  11:           0x4a5311 - <unknown>
  12:           0x4a2d92 - <unknown>
  13:           0x40438f - <unknown>
  14:           0x89d3f1 - <unknown>
  15:           0x4052da - <unknown>
  16:           0x8b0ebd - <unknown>
  17:     0x7fff28298101 - <unknown>
ERROR:racer: Search thread paniced: Any
END

I have according to my crates registry:

[v1]
"racer 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = ["racer.exe"]

I can run racer.exe via the command line (.cargo/bin is on my path).

Other pertinent information:

C:\Users\david_000>rustc --version
rustc 1.6.0 (c30b771ad 2016-01-19)

I'm running Windows 10 updated to 23 January 2016:

Version 10.0.10586 Build 10586

I can build and run hello world files and other examples from the Rust by Example book fine.

PS. As this doesn't seem to occur in Visual Rust 0.1.1 this may be a RustDT issue.

@jwilm
Copy link
Collaborator

jwilm commented Jan 23, 2016

The stack trace you provided isn't super helpful. Just a guess, but this sounds potentially related to #484 which would not be in your build.

@lloy0076
Copy link
Author

@jwilm - I'd be happy to do "something" to get a better stack trace but I'm not quite sure how to, though.

@lloy0076
Copy link
Author

I added a dependency on the time module even though I'm not using it, here's my cargo.toml:

[package]

name = "hello_world"
version = "0.0.1"
authors = [ "Your name <[email protected]>" ]

[[bin]]

name = "hello_world"

[dependencies]
time = "0.1.12"

Here's my cargo.lock after running cargo update:

[root]
name = "hello_world"
version = "0.0.1"
dependencies = [
 "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "kernel32-sys"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
 "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "libc"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "time"
version = "0.1.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
 "libc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
 "winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "winapi"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "winapi-build"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"

Unfortunately, it still panics with a similar message.

@wlinna
Copy link

wlinna commented Jan 23, 2016

I' running Kubuntu 14.04 but with otherwise same setup as OP and I get the same issue. My stack trace has more information though:

PREFIX 4,6,st
thread 'searcher' panicked at 'called `Option::unwrap()` on a `None` value', ../src/libcore/option.rs:367
stack backtrace:
   1:     0x55c0bbcbded0 - sys::backtrace::tracing::imp::write::haa19c02b4de52f3bG0t
   2:     0x55c0bbcc0345 - panicking::log_panic::_<closure>::closure.41218
   3:     0x55c0bbcbfdc0 - panicking::log_panic::h527fe484e9de8fe1W7x
   4:     0x55c0bbcaf4d3 - sys_common::unwind::begin_unwind_inner::h51f64b1a34c60827fTs
   5:     0x55c0bbcafb48 - sys_common::unwind::begin_unwind_fmt::h0845853a1913f45blSs
   6:     0x55c0bbcbd531 - rust_begin_unwind
   7:     0x55c0bbced4df - panicking::panic_fmt::h3967afc085fe8067LFK
   8:     0x55c0bbced7b8 - panicking::panic::h77d028a733b1a80eiEK
   9:     0x55c0bbaecce9 - cargo::get_crate_file::h668fe6e17e27c604sii
                        at ../src/libcore/macros.rs:21
                        at .cargo/registry/src/github.com-88ac128001ac3a9a/racer-1.2.1/src/racer/cargo.rs:335
                        at .cargo/registry/src/github.com-88ac128001ac3a9a/racer-1.2.1/src/racer/cargo.rs:495
  10:     0x55c0bbaeaa51 - nameres::get_crate_file::hd79829b63b62b382yte
                        at .cargo/registry/src/github.com-88ac128001ac3a9a/racer-1.2.1/src/racer/nameres.rs:492
  11:     0x55c0bbae6b52 - nameres::resolve_name::h9d958da8b56c0e96N2e
                        at .cargo/registry/src/github.com-88ac128001ac3a9a/racer-1.2.1/src/racer/nameres.rs:860
  12:     0x55c0bbaa2cd9 - nameres::resolve_path::ha02bb90d7ae2a32cEcf
                        at .cargo/registry/src/github.com-88ac128001ac3a9a/racer-1.2.1/src/racer/nameres.rs:958
  13:     0x55c0bbaa0b39 - core::complete_from_file::hadaf72e02dc95109H2a
                        at .cargo/registry/src/github.com-88ac128001ac3a9a/racer-1.2.1/src/racer/core.rs:581
  14:     0x55c0bba66e4d - sys_common::unwind::try::try_fn::try_fn::h7197535189749226775
                        at .cargo/registry/src/github.com-88ac128001ac3a9a/racer-1.2.1/src/bin/main.rs:139
                        at .cargo/registry/src/github.com-88ac128001ac3a9a/racer-1.2.1/src/bin/main.rs:105
                        at ../src/libstd/thread/mod.rs:274
                        at ../src/libstd/sys/common/unwind/mod.rs:163
  15:     0x55c0bbcbd378 - __rust_try
  16:     0x55c0bbcba78b - sys_common::unwind::try::inner_try::h771fec597ec8f35cNPs
  17:     0x55c0bba67dbb - boxed::_<impl>::call_box::call_box::h18200710837161002757
                        at ../src/libstd/sys/common/unwind/mod.rs:133
                        at ../src/libstd/thread/mod.rs:274
                        at ../src/liballoc/boxed.rs:541
  18:     0x55c0bbcbee93 - sys::thread::_<impl>::new::thread_start::haf749b76474da6b089w
  19:     0x7f62a8300181 - start_thread
  20:     0x7f62a7e1747c - __clone
  21:                0x0 - <unknown>
ERROR:racer: Search thread paniced: Any
END

@jwilm
Copy link
Collaborator

jwilm commented Jan 23, 2016

There is an unreleased fix on master that might fix that. Can you try building from there and see if the issue persists? If that fixes it, we can bug Phil to release a patch version on crates.io

@jwilm
Copy link
Collaborator

jwilm commented Jan 23, 2016

@lloy0076 I think debug info should show up if you test a build without --release.

@cstanfill
Copy link

I had the exact same issue using racerd via vim-YouCompleteMe. Updating the racerd client to use racer at revision 1021df4 and rebuilding seems to have resolved it.

@lloy0076
Copy link
Author

I downloaded and built:

commit 1021df4b42436673f0124a62cad09e62d181635d
Merge: ffea69d fe5696f
Author: Phil Dawes <[email protected]>
Date:   Fri Jan 22 07:32:21 2016 +0000

    Merge pull request #484 from jaxx/#469-fix1

    fix when there's no dependencies in cargo file\

[snipped rest]

This has fixed whatever the problem happened to be.

@wlinna
Copy link

wlinna commented Jan 24, 2016

Works for me too when I build from the master branch

@jwilm
Copy link
Collaborator

jwilm commented Jan 25, 2016

@phildawes can you release 1.2.2 from the current master? This issue seems to be with 1.2.1, and everyone is reporting master being OK.

@phildawes
Copy link
Collaborator

Will do in a few hours when I get home, thanks for following up on this

On Mon, Jan 25, 2016 at 3:58 PM, Joe Wilm [email protected] wrote:

@phildawes https://github.com/phildawes can you release 1.2.2 from the
current master? This issue seems to be with 1.2.1, and everyone is
reporting master being OK.


Reply to this email directly or view it on GitHub
#485 (comment).

@phildawes
Copy link
Collaborator

1.2.2 should be published now

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

5 participants