-
Notifications
You must be signed in to change notification settings - Fork 109
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
bug: Crash for large lua file (with lsp configed) #315
Comments
Does this happen with the latest noice version? I fixed something for nightly half an hour ago |
Yes, even with the latest noice |
I can't reproduce this with the latest noice version and your repro. It does crash with the version before that. Are you 100% sure you're testing this with the latest noice version? Make sure to delete |
Yeah, that is what I did. The problem is still there, as shown by the recording: Screen.Recording.2023-01-15.at.8.22.03.AM.mov |
You deleted the whole directory? Including the lazy-lock.json file? Can you double-check by opening in with |
To further debug this, you'll have to generate a stacktrace for Neovim. |
Sorry, is this tool available on macOS? |
Check the Neovim wiki on how you can generate a stack trace for macos |
That shows the default as it was before my changes. The fix is here https://github.com/folke/noice.nvim/blob/main/lua/noice/ui/init.lua#L107 Can you post what that first ui is for you? You are using TUI right? |
And do you have termguicolors set to true? |
Does this happen with the latest nightly? |
still occurs (with nightly nvim and latest plugins) |
Responding to your question in #298 about other Mac users. NVIM v0.9.0-dev-1941+g20b7be2d1-dirty Can reproduce in: I can reproduce this when scrolling with a mousewheel in large files. Scrolling very slowly does not cause the crash. Also occurs if I "scroll" fast by holding down Ctrl+D/U, but not instantly as it does with the mousewheel. |
@al-ce are you sure this is due to noice? See also neovim/neovim#21815 @mathjiajia can you check if the issue persists without noice? |
I'm not sure what all I should test to rule everything out, but here's some situations I'm trying. Using a minimal packer config, I can only reproduce the behavior if there's a Noice notification window displayed as I'm scrolling (e.g. Using the LazyVim starter config, with Noice disabled I seemingly can't reproduce the issue. With Noice enabled, it occurs whether there is a notification window displayed or not. |
For me, once remove either lspconfig or noice, then cannot reproduce the crash. |
Does it happen when you disable |
What if you disable:
or
|
Still crash by doing those. |
I just tested on Macos and I still can't reproduce this... -- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"--single-branch",
"https://github.com/folke/lazy.nvim.git",
lazypath,
})
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
"folke/tokyonight.nvim",
"rcarriga/nvim-notify",
-- add any other plugins here
{
"neovim/nvim-lspconfig",
dependencies = {
{ "williamboman/mason.nvim", config = true },
{ "williamboman/mason-lspconfig.nvim", opts = { ensure_installed = { "sumneko_lua" } } },
},
config = function()
require("lspconfig").sumneko_lua.setup({})
end,
},
{
"folke/noice.nvim",
-- dir = "~/projects/noice.nvim",
dependencies = { "MunifTanjim/nui.nvim" },
config = true,
},
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here |
Tested with |
scroll fast with trackpad? |
Can you try running the test in empty directory? At least a directory without a |
You caught the point. No crash this time. |
ok, great. Can you show the contents of that file? |
I can actually reproduce it now. Even in an empty directory |
{
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
"Lua.workspace.checkThirdParty": false
} I can reproduce with my own config (not PS: below seems very important, which explains why it crashes for larger files.
|
At least, I can already confirm this issue is not caused by |
When I set noice Also set |
I'm pretty sure it's not related to
|
So wired. Still crash in a new directory with only two files: -- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"--single-branch",
"https://github.com/folke/lazy.nvim.git",
lazypath,
})
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
"folke/tokyonight.nvim",
-- add any other plugins here
{
"neovim/nvim-lspconfig",
config = function()
require("lspconfig").sumneko_lua.setup({})
end,
},
{
"folke/noice.nvim",
dependencies = { "MunifTanjim/nui.nvim" },
opts = {
lsp = {
progress = { enabled = false },
message = { enabled = false },
},
},
},
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here
|
I think @fibbo is right. There's a couple of other bug reports in Neovim with the same issue, but without Noice. And I can confirm that the issue on macos is not caused by that bug in |
Multiple fixes have bee made upstream. Would be great if you could test again on the latest nightly |
Thanks. |
Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.9.0-dev-2065ce877
Operating system/version
macOS 13.1
Describe the bug
When scrolling very fast in a larger lua file, nvim will crash.
Steps To Reproduce
lua-language-server
is in the PATH;nvim -u repro.lua
, to install the plugins;nvim -u repro.lua health.lua
, wherehealth.lua
is the file in this repo, or you make replace it with a large lua file.Expected Behavior
as normal, no crash
Repro
The text was updated successfully, but these errors were encountered: