company-lsp icon indicating copy to clipboard operation
company-lsp copied to clipboard

Company: backend company-lsp error "Wrong type argument: char-or-string-p, nil" with args (match MyInput)" on command post-command

Open lane-s opened this issue 5 years ago • 0 comments

I'm using Spacemacs with the lsp layer the c-c++ layer using lsp-ccls for the lsp backend. Sometimes I start getting this error whenever a completion is triggered:

Company: An error occurred in post-command
Company: frontend company-pseudo-tooltip-unless-just-one-frontend error "Company: backend company-lsp error "Wrong type argument: char-or-string-p, nil" with args (match MyInputToComplete)" on command post-command

Here's the backtrace from a specific occurrence of the issue:

Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil)
  company-lsp--compute-match(#("PadSysex" 0 8 (lsp-completion-prefix #("Pad" 0 1 (fontified t) 1 2 (fontified t) 2 3 (fontified t)) lsp-completion-item #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("label" "PadSysex" "kind" 13 "detail" "PadInterface" "sortText" "   !" "insertTextFormat" 1 "textEdit" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("range" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("start" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("line" 25 "character" 2 ...)) "end" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("line" 25 "character" 5 ...)) ...)) "newText" "PadSysex" ...)) ...)))))
  company-lsp(match #("PadSysex" 0 8 (lsp-completion-prefix #("Pad" 0 1 (fontified t) 1 2 (fontified t) 2 3 (fontified t)) lsp-completion-item #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("label" "PadSysex" "kind" 13 "detail" "PadInterface" "sortText" "   !" "insertTextFormat" 1 "textEdit" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("range" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("start" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("line" 25 "character" 2 ...)) "end" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("line" 25 "character" 5 ...)) ...)) "newText" "PadSysex" ...)) ...)))))
  apply(company-lsp (match #("PadSysex" 0 8 (lsp-completion-prefix #("Pad" 0 1 (fontified t) 1 2 (fontified t) 2 3 (fontified t)) lsp-completion-item #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("label" "PadSysex" "kind" 13 "detail" "PadInterface" "sortText" "   !" "insertTextFormat" 1 "textEdit" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("range" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("start" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("line" 25 "character" 2 ...)) "end" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("line" 25 "character" 5 ...)) ...)) "newText" "PadSysex" ...)) ...))))))
  company-call-backend-raw(match #("PadSysex" 0 8 (lsp-completion-prefix #("Pad" 0 1 (fontified t) 1 2 (fontified t) 2 3 (fontified t)) lsp-completion-item #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("label" "PadSysex" "kind" 13 "detail" "PadInterface" "sortText" "   !" "insertTextFormat" 1 "textEdit" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("range" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("start" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("line" 25 "character" 2 ...)) "end" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("line" 25 "character" 5 ...)) ...)) "newText" "PadSysex" ...)) ...)))))
  apply(company-call-backend-raw (match #("PadSysex" 0 8 (lsp-completion-prefix #("Pad" 0 1 (fontified t) 1 2 (fontified t) 2 3 (fontified t)) lsp-completion-item #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("label" "PadSysex" "kind" 13 "detail" "PadInterface" "sortText" "   !" "insertTextFormat" 1 "textEdit" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("range" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("start" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("line" 25 "character" 2 ...)) "end" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("line" 25 "character" 5 ...)) ...)) "newText" "PadSysex" ...)) ...))))))
  company--force-sync(company-call-backend-raw (match #("PadSysex" 0 8 (lsp-completion-prefix #("Pad" 0 1 (fontified t) 1 2 (fontified t) 2 3 (fontified t)) lsp-completion-item #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("label" "PadSysex" "kind" 13 "detail" "PadInterface" "sortText" "   !" "insertTextFormat" 1 "textEdit" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("range" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("start" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("line" 25 "character" 2 ...)) "end" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("line" 25 "character" 5 ...)) ...)) "newText" "PadSysex" ...)) ...))))) company-lsp)
  company-call-backend(match #("PadSysex" 0 8 (lsp-completion-prefix #("Pad" 0 1 (fontified t) 1 2 (fontified t) 2 3 (fontified t)) lsp-completion-item #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("label" "PadSysex" "kind" 13 "detail" "PadInterface" "sortText" "   !" "insertTextFormat" 1 "textEdit" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("range" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("start" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("line" 25 "character" 2 ...)) "end" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("line" 25 "character" 5 ...)) ...)) "newText" "PadSysex" ...)) ...)))))
  company-fill-propertize(#("PadSysex" 0 8 (lsp-completion-prefix #("Pad" 0 1 (fontified t) 1 2 (fontified t) 2 3 (fontified t)) lsp-completion-item #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("label" "PadSysex" "kind" 13 "detail" "PadInterface" "sortText" "   !" "insertTextFormat" 1 "textEdit" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("range" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("start" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("line" 25 "character" 2 ...)) "end" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("line" 25 "character" 5 ...)) ...)) "newText" "PadSysex" ...)) ...)))) " PadInterface (Enum)" 103 t " " " 1 ")
  company--create-lines(0 10)
  company-pseudo-tooltip-show(19 2 0)
  company-pseudo-tooltip-show-at-point(963 3)
  #f(compiled-function (command) "`company-mode' frontend similar to a tooltip but based on overlays." #<bytecode 0x43f6d4f1>)(post-command)
  apply(#f(compiled-function (command) "`company-mode' frontend similar to a tooltip but based on overlays." #<bytecode 0x43f6d4f1>) post-command)
  company-pseudo-tooltip-frontend(post-command)
  company-pseudo-tooltip-unless-just-one-frontend(post-command)
  company-call-frontends(post-command)
  company-post-command()
  company-idle-begin(#<buffer PadInterface.cpp> #<window 34 on PadInterface.cpp> 1832 963)
  apply(company-idle-begin (#<buffer PadInterface.cpp> #<window 34 on PadInterface.cpp> 1832 963))
  timer-event-handler([t 23733 49939 467258 nil company-idle-begin (#<buffer PadInterface.cpp> #<window 34 on PadInterface.cpp> 1832 963) nil 0])

lane-s avatar Apr 16 '19 11:04 lane-s