bug: continuosly creation of stack traces "attempt to concatenate local 'end_line' (a nil value)"
matu3ba opened this issue · comments
Neovim version (nvim -v)
NVIM v0.10.0-dev-1217+g3387dc4a4
Operating system/version
Linux ASG148 5.15.0-84-generic
Describe the bug
I'll try provide more content, if necessary, but I suspect the source of the bug does not make it necessary in this case (nil value usage).
^I...im/lazy/overseer.nvim/lua/overseer/strategy/jobstart.lua:139: in function <...im/lazy/overseer.nvim/lua/overseer/strategy/jobstart.lua:135> function: builtin#18 ...im/lazy/overseer.nvim/lua/overseer/strategy/jobstart.lua:108: attempt to concatenate local 'end_line' (a nil value)
Traceback
^I...im/lazy/overseer.nvim/lua/overseer/strategy/jobstart.lua:108: in function 'on_stdout'
^I...im/lazy/overseer.nvim/lua/overseer/strategy/jobstart.lua:139: in function <...im/lazy/overseer.nvim/lua/overseer/strategy/jobstart.lua:135>
...im/lazy/overseer.nvim/lua/overseer/strategy/jobstart.lua:108: attempt to concatenate local 'end_line' (a nil value)
stack traceback:
^I...im/lazy/overseer.nvim/lua/overseer/strategy/jobstart.lua:108: in function 'on_stdout'
^I...im/lazy/overseer.nvim/lua/overseer/strategy/jobstart.lua:139: in function <...im/lazy/overseer.nvim/lua/overseerstrategy/jobstart.lua:135> function: builtin#18 ...im/lazy/overseer.nvim/lua/overseer/strategy/jobstart.lua:108: attempt to concatenate local 'end_line' (a nil value)
stack traceback:
^I...im/lazy/overseer.nvim/lua/overseer/strategy/jobstart.lua:108: in function 'on_stdout'
^I...im/lazy/overseer.nvim/lua/overseer/strategy/jobstart.lua:139: in function <...im/lazy/overseer.nvim/lua/overseer/......im/lazy/overseer.nvim/lua/overseer/strategy/jobstart.lua:108: attempt to concatenate local 'end_line' (a nil value)
stack traceback:
After round about 3 minutes (writing of this issue) the problem stopped.
Steps To Reproduce
- nvim -u min.lua
Expected Behavior
No nil value usage for concat flooding messages.
Minimal example file
Not minimal, but standard:
local has_overseer, overseer = pcall(require, "overseer")
local has_overseer_util, overseer_util = pcall(require, "overseer.util")
if not has_overseer then
vim.print("no overseer")
return
end
if not has_overseer_util then
vim.print("no overseer.util")
return
end
overseer.setup({
actions = {
["open tab"] = {
desc = "Open this task in a new tab",
run = function(task)
local bufnr = task:get_bufnr()
if bufnr and vim.api.nvim_buf_is_valid(bufnr) then
-- naming tabs requires involved statusline-like setup
-- https://www.reddit.com/r/neovim/comments/pcpxwq/permanent_name_for_tab/
vim.cmd.tabnew()
overseer_util.set_term_window_opts()
vim.api.nvim_win_set_buf(0, task:get_bufnr())
overseer_util.scroll_to_end(0)
end
end,
},
},
component_aliases = {
default = {
{ "display_duration", detail_level = 2 },
"on_output_summarize",
"on_exit_set_status",
--"on_complete_notify",
--"on_complete_dispose", -- this should keep the task
},
-- Tasks from tasks.json use these components
default_vscode = {
"default",
"on_result_diagnostics",
"on_result_diagnostics_quickfix",
},
},
strategy = { "jobstart", use_terminal = false },
templates = { "builtin", "user.cpp_build", "user.run_script" },
})
Minimal init.lua
-- 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",
{ "stevearc/dressing.nvim", config = true },
{
"stevearc/overseer.nvim",
config = function()
require("overseer").setup({
-- add your overseer config here
})
end,
},
-- add any other plugins here
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here
Additional context
I have 4 file-backed tabs and restart jobs in them. Originally started via :OverseerLoadBundle (3) and another one (1).
Weird...I'm not sure how that value could be nil, but I can add a simple guard for it