blink.cmp icon indicating copy to clipboard operation
blink.cmp copied to clipboard

Neovim crashes after updating

Open ccidral opened this issue 1 year ago • 13 comments

I was using v0.2.0, it was working fine until I updated to v0.2.1. After the update whenever I enter insert mode and then type . to get autocompletion, it crashes Neovim. Here's my configuration before the update:

return {
  "saghen/blink.cmp",
  lazy = false, -- lazy loading handled internally
  -- optional: provides snippets for the snippet source
  dependencies = "rafamadriz/friendly-snippets",

  -- use a release tag to download pre-built binaries
  version = "v0.*",
  -- OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust
  -- build = "cargo build --release",

  opts = {
    highlight = {
      -- sets the fallback highlight groups to nvim-cmp's highlight groups
      -- useful for when your theme doesn't support blink.cmp
      -- will be removed in a future release, assuming themes add support
      use_nvim_cmp_as_default = true,
    },
    -- set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
    -- adjusts spacing to ensure icons are aligned
    -- nerd_font_variant = "normal",

    -- experimental auto-brackets support
    accept = { auto_brackets = { enabled = true } },

    -- experimental signature help support
    trigger = { signature_help = { enabled = false } },
  },
}

It stops crashing when I downgrade to v0.2.0 by setting version to v0.2.0 and then perform a Lazy update.

Some environment info:

Operating system: MacOS Sequoia 15.0

$ nvim --version
NVIM v0.10.2
Build type: Release
LuaJIT 2.1.1727870382
Run "nvim -V1 -v" for more info

Not sure if you need more information to help debugging, please let me know.

ccidral avatar Oct 09 '24 19:10 ccidral

@ccidral does this still happen on the latest release v0.3.0?

scottmckendry avatar Oct 14 '24 16:10 scottmckendry

@ccidral does this still happen on the latest release v0.3.0?

Yes, I just updated from v0.2.0 to v0.3.0, the problem persists.

I'd like to add a few more details that I just noticed. Neovim crashes when I enter insert mode and then press any character (not just .). Even in an empty buffer it crashes like that. It doesn't crash if I edit the file in normal or visual modes.

If there's any other information I can provide, please let me know, I'm happy to help.

ccidral avatar Oct 14 '24 16:10 ccidral

Same issue, can confirm - entering InsertMode and typing any character crashes nvim - also on Sequoia, and nvim 10.1.

yingzhu146 avatar Oct 14 '24 17:10 yingzhu146

Does reinstalling the plugin solve the issue for you?

saghen avatar Oct 14 '24 17:10 saghen

Oh boy, yep that solved it - could've tried that myself, sorry for the spam & thanks for the swift reply!

yingzhu146 avatar Oct 14 '24 17:10 yingzhu146

Does reinstalling the plugin solve the issue for you?

It does! Thank you, why didn't I think of that before?

ccidral avatar Oct 14 '24 17:10 ccidral

Np! It sounds like there's an issue with the update logic so I'll keep this open until I can pin it down

saghen avatar Oct 14 '24 19:10 saghen

@Saghen i just had this issue as well, uninstalling and reinstalling resolved the issue as suggested above, i hadn't updated in a while and the issue did occur immediately after updating all plugins.

NVIM v0.10.2
Build type: Release
LuaJIT 2.1.1727870382
Run "nvim -V1 -v" for more info

MacOs Ventura 13.6.9

AnthonyPoschen avatar Oct 30 '24 14:10 AnthonyPoschen

If anyone finds a way to reliably reproduce this issue, please lmk!

saghen avatar Nov 25 '24 00:11 saghen

@Saghen Perhaps one way to reproduce it would be to install an older version and then upgrade it to a version that we know causes the issue, for example from v0.2.0 to v0.2.1:

  1. uninstall it
  2. install version v0.2.0
  3. upgrade to version v0.2.1 or v0.3.0

I haven't tested this procedure but it kind of mimics the steps I took that led to the problem. I hope this helps.

ccidral avatar Nov 25 '24 13:11 ccidral

I had this issue as well:

$ nvim --version
NVIM v0.10.2
Build type: Release
LuaJIT 2.1.1713484068
Run "nvim -V1 -v" for more info

My version of blink.cmp is 0.7.6.

Reinstalling did fix it. Before it broke I tried to manually clone this repo in the plugin location (~/.local/share/nvim/lazy/blink.cmp) and it worked, then when I moved back the "old" repo that was broken before, it still worked. Maybe this points to some bad state being cached? I also downloaded this with bad wifi and cancelled the update part way through the first time I opened nvim.

sverch avatar Dec 13 '24 21:12 sverch

This re-installing solution is not working for me at all, reported https://github.com/Saghen/blink.cmp/issues/567

khaled4vokalz avatar Dec 15 '24 03:12 khaled4vokalz

okay, at least when I checkout the 0.6.2 version I don't get these bulky stack traces anymore that I shared in #567 . But I get error when I accept a suggestion. I could only make 0.5.1 to work...

image

khaled4vokalz avatar Dec 15 '24 04:12 khaled4vokalz

anyone know how to solve this problem? it's still not working after reinstalling.

lost22git avatar Dec 17 '24 19:12 lost22git

What's your OS and cpu architecture? And what's the output of ls -l ~/.local/share/nvim/lazy/blink.cmp/target/release (assuming linux)?

saghen avatar Dec 17 '24 19:12 saghen

0600 3.3M libblink_cmp_fuzzy.so

I use it on termux, so maybe android?

lost22git avatar Dec 17 '24 19:12 lost22git

Take a look at https://github.com/Saghen/blink.cmp/issues/145#issuecomment-2492759016, perhaps you need to update your Termux?

saghen avatar Dec 17 '24 19:12 saghen

@Saghen thanks, it works well now.

lost22git avatar Dec 17 '24 20:12 lost22git

@Saghen I just tried running cargo build --release, but I encountered an error due to the use of Rust's nightly version. However, I am using the stable version of Rust. imagen

krovuxdev avatar Dec 22 '24 05:12 krovuxdev

However, it worked after I cleaned or deleted .cache/nvim and .local/share/nvim/{blink, lazy/blink.cmp} and ignored the build error.

krovuxdev avatar Dec 22 '24 05:12 krovuxdev

This happened to me after updating to 0.8.1. Nvim would crash on InsertEnter. With LazyVim, cleaning and re-installing the plugin fixed the issue.

aaronlifton avatar Dec 23 '24 15:12 aaronlifton

I see this error (nightly neovim build):

Error executing vim.schedule lua callback: ...are/nvim/lazy/blink.cmp/lua/blink/cmp/sources/buffer.lua:50: loop or previous error loading module 'blink.cmp.fuzzy'
stack traceback:
        [C]: in function 'require'
        ...are/nvim/lazy/blink.cmp/lua/blink/cmp/sources/buffer.lua:50: in function 'run_sync'
        ...are/nvim/lazy/blink.cmp/lua/blink/cmp/sources/buffer.lua:100: in function <...are/nvim/lazy/blink.cmp/lua/blink/cmp/sources/buffer.lua:90>

Removed ~/.cache/nvim and ~/.local/share/nvim/lazy/blink.cmp and still see the same

Running ldd ~/.local/share/nvim/lazy/blink.cmp/target/release/libblink_cmp_fuzzy.so showed gblic incompatibility errors.

I ended up compiling libblink_cmp_fuzzy.so as follows:

cd $HOME/.local/share/nvim/lazy/blink.cmp
cargo clean
cargo build --release

This seemed to work as ldd libblink_cmp_fuzzy.so previously led to some glibc incompatibility errors.

surmish avatar Dec 23 '24 21:12 surmish

@Saghen as requested in #754, here's a link to a broken .local/share/nvim/lazy/blink.cmp folder. It would crash on entering insert mode and typing any character. Deleting the folder and having Lazy reinstall blink fixed the issue.

https://dropover.cloud/d75bf9

danielpost avatar Dec 26 '24 16:12 danielpost

@danielpost Thanks! Do you mind providing the working .local/share/nvim/lazy/blink.cmp folder so I can compare the two? I can't figure out what's wrong from the linked folder

saghen avatar Dec 31 '24 18:12 saghen

This is a problem I am having all the time, after updating. Don't actually know what's wrong with this.

Removing the folder works, but it's gnarly work after each update.

Any way I can help getting this resolved?

iduuck avatar Jan 02 '25 07:01 iduuck

Just had this issue when updating to 0.9.0 and was very confused, as I started using this on 0.8.2 (so, first time updating).

Removed the plugin folder to have lazy reinstall it from scratch as suggested by some comments in here and it indeed fixed the issue.

bellini666 avatar Jan 02 '25 09:01 bellini666

Same issue twice after updating. Weirdly rebooting the machine fixed it for me. MacBook Air M1, latest OS.

mantoni avatar Jan 02 '25 18:01 mantoni

@Saghen for me reinstalling did the trick, here's a zip of the plugin when it wasn't working: blink.cmp.zip.

olrtg avatar Jan 02 '25 22:01 olrtg

I'm seeing this issue as well

asilvadesigns avatar Jan 03 '25 18:01 asilvadesigns

@olrtg Can you send the zip of the plugin now that it's working as well? I'd like to diff the two

saghen avatar Jan 03 '25 18:01 saghen