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

`company-box-frontend` error.

Open joostkremers opened this issue 3 years ago • 8 comments

Hi, after a recent update of company, I now get the following error when company-box should kick in:

Company: An error occurred in auto-begin
Company: frontend company-box-frontend error "Wrong type argument: listp, company-tooltip" on command show

Any idea what might be causing this?

joostkremers avatar Mar 28 '21 16:03 joostkremers

Please M-x toggle-debug-on-error and post the full backtrace.

dgutov avatar Mar 28 '21 16:03 dgutov

I get the following backtrace:

Debugger entered--Lisp error: (wrong-type-argument listp company-tooltip)
  company-box--end-of-common(4 17)
  company-box--move-overlays(0)
  company-box--move-selection(t)
  company-box--display(#("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" 0 1 (company-box-candidate #("font-weight" 0 3 (face (completions-common-part)) 3 4 (face (completions-first-difference)))) 1 2 (company-box-candidate #("font-family" 0 3 (face (completions-common-part)) 3 4 (face (completions-first-difference)))) 2 3 (company-box-candidate #("font-size" 0 3 (face (completions-common-part)) 3 4 (face (completions-first-difference)))) 3 4 (company-box-candidate #("font" 0 3 (face (completions-common-part)) 3 4 (face (completions-first-difference)))) 4 5 (company-box-candidate #("font-style" 0 3 (face (completions-common-part)) 3 4 (face (completions-first-difference)))) 5 6 (company-box-candidate #("font-kerning" 0 3 (face (completions-common-part)) 3 4 (face (completions-first-difference)))) 6 7 (company-box-candidate #("font-stretch" 0 3 (face (completions-common-part)) 3 4 (face (completions-first-difference)))) 7 8 (company-box-candidate #("font-variant" 0 3 (face (completions-common-part)) 3 4 (face (completions-first-difference)))) 8 9 (company-box-candidate #("font-synthesis" 0 3 (face (completions-common-part)) 3 4 (face (completions-first-difference)))) 9 10 (company-box-candidate #("font-size-adjust" 0 3 (face (completions-common-part)) 3 4 (face (completions-first-difference)))) 10 11 (company-box-candidate #("font-variant-caps" 0 3 (face (completions-common-part)) 3 4 (face (completions-first-difference)))) 11 12 (company-box-candidate #("font-variant-numeric" 0 3 (face (completions-common-part)) 3 4 (face (completions-first-difference)))) 12 13 (company-box-candidate #("font-feature-settings" 0 3 (face (completions-common-part)) 3 4 (face (completions-first-difference)))) 13 14 (company-box-candidate #("font-variant-position" 0 3 (face (completions-common-part)) 3 4 (face (completions-first-difference)))) 14 15 (company-box-candidate #("font-language-override" 0 3 (face (completions-common-part)) 3 4 (face (completions-first-difference)))) 15 16 (company-box-candidate #("font-variant-ligatures" 0 3 (face (completions-common-part)) 3 4 (face (completions-first-difference)))) ...) nil)
  company-box-show()
  company-box-frontend(show)
  company-call-frontends(show)
  company--begin-new()
  company--perform()
  company-auto-begin()
  company-idle-begin(#<buffer styles.css> #<window 3 on styles.css> 160 1402)
  apply(company-idle-begin (#<buffer styles.css> #<window 3 on styles.css> 160 1402))
  timer-event-handler([t 24672 45172 218465 nil company-idle-begin (#<buffer styles.css> #<window 3 on styles.css> 160 1402) nil 259000])
  read-event(nil t 3)
  sit-for(3)
  flyspell-check-word-p()
  flyspell-post-command-hook()

joostkremers avatar Mar 28 '21 16:03 joostkremers

Thanks. That should be easy enough to fix in company-box--end-of-common.

The face property isn't always a list now: add-face-text-property also adds singleton values, not creating lists unnecessarily.

dgutov avatar Mar 28 '21 18:03 dgutov

BTW, I got such an error Company: frontend company-box-frontend error "Invalid alignment size -14, aborting" on command show, what could be the possible cause of this issue?

on99 avatar Mar 29 '21 03:03 on99

refs #123 refs #135

on99 avatar Mar 29 '21 04:03 on99

Also experiencing this issue.

MatthewZMD avatar Mar 29 '21 09:03 MatthewZMD

me too...

b40yd avatar Mar 30 '21 02:03 b40yd

Thanks. That should be easy enough to fix in company-box--end-of-common.

The face property isn't always a list now: add-face-text-property also adds singleton values, not creating lists unnecessarily.

@dgutov Thanks, that helped me create a patch. Not sure if it's the best way to solve it, but at least company-box is working again. Hopefully, @sebastiencs will find some time to merge the patch or come up with a better one.

joostkremers avatar Mar 30 '21 11:03 joostkremers

Fixed with https://github.com/sebastiencs/company-box/commit/aa5f09a5492344e3cc831f0f169a6a8345dec358

sebastiencs avatar Sep 10 '22 14:09 sebastiencs