emacs-lsp / lsp-ui

UI integrations for lsp-mode
https://emacs-lsp.github.io/lsp-ui
GNU General Public License v3.0
1.03k stars 141 forks source link

[BUG] Wrong type argument number-or-marker-p with `flycheck`? #366

Open jcs090218 opened 4 years ago

jcs090218 commented 4 years ago

I thinks pos-tip has the recent update? Not quite sure how I am going to reproduce this. Hence, I paste the Backtrace here. Seems like there are wrong type argument with flycheck?

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  pos-tip-show-no-propertize(#("typescript: Identifier expected. [1003]" 0 39 (face (:font #<font-entity uniscribe outline Ubuntu\ Mono mono iso8859-1 normal normal normal 0 nil 110 nil ((:format . opentype) (:script symbol cyrillic greek phonetic latin))> :foreground "systeminfotext" :background "systeminfowindow"))) nil nil #<window 8 on CQ_InputManager.ts> 5 396 29 nil nil nil)
  pos-tip-show("typescript: Identifier expected. [1003]" nil nil nil 5 nil nil nil nil)
  flycheck-pos-tip-error-messages((#s(flycheck-error :buffer #<buffer CQ_InputManager.ts> :checker lsp-ui :filename "c:/Users/test/Downloads/workspace/CCosQuick/assets..." :line 26 :column 42 :message "typescript: Identifier expected." :level error :id 1003 :group nil)))
  flycheck-display-errors((#s(flycheck-error :buffer #<buffer CQ_InputManager.ts> :checker lsp-ui :filename "c:/Users/test/Downloads/workspace/CCosQuick/assets..." :line 26 :column 42 :message "typescript: Identifier expected." :level error :id 1003 :group nil)))
  flycheck-display-error-at-point()
  flycheck-finish-current-syntax-check((#s(flycheck-error :buffer #<buffer CQ_InputManager.ts> :checker lsp-ui :filename "c:/Users/test/Downloads/workspace/CCosQuick/assets..." :line 37 :column 21 :message "typescript: Parameter 'event' implicitly has an 'a..." :level info :id 7044 :group nil) #s(flycheck-error :buffer #<buffer CQ_InputManager.ts> :checker lsp-ui :filename "c:/Users/test/Downloads/workspace/CCosQuick/assets..." :line 33 :column 23 :message "typescript: Parameter 'event' implicitly has an 'a..." :level info :id 7044 :group nil) #s(flycheck-error :buffer #<buffer CQ_InputManager.ts> :checker lsp-ui :filename "c:/Users/test/Downloads/workspace/CCosQuick/assets..." :line 9 :column 17 :message "typescript: 'property' is declared but its value i..." :level info :id 6133 :group nil) #s(flycheck-error :buffer #<buffer CQ_InputManager.ts> :checker lsp-ui :filename "c:/Users/test/Downloads/workspace/CCosQuick/assets..." :line 26 :column 24 :message "typescript: Expected 2-4 arguments, but got 1." :level error :id 2554 :group nil) #s(flycheck-error :buffer #<buffer CQ_InputManager.ts> :checker lsp-ui :filename "c:/Users/test/Downloads/workspace/CCosQuick/assets..." :line 26 :column 42 :message "typescript: Identifier expected." :level error :id 1003 :group nil)) "c:/Users/test/Downloads/workspace/CCosQuick/assets...")
  flycheck-report-buffer-checker-status(#s(flycheck-syntax-check :buffer #<buffer CQ_InputManager.ts> :checker lsp-ui :context nil :working-directory "c:/Users/test/Downloads/workspace/CCosQuick/assets...") finished (#s(flycheck-error :buffer #<buffer CQ_InputManager.ts> :checker lsp-ui :filename "c:/Users/test/Downloads/workspace/CCosQuick/assets..." :line 37 :column 21 :message "typescript: Parameter 'event' implicitly has an 'a..." :level info :id 7044 :group nil) #s(flycheck-error :buffer #<buffer CQ_InputManager.ts> :checker lsp-ui :filename "c:/Users/test/Downloads/workspace/CCosQuick/assets..." :line 33 :column 23 :message "typescript: Parameter 'event' implicitly has an 'a..." :level info :id 7044 :group nil) #s(flycheck-error :buffer #<buffer CQ_InputManager.ts> :checker lsp-ui :filename "c:/Users/test/Downloads/workspace/CCosQuick/assets..." :line 9 :column 17 :message "typescript: 'property' is declared but its value i..." :level info :id 6133 :group nil) #s(flycheck-error :buffer #<buffer CQ_InputManager.ts> :checker lsp-ui :filename "c:/Users/test/Downloads/workspace/CCosQuick/assets..." :line 26 :column 24 :message "typescript: Expected 2-4 arguments, but got 1." :level error :id 2554 :group nil) #s(flycheck-error :buffer #<buffer CQ_InputManager.ts> :checker lsp-ui :filename "c:/Users/test/Downloads/workspace/CCosQuick/assets..." :line 26 :column 42 :message "typescript: Identifier expected." :level error :id 1003 :group nil)))
  apply(flycheck-report-buffer-checker-status #s(flycheck-syntax-check :buffer #<buffer CQ_InputManager.ts> :checker lsp-ui :context nil :working-directory "c:/Users/test/Downloads/workspace/CCosQuick/assets...") (finished (#s(flycheck-error :buffer #<buffer CQ_InputManager.ts> :checker lsp-ui :filename "c:/Users/test/Downloads/workspace/CCosQuick/assets..." :line 37 :column 21 :message "typescript: Parameter 'event' implicitly has an 'a..." :level info :id 7044 :group nil) #s(flycheck-error :buffer #<buffer CQ_InputManager.ts> :checker lsp-ui :filename "c:/Users/test/Downloads/workspace/CCosQuick/assets..." :line 33 :column 23 :message "typescript: Parameter 'event' implicitly has an 'a..." :level info :id 7044 :group nil) #s(flycheck-error :buffer #<buffer CQ_InputManager.ts> :checker lsp-ui :filename "c:/Users/test/Downloads/workspace/CCosQuick/assets..." :line 9 :column 17 :message "typescript: 'property' is declared but its value i..." :level info :id 6133 :group nil) #s(flycheck-error :buffer #<buffer CQ_InputManager.ts> :checker lsp-ui :filename "c:/Users/test/Downloads/workspace/CCosQuick/assets..." :line 26 :column 24 :message "typescript: Expected 2-4 arguments, but got 1." :level error :id 2554 :group nil) #s(flycheck-error :buffer #<buffer CQ_InputManager.ts> :checker lsp-ui :filename "c:/Users/test/Downloads/workspace/CCosQuick/assets..." :line 26 :column 42 :message "typescript: Identifier expected." :level error :id 1003 :group nil))))
  #f(compiled-function (&rest args) #<bytecode 0x42b881d>)(finished (#s(flycheck-error :buffer #<buffer CQ_InputManager.ts> :checker lsp-ui :filename "c:/Users/test/Downloads/workspace/CCosQuick/assets..." :line 37 :column 21 :message "typescript: Parameter 'event' implicitly has an 'a..." :level info :id 7044 :group nil) #s(flycheck-error :buffer #<buffer CQ_InputManager.ts> :checker lsp-ui :filename "c:/Users/test/Downloads/workspace/CCosQuick/assets..." :line 33 :column 23 :message "typescript: Parameter 'event' implicitly has an 'a..." :level info :id 7044 :group nil) #s(flycheck-error :buffer #<buffer CQ_InputManager.ts> :checker lsp-ui :filename "c:/Users/test/Downloads/workspace/CCosQuick/assets..." :line 9 :column 17 :message "typescript: 'property' is declared but its value i..." :level info :id 6133 :group nil) #s(flycheck-error :buffer #<buffer CQ_InputManager.ts> :checker lsp-ui :filename "c:/Users/test/Downloads/workspace/CCosQuick/assets..." :line 26 :column 24 :message "typescript: Expected 2-4 arguments, but got 1." :level error :id 2554 :group nil) #s(flycheck-error :buffer #<buffer CQ_InputManager.ts> :checker lsp-ui :filename "c:/Users/test/Downloads/workspace/CCosQuick/assets..." :line 26 :column 42 :message "typescript: Identifier expected." :level error :id 1003 :group nil)))
  lsp-ui-flycheck--start(lsp-ui #f(compiled-function (&rest args) #<bytecode 0x42b881d>))
  flycheck-syntax-check-start(#s(flycheck-syntax-check :buffer #<buffer CQ_InputManager.ts> :checker lsp-ui :context nil :working-directory "c:/Users/test/Downloads/workspace/CCosQuick/assets...") #f(compiled-function (&rest args) #<bytecode 0x42b881d>))
  flycheck-start-current-syntax-check(lsp-ui)
  flycheck-buffer()
  lsp-ui-flycheck--report()
  run-hooks(lsp-after-diagnostics-hook)
  lsp--on-diagnostics(#s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 17/65 0x3386cad> :registered-server-capabilities nil :root "c:/Users/test/Downloads/workspace/CCosQuick" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect #f(compiled-function (filter sentinel name environment-fn) #<bytecode 0x2b88c19>) :test\? #f(compiled-function () #<bytecode 0x2b88415>)) :ignore-regexps nil :ignore-messages ("readFile .*? requested by TypeScript but content n...") :notification-handlers #<hash-table equal 0/65 0x2b87601> :request-handlers #<hash-table equal 0/65 0x2b877ad> :response-handlers #<hash-table eql 0/65 0x2b877cd> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x2b877ed> :action-handlers #<hash-table equal 0/65 0x2b89c01> :major-modes nil :activation-fn lsp-typescript-javascript-tsx-jsx-activate-p :priority -2 :server-id ts-ls :multi-root nil :initialization-options #f(compiled-function () #<bytecode 0x2b8872d>) :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? t :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x2b87fe5>) :host-root nil :proc #<process ts-ls<1>> :cmd-proc #<process ts-ls<1>> :buffers (#<buffer CQ_InputManager.ts> #<buffer CQ_Input.ts> #<buffer CQ_TestNode.ts> #<buffer CQ_TestNetwork.ts>) :semantic-highlighting-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x3281465> :watches #<hash-table equal 0/65 0x2ba21c5> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 4/65 0x2ba41e5>) #<hash-table equal 2/65 0x42b8ff5>)
  lsp--on-notification(#s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 17/65 0x3386cad> :registered-server-capabilities nil :root "c:/Users/test/Downloads/workspace/CCosQuick" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect #f(compiled-function (filter sentinel name environment-fn) #<bytecode 0x2b88c19>) :test\? #f(compiled-function () #<bytecode 0x2b88415>)) :ignore-regexps nil :ignore-messages ("readFile .*? requested by TypeScript but content n...") :notification-handlers #<hash-table equal 0/65 0x2b87601> :request-handlers #<hash-table equal 0/65 0x2b877ad> :response-handlers #<hash-table eql 0/65 0x2b877cd> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x2b877ed> :action-handlers #<hash-table equal 0/65 0x2b89c01> :major-modes nil :activation-fn lsp-typescript-javascript-tsx-jsx-activate-p :priority -2 :server-id ts-ls :multi-root nil :initialization-options #f(compiled-function () #<bytecode 0x2b8872d>) :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? t :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x2b87fe5>) :host-root nil :proc #<process ts-ls<1>> :cmd-proc #<process ts-ls<1>> :buffers (#<buffer CQ_InputManager.ts> #<buffer CQ_Input.ts> #<buffer CQ_TestNode.ts> #<buffer CQ_TestNetwork.ts>) :semantic-highlighting-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x3281465> :watches #<hash-table equal 0/65 0x2ba21c5> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 4/65 0x2ba41e5>) #<hash-table equal 3/65 0x42b8fd5>)
  lsp--parser-on-message(#<hash-table equal 3/65 0x42b8fd5> #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 17/65 0x3386cad> :registered-server-capabilities nil :root "c:/Users/test/Downloads/workspace/CCosQuick" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect #f(compiled-function (filter sentinel name environment-fn) #<bytecode 0x2b88c19>) :test\? #f(compiled-function () #<bytecode 0x2b88415>)) :ignore-regexps nil :ignore-messages ("readFile .*? requested by TypeScript but content n...") :notification-handlers #<hash-table equal 0/65 0x2b87601> :request-handlers #<hash-table equal 0/65 0x2b877ad> :response-handlers #<hash-table eql 0/65 0x2b877cd> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x2b877ed> :action-handlers #<hash-table equal 0/65 0x2b89c01> :major-modes nil :activation-fn lsp-typescript-javascript-tsx-jsx-activate-p :priority -2 :server-id ts-ls :multi-root nil :initialization-options #f(compiled-function () #<bytecode 0x2b8872d>) :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? t :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x2b87fe5>) :host-root nil :proc #<process ts-ls<1>> :cmd-proc #<process ts-ls<1>> :buffers (#<buffer CQ_InputManager.ts> #<buffer CQ_Input.ts> #<buffer CQ_TestNode.ts> #<buffer CQ_TestNetwork.ts>) :semantic-highlighting-faces nil :extra-client-capabilities nil :status initialized :metadata #<hash-table equal 0/65 0x3281465> :watches #<hash-table equal 0/65 0x2ba21c5> :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics #<hash-table equal 4/65 0x2ba41e5>))
  #f(compiled-function (proc input) #<bytecode 0x328400d>)(#<process ts-ls<1>> "Content-Length: 1021\15\n\15\n{\"jsonrpc\":\"2.0\",\"method\":...")
dgud commented 4 years ago

I noticed that if I have (global-flycheck-mode) in my .emacs, flycheck (or lsp) crashes. But if I do not enable global-flycheck and lets lsp-mode handle that it works.

Do not know if it's related at all, or if it's the same error but thought the info might be a clue (or a workaround as it is for me).