Skip to content

nvim 100% CPU And Frozen When modified.enabled = true #1878

Closed

Description

@alex-courtis

Description

nvim will freeze and process will use 100% CPU when first editing a no name new buffer.

Neovim version

NVIM v0.8.2
Build type: Release
LuaJIT 2.1.0-beta3

Operating system and version

Linux 6.1.1-arch1-1

nvim-tree version

since dcc344c

Minimal config

vim.cmd [[set runtimepath=$VIMRUNTIME]]
vim.cmd [[set packpath=/tmp/nvt-min/site]]
local package_root = "/tmp/nvt-min/site/pack"
local install_path = package_root .. "/packer/start/packer.nvim"
local function load_plugins()
  require("packer").startup {
    {
      "wbthomason/packer.nvim",
      "nvim-tree/nvim-tree.lua",
      "nvim-tree/nvim-web-devicons",
      -- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
    },
    config = {
      package_root = package_root,
      compile_path = install_path .. "/plugin/packer_compiled.lua",
      display = { non_interactive = true },
    },
  }
end
if vim.fn.isdirectory(install_path) == 0 then
  print "Installing nvim-tree and dependencies."
  vim.fn.system { "git", "clone", "--depth=1", "https://github.com/wbthomason/packer.nvim", install_path }
end
load_plugins()
require("packer").sync()
vim.cmd [[autocmd User PackerComplete ++once echo "Ready!" | lua setup()]]
vim.opt.termguicolors = true
vim.opt.cursorline = true

-- MODIFY NVIM-TREE SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
_G.setup = function()
  require("nvim-tree").setup {
	  modified = {
		  enable = true,
	  },
	  log = {
		  enable = true,
		  truncate = true,
		  types = {
			  all = true,
		  },
	  },
  }
end

Steps to reproduce

nvim -nu /tmp/nvt-min.lua

:NvimTreeOpen
<C-w>w
isomething

Expected behavior

No response

Actual behavior

No response

Activity

  1. added
    bug
    on Jan 2, 2023
  2. alex-courtis commented on Jan 2, 2023

    @alex-courtis
    MemberAuthor

    Workaround:

    	  modified = {
    		  enable = false,
  3. alex-courtis commented on Jan 2, 2023

    @alex-courtis
    MemberAuthor

    Nothing in logs after opening tree.

  4. alex-courtis commented on Jan 2, 2023

    @alex-courtis
    MemberAuthor

    very odd:

    #0  0x00007f6966a58a63 in getcwd () from /usr/lib/libc.so.6
    [Current thread is 1 (Thread 0x7f696695c740 (LWP 10112))]
    (gdb) bt
    #0  0x00007f6966a58a63 in getcwd () from /usr/lib/libc.so.6
    #1  0x00007f6966d5bbec in uv_cwd () from /usr/lib/libuv.so.1
    #2  0x000055ae6f9956cf in os_dirname ()
    #3  0x000055ae6f85f051 in ?? ()
    #4  0x000055ae6f850367 in call_internal_func ()
    #5  0x000055ae6f87cbee in call_func ()
    #6  0x000055ae6f90df4b in nlua_call ()
    #7  0x00007f6966b71ef6 in ?? () from /usr/lib/libluajit-5.1.so.2
    #8  0x00007f6966b848d3 in lua_pcall () from /usr/lib/libluajit-5.1.so.2
    #9  0x000055ae6f90634d in ?? ()
    #10 0x000055ae6f90b850 in ?? ()
    #11 0x000055ae6fa2d86b in state_handle_k_event ()
    #12 0x000055ae6f837726 in ?? ()
    #13 0x000055ae6fa2d68e in state_enter ()
    #14 0x000055ae6f830db2 in edit ()
    #15 0x000055ae6f969ec8 in ?? ()
    #16 0x000055ae6f960dc8 in ?? ()
    #17 0x000055ae6fa2d6d7 in state_enter ()
    #18 0x000055ae6f95c949 in normal_enter ()
    #19 0x000055ae6f79ed8b in main ()
    
  5. alex-courtis commented on Jan 2, 2023

    @alex-courtis
    MemberAuthor

    @chomosuke I'd be most grateful if you could look into this one.

  6. added 3 commits that reference this issue on Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions