plenary.nvim icon indicating copy to clipboard operation
plenary.nvim copied to clipboard

fs_stat + Job in async function crashes nvim

Open Emm54321 opened this issue 3 years ago • 0 comments

The following causes neovim to crash when hitting f12:

function test()
    local async = require('plenary.async')
    local Job = require('plenary.job')
    print("Test")
    local e,t = async.uv.fs_stat("/tmp")
    print(vim.inspect(e))
    print(vim.inspect(t))
    local output, code = Job:new({command = "/bin/echo", args = {"Hello"}}):sync()
    print(vim.inspect(code))
    print(vim.inspect(output))
    print("EndTest")
end
vim.keymap.set("n", "<f12>", async.void(test))

It works fine without the call to fs_stat, or without the Job, but with both nvim crashes (SIGABRT). Using NVIM v0.7.0-dev+1292-ge9b53f3fb on linux.

Emm54321 avatar Mar 27 '22 17:03 Emm54321