Open ckruse opened 5 years ago
I hade the same issue on Emacs 27:
Debugger entered--Lisp error: (args-out-of-range 1 1)
get-text-property(1 c-fl-syn-tab)
c-clear-string-fences()
#f(compiled-function () #<bytecode 0x1feaab1c2421>)()
c-after-change(682 731 0)
run-hook-with-args(c-after-change 682 731 0)
#f(compiled-function () #<bytecode 0x1feaaae6b3e9>)()
funcall(#f(compiled-function () #<bytecode 0x1feaaae6b3e9>))
(let nil (funcall '#f(compiled-function () #<bytecode 0x1feaaae6b3e9>)))
eval((let nil (funcall '#f(compiled-function () #<bytecode 0x1feaaae6b3e9>))))
yas--snippet-create("decode_env_path(${1:const char *}, ${2:const char ..." nil 682 682)
yas-expand-snippet("decode_env_path(${1:const char *}, ${2:const char ..." 682 746)
company-lsp--post-completion(#(" decode_env_path(const char *, const char *, bool)" 0 50 (company-lsp-resolved t lsp-completion-item #<hash-table equal 8/8 0x1feaab7022b9> lsp-completion-prefix #("env" 0 3 (fontified t)))))
company-lsp(post-completion #(" decode_env_path(const char *, const char *, bool)" 0 50 (company-lsp-resolved t lsp-completion-item #<hash-table equal 8/8 0x1feaab7022b9> lsp-completion-prefix #("env" 0 3 (fontified t)))))
apply(company-lsp (post-completion #(" decode_env_path(const char *, const char *, bool)" 0 50 (company-lsp-resolved t lsp-completion-item #<hash-table equal 8/8 0x1feaab7022b9> lsp-completion-prefix #("env" 0 3 (fontified t))))))
company-call-backend-raw(post-completion #(" decode_env_path(const char *, const char *, bool)" 0 50 (company-lsp-resolved t lsp-completion-item #<hash-table equal 8/8 0x1feaab7022b9> lsp-completion-prefix #("env" 0 3 (fontified t)))))
apply(company-call-backend-raw (post-completion #(" decode_env_path(const char *, const char *, bool)" 0 50 (company-lsp-resolved t lsp-completion-item #<hash-table equal 8/8 0x1feaab7022b9> lsp-completion-prefix #("env" 0 3 (fontified t))))))
company--force-sync(company-call-backend-raw (post-completion #(" decode_env_path(const char *, const char *, bool)" 0 50 (company-lsp-resolved t lsp-completion-item #<hash-table equal 8/8 0x1feaab7022b9> lsp-completion-prefix #("env" 0 3 (fontified t))))) company-lsp)
company-call-backend(post-completion #(" decode_env_path(const char *, const char *, bool)" 0 50 (company-lsp-resolved t lsp-completion-item #<hash-table equal 8/8 0x1feaab7022b9> lsp-completion-prefix #("env" 0 3 (fontified t)))))
company-cancel(#(" decode_env_path(const char *, const char *, bool)" 0 50 (company-lsp-resolved t lsp-completion-item #<hash-table equal 8/8 0x1feaab7022b9> lsp-completion-prefix #("env" 0 3 (fontified t)))))
company-finish(#(" decode_env_path(const char *, const char *, bool)" 0 50 (company-lsp-resolved t lsp-completion-item #<hash-table equal 8/8 0x1feaab7022b9> lsp-completion-prefix #("env" 0 3 (fontified t)))))
company-complete-selection()
funcall-interactively(company-complete-selection)
call-interactively(company-complete-selection nil nil)
command-execute(company-complete-selection)
But no problem on Emacs 26, then I added an advice
to inhibit it:
(define-advice c-clear-string-fences (:around (fn) inhibit-args-out-of-range-error)
(ignore-errors
(funcall fn)))
Everything works fine.
I had this same error on my config, confirming the fix/workaround:
(use-package company-lsp
:after lsp company yasnippet
:init
(when (version<= "27" emacs-version)
(define-advice c-clear-string-fences
(:around (fn) inhibit-args-out-of-range-error)
(ignore-errors
(funcall fn)))))
Build info:
Hi there,
I get the following error in one of my projects:
When enabling
debug-on-error
I get this stacktrace:Am I doing something wrong or is this a bug?
Best regards, CK