neoclide / coc.nvim

Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.
Other
24.43k stars 954 forks source link

Floating point exception on Vim8 when opening some of help windows #1037

Closed Ginkooo closed 5 years ago

Ginkooo commented 5 years ago

Result from CocInfo

There is absolutely nothing in CocInfo, so I'm not providing the contents.

Describe the bug

Code is like that:

pub struct NewsArticle<'a> {
    pub headline: &'a str,
    pub location: &'a str,
    pub author: &'a str,
    pub content: &'a str
}

pub trait Summary {
    fn summarize(&self);
}

impl Summary for NewsArticle<'_> {
    fn summarize(&self) {
        println!("{}", self.headline);
    }
}

fn summary<T: Summary>(arts: [T]) {
    for art in arts.iter() {
        art.summarize();
    }
}

fn main() {
    let article = NewsArticle {
        headline: "dupa",
        location: "plecy",
        author: "nature",
        content: "shit",
    };
    article.summarize();

    summary(vec![article]);
}

I use Vim8 and coc-rls extension. When I move my cursor to see what error is under arts variable in summary function definition, Vim crashes with the following error:

image

Reproduce the bug

Bug also appeared, when coding python using python-language-server, so I think it is not a language utility provider problem.

I'm not sure how to collect necessary logs, could someone give me a hint?

I use Vim 8.1 under Arch Linux and termite terminal.

I also noticed, when this crash happens, it leaves my terminal window in unstable state, it interprets new lines incorrectly after it.

I just tried to reproduce it under xterm terminal emulator. Same results.

I tried to use neovim to reproduce this. When I navigate to some variable to check what's the problem with it, neovim shows hints in the status region on the bottom of the sceen. Vim8 tries to open help message in some kind of popup window right under the cursor. But that popup window shows itself correctly on !vec[article], but crasches on arts variable.

chemzqm commented 5 years ago

It was fixed on vim8 https://github.com/vim/vim/issues/4615