Skip to content
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

blame.lua:103: Invalid 'end_col': out of range #1050

Closed
rofrol opened this issue Jun 18, 2024 · 5 comments · Fixed by #1080
Closed

blame.lua:103: Invalid 'end_col': out of range #1050

rofrol opened this issue Jun 18, 2024 · 5 comments · Fixed by #1080
Labels
bug Something isn't working

Comments

@rofrol
Copy link

rofrol commented Jun 18, 2024

Description

Errors while using Gitsigns blame.

Neovim version

nvim --version

Operating system and version

macos 14.5

Expected behavior

No error

Actual behavior

Error executing vim.schedule lua callback: ...frontend/gitsigns_issue/gitsigns//lua/gitsigns/async.lua:85: The coroutine failed with this message: ...frontend/gitsigns_issu
e/gitsigns//lua/gitsigns/blame.lua:103: Invalid 'end_col': out of range                                                                                                     
stack traceback:                                                                                                                                                            
        [C]: in function 'nvim_buf_set_extmark'                                                                                                                             
        ...frontend/gitsigns_issue/gitsigns//lua/gitsigns/blame.lua:103: in function 'render'                                                                               
        ...frontend/gitsigns_issue/gitsigns//lua/gitsigns/blame.lua:239: in function <...frontend/gitsigns_issue/gitsigns//lua/gitsigns/blame.lua:213>                      
stack traceback:                                                                                                                                                            
        [C]: in function 'error'                                                                                                                                            
        ...frontend/gitsigns_issue/gitsigns//lua/gitsigns/async.lua:85: in function 'cb'                                                                                    
        ...frontend/gitsigns_issue/gitsigns//lua/gitsigns/async.lua:127: in function <...frontend/gitsigns_issue/gitsigns//lua/gitsigns/async.lua:126>  

Minimal config

for name, url in pairs{
  gitsigns = 'https://github.com/lewis6991/gitsigns.nvim',
  -- ADD OTHER PLUGINS _NECESSARY_ TO REPRODUCE THE ISSUE
} do
  local install_path = vim.fn.fnamemodify('gitsigns_issue/'..name, ':p')
  if vim.fn.isdirectory(install_path) == 0 then
    vim.fn.system { 'git', 'clone', '--depth=1', url, install_path }
  end
  vim.opt.runtimepath:append(install_path)
end

require('gitsigns').setup{
  debug_mode = true, -- You must add this to enable debug messages
  -- ADD GITSIGNS CONFIG THAT IS _NECESSARY_ FOR REPRODUCING THE ISSUE
}

-- ADD INIT.LUA SETTINGS THAT IS _NECESSARY_ FOR REPRODUCING THE ISSUE

Steps to reproduce

  1. mkdir gitsigns_issue
  2. cd gitsigns_issue
  3. git init
  4. touch file
  5. git add file
  6. `git commit -m 'init commit'
  7. nvim --clean -u minimal.lua file
  8. :Gitsigns blame

Gitsigns debug messages

0.59 D dprintf: Deriving GitSignsAdd from Added
0.72 D derive: Deriving GitSignsChange from Changed
0.89 D derive: Deriving GitSignsDelete from Removed
0.94 D derive: Deriving GitSignsChangedelete from GitSignsChange
1.00 D derive: Deriving GitSignsTopdelete from GitSignsDelete
1.05 D derive: Deriving GitSignsUntracked from GitSignsAdd
1.13 D derive: Deriving GitSignsAddNr from GitSignsAdd
1.20 D derive: Deriving GitSignsChangeNr from GitSignsChange
1.28 D derive: Deriving GitSignsDeleteNr from GitSignsDelete
1.32 D derive: Deriving GitSignsChangedeleteNr from GitSignsChangeNr
1.37 D derive: Deriving GitSignsTopdeleteNr from GitSignsDeleteNr
1.41 D derive: Deriving GitSignsUntrackedNr from GitSignsAddNr
1.51 D derive: Deriving GitSignsAddLn from DiffAdd
1.63 D derive: Deriving GitSignsChangeLn from DiffChange
1.68 D derive: Deriving GitSignsChangedeleteLn from GitSignsChangeLn
1.71 D derive: Deriving GitSignsUntrackedLn from GitSignsAddLn
1.75 D derive: Deriving GitSignsStagedAdd from GitSignsAdd
1.79 D derive: Deriving GitSignsStagedChange from GitSignsChange
1.83 D derive: Deriving GitSignsStagedDelete from GitSignsDelete
1.87 D derive: Deriving GitSignsStagedChangedelete from GitSignsChangedelete
1.90 D derive: Deriving GitSignsStagedTopdelete from GitSignsTopdelete
1.94 D derive: Deriving GitSignsStagedAddNr from GitSignsAddNr
1.98 D derive: Deriving GitSignsStagedChangeNr from GitSignsChangeNr
2.02 D derive: Deriving GitSignsStagedDeleteNr from GitSignsDeleteNr
2.08 D derive: Deriving GitSignsStagedChangedeleteNr from GitSignsChangedeleteNr
2.11 D derive: Deriving GitSignsStagedTopdeleteNr from GitSignsTopdeleteNr
2.15 D derive: Deriving GitSignsStagedAddLn from GitSignsAddLn
2.19 D derive: Deriving GitSignsStagedChangeLn from GitSignsChangeLn
2.28 D derive: Could not derive GitSignsStagedDeleteLn
2.32 D derive: Deriving GitSignsStagedChangedeleteLn from GitSignsChangedeleteLn
2.38 D derive: Could not derive GitSignsStagedTopdeleteLn
2.48 D derive: Deriving GitSignsAddPreview from DiffAdd
2.57 D derive: Deriving GitSignsDeletePreview from DiffDelete
2.62 D derive: Deriving GitSignsCurrentLineBlame from NonText
2.66 D derive: Deriving GitSignsAddInline from TermCursor
2.69 D derive: Deriving GitSignsDeleteInline from TermCursor
2.74 D derive: Deriving GitSignsChangeInline from TermCursor
2.77 D derive: Deriving GitSignsAddLnInline from GitSignsAddInline
2.81 D derive: Deriving GitSignsChangeLnInline from GitSignsChangeInline
2.85 D derive: Deriving GitSignsDeleteLnInline from GitSignsDeleteInline
2.94 D derive: Deriving GitSignsDeleteVirtLn from DiffDelete
2.98 D derive: Deriving GitSignsDeleteVirtLnInLine from GitSignsDeleteLnInline
3.02 D derive: Deriving GitSignsVirtLnum from GitSignsDeleteVirtLn
8.67 D attach(1): Attaching (trigger=BufReadPost)
8.74 D run_job: git --no-pager --no-optional-locks --literal-pathspecs -c gc.auto=0 config user.name
13.61 D run_job: git --version
17.99 D run_job: git --no-pager --no-optional-locks --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
21.53 D run_job: git --no-pager --no-optional-locks --literal-pathspecs -c gc.auto=0 --git-dir /path/to/project/.git -c core.quote
path=off ls-files --stage --others --exclude-standard --eol /path/to/project/src/file.ts
26.05 D watch_gitdir(1): Watching git dir
26.34 D run_job: git --no-pager --no-optional-locks --literal-pathspecs -c gc.auto=0 --git-dir /path/to/project/.git show 579619ecbfa7b185a6f0ad4cbac8fdb279c0da76
31.58 D run_job: git --no-pager --no-optional-locks --literal-pathspecs -c gc.auto=0 --git-dir /path/to/project/.git show HEAD:src/file.ts
7876.79 D cli.run: Running action 'debug_messages' with arguments {}
23570.83 D cli.run: Running action 'blame' with arguments {}
23572.97 D run_job: git --no-pager --no-optional-locks --literal-pathspecs -c gc.auto=0 --git-dir /path/to/project/.git blame --contents - --incremental -- /path/to/project/src/file.ts
159803.08 D cli.run: Running action 'debug_messages' with arguments {}
199313.39 D cli.run: Running action 'debug_messages' with arguments {}
226932.13 D cli.run: Running action 'debug_messages' with arguments {}
278294.86 D cli.run: Running action 'debug_messages' with arguments {}
@rofrol rofrol added the bug Something isn't working label Jun 18, 2024
@lewis6991
Copy link
Owner

Steps to reproduce are not complete.

@rofrol
Copy link
Author

rofrol commented Jun 19, 2024

I've added

8. `:Gitsigns blame`

Not sure if that's what you meant.

@lewis6991
Copy link
Owner

lewis6991 commented Jun 19, 2024

I tried that and didn't get any error.

image

@rofrol
Copy link
Author

rofrol commented Jun 19, 2024

Maybe because my git history does this. Also look at blame panel on the left. Looks strange:

Screenshot 2024-06-19 at 14 23 50

@lewis6991
Copy link
Owner

There may still be an issue here, but with the current information in this ticket there aren't any actions we can take.

Will close for now, but if you're able to put together some reproduction steps that work, then we can reopen.

@lewis6991 lewis6991 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants