Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

RLS panics with 0.4.0 #296

Open
SX91 opened this issue Jun 22, 2017 · 29 comments
Open

RLS panics with 0.4.0 #296

SX91 opened this issue Jun 22, 2017 · 29 comments

Comments

@SX91
Copy link

SX91 commented Jun 22, 2017

Version of VSCode: 1.13.1
Version of the extension: 0.4.0
OS: Fedora 25

Description:
RLS panics with latest extension version. On previous version it worked well.

Output of the "Rust Language Server" channel (Rust logging is not useful in this case):

thread 'main' panicked at 'unknown action', /checkout/src/tools/rls/src/cmd.rs:90
note: Run with `RUST_BACKTRACE=1` for a backtrace.
thread '<unnamed>' panicked at 'Error reading from channel: RecvError', /checkout/src/libcore/result.rs:860
thread '<unnamed>' panicked at 'cannot access stdout during shutdown', /checkout/src/libcore/option.rs:823
[Error - 8:17:27] Connection to server got closed. Server will not be restarted.
@SX91
Copy link
Author

SX91 commented Jun 22, 2017

The reason behind this is user configuration. I've removed my old one and did the initial extension config. Now everything works ok.
Unfortunately, I can't remember what was the content of my settings.json.

@hoqhuuep
Copy link

I had this also, same fix worked for me.

Broken settings which caused crash:

{
    "rust.rustLangSrcPath": "C:\\Users\\Daniel\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\src\\rust\\src",
    "rust.cargoHomePath": "C:\\Users\\Daniel\\.cargo",
    "rust.rls": {
        "executable": "rustup",
        "args": [
            "run",
            "nightly",
            "rls"
        ],
        "useRustfmt": true
    },
    "rust.rustup": {
        "toolchain": "nightly-x86_64-pc-windows-gnu"
    },
    "rust.mode": "rls"
}

What I did was remove ALL of these settings, then restart VS Code and follow the prompts to choose toolchain etc. Now my settings looks like this and there is no issue:

{
    "rust.rustup": {
        "toolchain": "nightly-x86_64-pc-windows-gnu"
    },
    "rust.mode": "rls",
    "rust.rls": {
        "useRustfmt": true
    }
}

@KalitaAlexey
Copy link
Member

I'm sorry about that.
The reasons are the same as for #229.
Until I release new version, you shouldn't use "rust.rls.executable" and "rust.rls.args" if they point at "rustup".

@wangzishi
Copy link

@KalitaAlexey I have reset my settings, but the issue still exists.

Missing change, aborting. Found 813, expected Some(830)
[Error - 下午9:18:23] Connection to server got closed. Server will not be restarted.

My user settings:

    "rust.rustup": {
        "toolchain": "nightly-x86_64-pc-windows-msvc"
    },
    "rust.mode": "rls",
    "rust.rls": {
        "useRustfmt": true
    }

on my Windows 10

vscode-rust 0.4.0
rustc 1.20.0-nightly (622e7e648 2017-06-21)
cargo 0.21.0-nightly (d26fd6f08 2017-06-20)
rls 0.1.0-nightly (d26fd6f 2017-06-20)

@KalitaAlexey
Copy link
Member

@wangzishi,
It's interesting.
@nrc @jonathanturner, Have you seen something similar before?

@rerz
Copy link

rerz commented Jun 22, 2017

Same thing happening to me.

{"message":"expected value, found module `internals::cpu::cpu_impl`","code":{"code":"E0423","explanation":"\nA `struct` variant name was used like a function name.\n\nErroneous code example:\n\n```compile_fail,E0423\nstruct Foo { a: bool };\n\nlet f = Foo();\n// error: `Foo` is a struct variant name, but this expression uses\n//        it like a function name\n```\n\nPlease verify you didn't misspell the name of what you actually wanted to use\nhere. Example:\n\n```\nfn Foo() -> u32 { 0 }\n\nlet f = Foo(); // ok!\n```\n"},"level":"error","spans":[{"file_name":"src\\main.rs","byte_start":32,"byte_end":56,"line_start":4,"line_end":4,"column_start":5,"column_end":29,"is_primary":true,"text":[{"text":"    internals::cpu::cpu_impl;","highlight_start":5,"highlight_end":29}],"label":"not a value","suggested_replacement":null,"expansion":null}],"children":[],"rendered":null}

Missing change, aborting. Found 2, expected Some(20)
[Error - 18:21:27] Connection to server got closed. Server will not be restarted.

rustup show:

Default host: x86_64-pc-windows-msvc

nightly-x86_64-pc-windows-msvc (default)
rustc 1.20.0-nightly (622e7e648 2017-06-21)

@KalitaAlexey
Copy link
Member

@rerzer,
Post the whole Rust Logging.

@rerz
Copy link

rerz commented Jun 22, 2017

@KalitaAlexey
How would I access the log? (Win 10)

edit:
Should have read the template.
The logging doesn't change after the server crashes.

DEBUG: Rustup: updateToolchains: this.toolchains=[{"channel":"nightly","host":"x86_64-pc-windows-msvc","isDefault":true}]
DEBUG: Rustup: updateComponents(nightly-x86_64-pc-windows-msvc): components=["cargo-x86_64-pc-windows-msvc (default)","rls-x86_64-pc-windows-msvc (installed)","rust-analysis-x86_64-pc-windows-msvc (installed)","rust-docs-x86_64-pc-windows-msvc (default)","rust-src (installed)","rust-std-aarch64-apple-ios","rust-std-aarch64-linux-android","rust-std-aarch64-unknown-fuchsia","rust-std-aarch64-unknown-linux-gnu","rust-std-arm-linux-androideabi","rust-std-arm-unknown-linux-gnueabi","rust-std-arm-unknown-linux-gnueabihf","rust-std-arm-unknown-linux-musleabi","rust-std-arm-unknown-linux-musleabihf","rust-std-armv7-apple-ios","rust-std-armv7-linux-androideabi","rust-std-armv7-unknown-linux-gnueabihf","rust-std-armv7-unknown-linux-musleabihf","rust-std-armv7s-apple-ios","rust-std-asmjs-unknown-emscripten","rust-std-i386-apple-ios","rust-std-i586-pc-windows-msvc","rust-std-i586-unknown-linux-gnu","rust-std-i686-apple-darwin","rust-std-i686-linux-android","rust-std-i686-pc-windows-gnu","rust-std-i686-pc-windows-msvc","rust-std-i686-unknown-freebsd","rust-std-i686-unknown-linux-gnu","rust-std-i686-unknown-linux-musl","rust-std-mips-unknown-linux-gnu","rust-std-mips-unknown-linux-musl","rust-std-mips64-unknown-linux-gnuabi64","rust-std-mips64el-unknown-linux-gnuabi64","rust-std-mipsel-unknown-linux-gnu","rust-std-mipsel-unknown-linux-musl","rust-std-powerpc-unknown-linux-gnu","rust-std-powerpc64-unknown-linux-gnu","rust-std-powerpc64le-unknown-linux-gnu","rust-std-s390x-unknown-linux-gnu","rust-std-sparc64-unknown-linux-gnu","rust-std-wasm32-unknown-emscripten","rust-std-x86_64-apple-darwin","rust-std-x86_64-apple-ios","rust-std-x86_64-linux-android","rust-std-x86_64-pc-windows-gnu","rust-std-x86_64-pc-windows-msvc (default)","rust-std-x86_64-rumprun-netbsd","rust-std-x86_64-unknown-freebsd","rust-std-x86_64-unknown-fuchsia","rust-std-x86_64-unknown-linux-gnu","rust-std-x86_64-unknown-linux-musl","rust-std-x86_64-unknown-netbsd","rustc-x86_64-pc-windows-msvc (default)",""]
DEBUG: activate: getNightlyToolchain: There is only one nightly toolchain
DEBUG: RlsMode: start: enter
DEBUG: Rustup: isRlsInstalled: getNightlyToolchain: There is only one nightly toolchain
DEBUG: RlsMode: start: User decided to use rustfmt
DEBUG: Rustup: isRlsInstalled: getNightlyToolchain: There is only one nightly toolchain
DEBUG: RlsMode: start: rlsPath=rustup 
DEBUG: RlsMode: start: env={"RUST_SRC_PATH":"C:\\Users\\rerzer\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\src\\rust\\src"} 
DEBUG: Rustup: isRlsInstalled: getNightlyToolchain: There is only one nightly toolchain
DEBUG: RlsMode: start: args=["run","nightly","rls"] 
DEBUG: RlsMode: start: revealOutputChannelOn=3 
DEBUG: RlsMode: start: Language Client Manager: start

@KalitaAlexey
Copy link
Member

Open a terminal.

export RUST_BACKTRACE=1
code path/to/your/project

And then paste what Rust Language Server says you.

@rerz
Copy link

rerz commented Jun 22, 2017

I'm on Win 10, used SET RUST_BACKTRACE=1 (Also tried SET -name RUST_BACKTRACE -value 1)

No output in the powershell I used to start vscode, output in vscode does not seem to change after the crash.

Rust logging:

DEBUG: Rustup: updateToolchains: this.toolchains=[{"channel":"nightly","host":"x86_64-pc-windows-msvc","isDefault":true}]
DEBUG: Rustup: updateComponents(nightly-x86_64-pc-windows-msvc): components=["cargo-x86_64-pc-windows-msvc (default)","rls-x86_64-pc-windows-msvc (installed)","rust-analysis-x86_64-pc-windows-msvc (installed)","rust-docs-x86_64-pc-windows-msvc (default)","rust-src (installed)","rust-std-aarch64-apple-ios","rust-std-aarch64-linux-android","rust-std-aarch64-unknown-fuchsia","rust-std-aarch64-unknown-linux-gnu","rust-std-arm-linux-androideabi","rust-std-arm-unknown-linux-gnueabi","rust-std-arm-unknown-linux-gnueabihf","rust-std-arm-unknown-linux-musleabi","rust-std-arm-unknown-linux-musleabihf","rust-std-armv7-apple-ios","rust-std-armv7-linux-androideabi","rust-std-armv7-unknown-linux-gnueabihf","rust-std-armv7-unknown-linux-musleabihf","rust-std-armv7s-apple-ios","rust-std-asmjs-unknown-emscripten","rust-std-i386-apple-ios","rust-std-i586-pc-windows-msvc","rust-std-i586-unknown-linux-gnu","rust-std-i686-apple-darwin","rust-std-i686-linux-android","rust-std-i686-pc-windows-gnu","rust-std-i686-pc-windows-msvc","rust-std-i686-unknown-freebsd","rust-std-i686-unknown-linux-gnu","rust-std-i686-unknown-linux-musl","rust-std-mips-unknown-linux-gnu","rust-std-mips-unknown-linux-musl","rust-std-mips64-unknown-linux-gnuabi64","rust-std-mips64el-unknown-linux-gnuabi64","rust-std-mipsel-unknown-linux-gnu","rust-std-mipsel-unknown-linux-musl","rust-std-powerpc-unknown-linux-gnu","rust-std-powerpc64-unknown-linux-gnu","rust-std-powerpc64le-unknown-linux-gnu","rust-std-s390x-unknown-linux-gnu","rust-std-sparc64-unknown-linux-gnu","rust-std-wasm32-unknown-emscripten","rust-std-x86_64-apple-darwin","rust-std-x86_64-apple-ios","rust-std-x86_64-linux-android","rust-std-x86_64-pc-windows-gnu","rust-std-x86_64-pc-windows-msvc (default)","rust-std-x86_64-rumprun-netbsd","rust-std-x86_64-unknown-freebsd","rust-std-x86_64-unknown-fuchsia","rust-std-x86_64-unknown-linux-gnu","rust-std-x86_64-unknown-linux-musl","rust-std-x86_64-unknown-netbsd","rustc-x86_64-pc-windows-msvc (default)",""]
DEBUG: activate: getNightlyToolchain: There is only one nightly toolchain
DEBUG: RlsMode: start: enter
DEBUG: Rustup: isRlsInstalled: getNightlyToolchain: There is only one nightly toolchain
DEBUG: RlsMode: start: User decided to use rustfmt
DEBUG: Rustup: isRlsInstalled: getNightlyToolchain: There is only one nightly toolchain
DEBUG: RlsMode: start: rlsPath=rustup 
DEBUG: RlsMode: start: env={"RUST_SRC_PATH":"C:\\Users\\rerzer\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\src\\rust\\src"} 
DEBUG: Rustup: isRlsInstalled: getNightlyToolchain: There is only one nightly toolchain
DEBUG: RlsMode: start: args=["run","nightly","rls"] 
DEBUG: RlsMode: start: revealOutputChannelOn=3 
DEBUG: RlsMode: start: Language Client Manager: start

RLS still only shows:

Missing change, aborting. Found 2, expected Some(21)
[Error - 21:38:15] Connection to server got closed. Server will not be restarted.

@KalitaAlexey
Copy link
Member

@rerzer,
I don't know and I am busy with other issues.
I would be glad if you could find it the reasons.

@rerz
Copy link

rerz commented Jun 22, 2017

Gonna try on my laptop with arch to see if it's a Windows only issue.
Will update if I find something.

@rerz
Copy link

rerz commented Jun 22, 2017

Backtrace after crash with RUST_BACKTRACE=1

thread '<unnamed>' panicked at 'RUST_SRC_PATH is set: NotPresent', /checkout/src/libcore/result.rs:860
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
             at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at /checkout/src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at /checkout/src/libstd/sys_common/backtrace.rs:60
             at /checkout/src/libstd/panicking.rs:355
   3: std::panicking::default_hook
             at /checkout/src/libstd/panicking.rs:371
   4: std::panicking::rust_panic_with_hook
             at /checkout/src/libstd/panicking.rs:549
   5: std::panicking::begin_panic
             at /checkout/src/libstd/panicking.rs:511
   6: std::panicking::begin_panic_fmt
             at /checkout/src/libstd/panicking.rs:495
   7: rust_begin_unwind
             at /checkout/src/libstd/panicking.rs:471
   8: core::panicking::panic_fmt
             at /checkout/src/libcore/panicking.rs:69
   9: core::result::unwrap_failed
  10: racer::nameres::get_crate_file
  11: racer::nameres::resolve_name
  12: racer::nameres::resolve_path
  13: racer::core::complete_from_file_
  14: std::panicking::try::do_call
  15: __rust_maybe_catch_panic
             at /checkout/src/libpanic_unwind/lib.rs:98
  16: rls::server::LsService::handle_message::{{closure}}

and with RUST_BACKTRACE=full

thread '<unnamed>' panicked at 'RUST_SRC_PATH is set: NotPresent', /checkout/src/libcore/result.rs:860
stack backtrace:
   0:     0x7fb2a8ae8153 - std::sys::imp::backtrace::tracing::imp::unwind_backtrace::h0c3c52ab4000a0c3
                               at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1:     0x7fb2a8ae3514 - std::sys_common::backtrace::_print::h1a2a77bbc8c86dbb
                               at /checkout/src/libstd/sys_common/backtrace.rs:71
   2:     0x7fb2a8af614a - std::panicking::default_hook::{{closure}}::h8019b68fb1d13c50
                               at /checkout/src/libstd/sys_common/backtrace.rs:60
                               at /checkout/src/libstd/panicking.rs:355
   3:     0x7fb2a8af5bff - std::panicking::default_hook::hfbf8766d5f07b890
                               at /checkout/src/libstd/panicking.rs:371
   4:     0x7fb2a8af6542 - std::panicking::rust_panic_with_hook::hc2ba7f4258940a80
                               at /checkout/src/libstd/panicking.rs:549
   5:     0x7fb2a8af63d4 - std::panicking::begin_panic::h3686babf7c1a65b5
                               at /checkout/src/libstd/panicking.rs:511
   6:     0x7fb2a8af6369 - std::panicking::begin_panic_fmt::h128cd28a87901b35
                               at /checkout/src/libstd/panicking.rs:495
   7:     0x7fb2a8af62f7 - rust_begin_unwind
                               at /checkout/src/libstd/panicking.rs:471
   8:     0x7fb2a8b335ad - core::panicking::panic_fmt::h4daceedfcb998660
                               at /checkout/src/libcore/panicking.rs:69
   9:     0x55df5c65a18b - core::result::unwrap_failed::h1582683fda57e954
  10:     0x55df5c687184 - racer::nameres::get_crate_file::h6f8986780262b8c3
  11:     0x55df5c69950d - racer::nameres::resolve_name::hf61e34d46f4700a6
  12:     0x55df5c69c4aa - racer::nameres::resolve_path::hc3e9e68db7953e3c
  13:     0x55df5c664ae4 - racer::core::complete_from_file_::h8fa86b9d9a3902fb
  14:     0x55df5c191ac2 - std::panicking::try::do_call::h3a89e201e5a81d37
  15:     0x7fb2a8aff82a - __rust_maybe_catch_panic
                               at /checkout/src/libpanic_unwind/lib.rs:98
  16:     0x55df5c24c0d3 - rls::server::LsService::handle_message::{{closure}}::h7ad702c888f5c236
  17:     0x55df5c18faf7 - std::sys_common::backtrace::__rust_begin_short_backtrace::hd08317da6bff9656
  18:     0x55df5c191927 - std::panicking::try::do_call::h33999acb13cc3e5b
  19:     0x7fb2a8aff82a - __rust_maybe_catch_panic
                               at /checkout/src/libpanic_unwind/lib.rs:98
  20:     0x55df5c1d0472 - <F as alloc::boxed::FnBox<A>>::call_box::h20d8f9e7cdf18a30
  21:     0x7fb2a8af4d85 - std::sys::imp::thread::Thread::new::thread_start::h52ac90d0416e4a80
                               at /checkout/src/liballoc/boxed.rs:660
                               at /checkout/src/libstd/sys_common/thread.rs:21
                               at /checkout/src/libstd/sys/unix/thread.rs:84
  22:     0x7fb2a8441296 - start_thread
  23:     0x7fb2a7c5925e - __clone
  24:                0x0 - <unknown>

This is on a fresh install of rust nightly on Antergos.

@KalitaAlexey
Copy link
Member

KalitaAlexey commented Jun 22, 2017

I'll look at it tomorrow.

@KalitaAlexey
Copy link
Member

Could you make rustup component add rust-src --toolchain nightly.

@rerz
Copy link

rerz commented Jun 22, 2017

I did that right after I read the backtrace, it appears to have fixed the crashing on arch.
But on Windows it says info: component 'rust-src' is up to date and the RLS keeps crashing.

Edit: Even though the rust-src was already installed it seems that after trying to install it again RLS no longer crashes on Win 10. Not sure if that was the cause though, i'll update if it crashes again.

@KalitaAlexey
Copy link
Member

It shouldn't help, but try rustup component add rust-src --toolchain nightly-x86_64-pc-windows-msvc

@rerz
Copy link

rerz commented Jun 22, 2017

Okay I guess that was placebo, it still crashes.

@KalitaAlexey
Copy link
Member

Could you try:

  • rustup component remove rls --toolchain nightly, rustup component remove rust-analysis --toolchain nightly, rustup component remove rust-src --toolchain nightly, rustup component add rust-src --toolchain nightly
  • Remove the extension and install it again

@KalitaAlexey
Copy link
Member

It's kind of strange problem.

@KalitaAlexey
Copy link
Member

I see DEBUG: RlsMode: start: env={"RUST_SRC_PATH":"C:\\Users\\rerzer\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\src\\rust\\src"} , but thread '<unnamed>' panicked at 'RUST_SRC_PATH is set: NotPresent'. It confuses me.

@KalitaAlexey
Copy link
Member

I'm going sleep. Write your results. Thanks.

@rerz
Copy link

rerz commented Jun 22, 2017

Managed to make it crash again on Arch.

thread '<unnamed>' panicked at 'begin <= end (16 <= 12) when slicing `fn main() {
    let a = Test {
        val: 12,
    };

    println!("{:}", a);
}

struct Test {
    val: u16,
}`', /checkout/src/libcore/str/mod.rs:2137
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
             at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at /checkout/src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at /checkout/src/libstd/sys_common/backtrace.rs:60
             at /checkout/src/libstd/panicking.rs:355
   3: std::panicking::default_hook
             at /checkout/src/libstd/panicking.rs:371
   4: std::panicking::rust_panic_with_hook
             at /checkout/src/libstd/panicking.rs:549
   5: std::panicking::begin_panic
             at /checkout/src/libstd/panicking.rs:511
   6: std::panicking::begin_panic_fmt
             at /checkout/src/libstd/panicking.rs:495
   7: rust_begin_unwind
             at /checkout/src/libstd/panicking.rs:471
   8: core::panicking::panic_fmt
             at /checkout/src/libcore/panicking.rs:69
   9: core::str::slice_error_fail
             at /checkout/src/libcore/str/mod.rs:2137
  10: racer::nameres::search_scope_headers
  11: racer::nameres::search_local_scopes
  12: racer::nameres::resolve_name
  13: racer::nameres::resolve_path
  14: racer::core::complete_from_file_
  15: std::panicking::try::do_call
  16: __rust_maybe_catch_panic
             at /checkout/src/libpanic_unwind/lib.rs:98
  17: rls::server::LsService::handle_message::{{closure}}
thread '<unnamed>' panicked at 'begin <= end (16 <= 12) when slicing `fn main() {
    let a = Test {
        val: 12,
    };

    println!("{:}", a);
}

struct Test {
    val: u16,
}`', /checkout/src/libcore/str/mod.rs:2137
stack backtrace:
   0:     0x7fe18d948153 - std::sys::imp::backtrace::tracing::imp::unwind_backtrace::h0c3c52ab4000a0c3
                               at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1:     0x7fe18d943514 - std::sys_common::backtrace::_print::h1a2a77bbc8c86dbb
                               at /checkout/src/libstd/sys_common/backtrace.rs:71
   2:     0x7fe18d95614a - std::panicking::default_hook::{{closure}}::h8019b68fb1d13c50
                               at /checkout/src/libstd/sys_common/backtrace.rs:60
                               at /checkout/src/libstd/panicking.rs:355
   3:     0x7fe18d955bff - std::panicking::default_hook::hfbf8766d5f07b890
                               at /checkout/src/libstd/panicking.rs:371
   4:     0x7fe18d956542 - std::panicking::rust_panic_with_hook::hc2ba7f4258940a80
                               at /checkout/src/libstd/panicking.rs:549
   5:     0x7fe18d9563d4 - std::panicking::begin_panic::h3686babf7c1a65b5
                               at /checkout/src/libstd/panicking.rs:511
   6:     0x7fe18d956369 - std::panicking::begin_panic_fmt::h128cd28a87901b35
                               at /checkout/src/libstd/panicking.rs:495
   7:     0x7fe18d9562f7 - rust_begin_unwind
                               at /checkout/src/libstd/panicking.rs:471
   8:     0x7fe18d9935ad - core::panicking::panic_fmt::h4daceedfcb998660
                               at /checkout/src/libcore/panicking.rs:69
   9:     0x7fe18d994ac6 - core::str::slice_error_fail::hbe2d76719f9e837b
                               at /checkout/src/libcore/str/mod.rs:2137
  10:     0x55c8900e5ec5 - racer::nameres::search_scope_headers::h0532c06e2ca44365
  11:     0x55c8900f9c44 - racer::nameres::search_local_scopes::h0ce0daba28badd46
  12:     0x55c8900fb78b - racer::nameres::resolve_name::hf61e34d46f4700a6
  13:     0x55c8900fe4aa - racer::nameres::resolve_path::hc3e9e68db7953e3c
  14:     0x55c8900c6ae4 - racer::core::complete_from_file_::h8fa86b9d9a3902fb
  15:     0x55c88fbf3ac2 - std::panicking::try::do_call::h3a89e201e5a81d37
  16:     0x7fe18d95f82a - __rust_maybe_catch_panic
                               at /checkout/src/libpanic_unwind/lib.rs:98
  17:     0x55c88fcae0d3 - rls::server::LsService::handle_message::{{closure}}::h7ad702c888f5c236
  18:     0x55c88fbf1af7 - std::sys_common::backtrace::__rust_begin_short_backtrace::hd08317da6bff9656
  19:     0x55c88fbf3927 - std::panicking::try::do_call::h33999acb13cc3e5b
  20:     0x7fe18d95f82a - __rust_maybe_catch_panic
                               at /checkout/src/libpanic_unwind/lib.rs:98
  21:     0x55c88fc32472 - <F as alloc::boxed::FnBox<A>>::call_box::h20d8f9e7cdf18a30
  22:     0x7fe18d954d85 - std::sys::imp::thread::Thread::new::thread_start::h52ac90d0416e4a80
                               at /checkout/src/liballoc/boxed.rs:660
                               at /checkout/src/libstd/sys_common/thread.rs:21
                               at /checkout/src/libstd/sys/unix/thread.rs:84
  23:     0x7fe18d2a1296 - start_thread
  24:     0x7fe18cab925e - __clone
  25:                0x0 - <unknown>

Gonna try your suggestions next.

@rerz
Copy link

rerz commented Jun 22, 2017

I think removing the components and adding them again through the plugin might have helped. No crashes so far but I don't really have enough time to tets it right now.

@rerz
Copy link

rerz commented Jun 22, 2017

Followed the same steps on Win 10, still crashing. I assume it didn't "really" work on Arch then either and I was just lucky.

@KalitaAlexey
Copy link
Member

It's RLS problem. I already mentioned nrc in the thread. I believe he knows better.

@ndenev
Copy link

ndenev commented Jun 24, 2017

This is the RLS issue that discusses this problem rust-lang/rls#372

@josephlr
Copy link

@rerzer I got everything working by checking out and building rls from master. Then all you have to do is change the extension settings to know about your newly built version:

{
    "rust.rustup": {
        "toolchain": "nightly-x86_64-apple-darwin",
        "nightlyToolchain": "nightly-x86_64-apple-darwin"
    },
    "rust.mode": "rls",
    "rust.rls": {
        "useRustfmt": true,
        "executable": "/Users/joe/Documents/Programming/rustproj/rls/target/release/rls",
        "env": {
            "DYLD_LIBRARY_PATH": "~/.rustup/toolchains/nightly-x86_64-apple-darwin/lib"
        }
    }
}

The environment variables will be dependent on the platform that you're using.

@farcaller
Copy link

Commenting on the previous one: building rls from master worked for me to fix the crash, but setting the DYLD_LIBRARY_PATH via env didn't. "Luckily", in OSX you can modify the rpath on a binary sigh.

So if the above doesn't work for you, this should:

$ cd rls
$ cargo build --release
$ install_name_tool -add_rpath `rustc --print sysroot` target/release/rls

verify that running target/release/rls works.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants