folke / noice.nvim

💥 Highly experimental plugin that completely replaces the UI for messages, cmdline and the popupmenu.
Apache License 2.0
4.04k stars 93 forks source link

bug: crash during the second commit with NeoGit #337

Closed c3n21 closed 1 week ago

c3n21 commented 1 year ago

Did you check docs and existing issues?

Neovim version (nvim -v)

0.9.0-dev-833+gb4c4c232b

Operating system/version

Linux 5.15.79.1-microsoft-standard-WSL2

Describe the bug

When trying to make a second commit during the same editing session, NeoVim just crashes. I've read the manual but couldn't find a way to set logs neither for Noice nor Neogit.

Steps To Reproduce

  1. Make first commit
  2. Edit some file, stage the changes (either with gitsigns or Neogit is indifferent)
  3. Make the commit
  4. NeoVim crashes

Expected Behavior

I should the commit made properly without crashing

Repro

-- 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', 'https://github.com/folke/lazy.nvim.git', lazypath })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
    'folke/tokyonight.nvim',
    {

        'folke/noice.nvim',
        dependencies = {
            -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
            'MunifTanjim/nui.nvim',
            -- OPTIONAL:
            --   `nvim-notify` is only needed, if you want to use the notification view.
            --   If not available, we use `mini` as the fallback
            'rcarriga/nvim-notify',
        },
        config = function()
            require('noice').setup()
        end,
    },
    {
        'TimUntersberger/neogit',
        dependencies = {
            'nvim-lua/plenary.nvim',
            'sindrets/diffview.nvim',
        },
        config = function()
            require('neogit').setup()
        end,
    },

    -- add any other plugins here
}
require('lazy').setup(plugins, {
    root = root .. '/plugins',
})

vim.cmd.colorscheme('tokyonight')
-- add anything else here
c3n21 commented 1 year ago

Somehow I managed to get the stack trace from Noice logs

Sat 28 Jan 2023 08:01:14 AM CET
vim/_meta.lua:0: Expected lua string

stack traceback:
    [C]: in function 'pcall'
    ...local/share/nvim/lazy/noice.nvim/lua/noice/util/call.lua:144: in function <...local/share/nvim/lazy/noice.nvim/lua/noice/util/call.lua:143>
    [C]: in function 'nvim_get_option_info'
    vim/_meta.lua: in function '__index'
    vim/_meta.lua: in function ''
    vim/_meta.lua: in function '__index'
    ....local/share/nvim/lazy/noice.nvim/lua/noice/view/nui.lua:289: in function <....local/share/nvim/lazy/noice.nvim/lua/noice/view/nui.lua:276>
    ...
    .../.local/share/nvim/lazy/noice.nvim/lua/noice/ui/init.lua:99: in function <.../.local/share/nvim/lazy/noice.nvim/lua/noice/ui/init.lua:74>
    [C]: in function 'confirm'
    ...n/.local/share/nvim/lazy/neogit/lua/neogit/lib/input.lua:64: in function 'get_confirmation'
    ...im/lazy/neogit/lua/neogit/buffers/commit_editor/init.lua:50: in function <...im/lazy/neogit/lua/neogit/buffers/commit_editor/init.lua:46>
    [C]: in function 'nvim_buf_delete'
    .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:102: in function 'close'
    ...im/lazy/neogit/lua/neogit/buffers/commit_editor/init.lua:70: in function 'cb'
    .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:352: in function <.../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:351>
    ...are/nvim/lazy/neogit/lua/neogit/lib/mappings_manager.lua:9: in function 'invoke'
    [string ":lua"]:1: in main chunk
folke commented 1 year ago

If you mean that Neovim crashes as in segfaults, then you need to get a proper stacktrace. Check the Neovim wiki on how to get that for your platform. Either way, segfaults are not caused by Noice. Most likely a bug in Neovim.

github-actions[bot] commented 2 weeks ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 1 week ago

This issue was closed because it has been stalled for 7 days with no activity.