emacs-lsp/lsp-treemacs

dap-ui-sessions: Symbol’s value as variable is void: treemacs-\'lsp-treemacs-generic-root-extension-instance

jumper047 opened this issue · 12 comments

Updated all my packages, started dap-mode debugger and got this error.
Here is backtrace:

Debugger entered--Lisp error: (void-variable treemacs-\'lsp-treemacs-generic-root-extension-instance)
  lsp-treemacs-render(((:label #("Python: Remote Attach which workds" 0 34 (face dap-ui-sessions-active-session-face)) :key "Python: Remote Attach which workds" :session #s(dap--debug-session :name "Python: Remote Attach which workds" :last-id 12 :proc #<process Python: Remote Attach which workds> :response-handlers #<hash-table eql 0/65 0x158f0b5de62b> :parser #s(dap--parser :waiting-for-response nil :response-result nil :headers nil :body nil :reading-body nil :body-length nil :body-received nil :leftovers "") :output-buffer #<buffer *Python: Remote Attach which workds out*> :thread-id 1 :workspace nil :threads (#<hash-table equal 2/65 0x158f0df4ba35>) :thread-states #<hash-table eql 1/65 0x158f0b60e3bf> :active-frame-id nil :active-frame nil :cursor-marker nil :state running :breakpoints #<hash-table equal 3/65 0x158f0e43568d> :thread-stack-frames #<hash-table eql 0/65 0x158f0bd14069> :launch-args (:name "Python: Remote Attach which workds" :type "python" :request "attach" :justMyCode t :program "/home/dpshonko/Src/ncdn-filter-groups-sync/setup.p..." :args [] :host "localhost" :debugServer 5678) :local-to-remote-path-fn #f(compiled-function (&rest args2) #<bytecode -0xae2556e228b88ff>) :remote-to-local-path-fn #f(compiled-function (&rest args2) #<bytecode -0xae2556e23a788ff>) :current-capabilities #<hash-table equal 20/65 0x158f0b5edbf5> :error-message nil :loaded-sources nil :program-proc nil :metadata #<hash-table eql 0/65 0x158f0b60e3df> :output-displayed nil) :ret-action dap-ui-session-select :icon session-started :actions (["Select" dap-ui-session-select] ["Disconnect" dap-ui-disconnect] ["Delete Session" dap-ui-delete-session] "--" ["Delete All Sessions" dap-delete-all-sessions]) :children-async #f(compiled-function (node callback) #<bytecode -0x1c4a366aa3381fc6>))) " Debug Sessions " nil "*dap-ui-sessions*" (["Delete All Sessions" dap-delete-all-sessions]))
  dap-ui-sessions()
  #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_61>(sessions)
  mapc(#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_61> (sessions locals breakpoints expressions controls tooltip))
  seq-do(#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_61> (sessions locals breakpoints expressions controls tooltip))
  dap-ui--show-many-windows(#s(dap--debug-session :name "Python: Remote Attach which workds" :last-id 12 :proc #<process Python: Remote Attach which workds> :response-handlers #<hash-table eql 0/65 0x158f0b5de62b> :parser #s(dap--parser :waiting-for-response nil :response-result nil :headers nil :body nil :reading-body nil :body-length nil :body-received nil :leftovers "") :output-buffer #<buffer *Python: Remote Attach which workds out*> :thread-id 1 :workspace nil :threads (#<hash-table equal 2/65 0x158f0df4ba35>) :thread-states #<hash-table eql 1/65 0x158f0b60e3bf> :active-frame-id nil :active-frame nil :cursor-marker nil :state running :breakpoints #<hash-table equal 3/65 0x158f0e43568d> :thread-stack-frames #<hash-table eql 0/65 0x158f0bd14069> :launch-args (:name "Python: Remote Attach which workds" :type "python" :request "attach" :justMyCode t :program "/home/dpshonko/Src/ncdn-filter-groups-sync/setup.p..." :args [] :host "localhost" :debugServer 5678) :local-to-remote-path-fn #f(compiled-function (&rest args2) #<bytecode -0xae2556e228b88ff>) :remote-to-local-path-fn #f(compiled-function (&rest args2) #<bytecode -0xae2556e23a788ff>) :current-capabilities #<hash-table equal 20/65 0x158f0b5edbf5> :error-message nil :loaded-sources nil :program-proc nil :metadata #<hash-table eql 0/65 0x158f0b60e3df> :output-displayed nil))
  dap--select-thread-id(#s(dap--debug-session :name "Python: Remote Attach which workds" :last-id 12 :proc #<process Python: Remote Attach which workds> :response-handlers #<hash-table eql 0/65 0x158f0b5de62b> :parser #s(dap--parser :waiting-for-response nil :response-result nil :headers nil :body nil :reading-body nil :body-length nil :body-received nil :leftovers "") :output-buffer #<buffer *Python: Remote Attach which workds out*> :thread-id 1 :workspace nil :threads (#<hash-table equal 2/65 0x158f0df4ba35>) :thread-states #<hash-table eql 1/65 0x158f0b60e3bf> :active-frame-id nil :active-frame nil :cursor-marker nil :state running :breakpoints #<hash-table equal 3/65 0x158f0e43568d> :thread-stack-frames #<hash-table eql 0/65 0x158f0bd14069> :launch-args (:name "Python: Remote Attach which workds" :type "python" :request "attach" :justMyCode t :program "/home/dpshonko/Src/ncdn-filter-groups-sync/setup.p..." :args [] :host "localhost" :debugServer 5678) :local-to-remote-path-fn #f(compiled-function (&rest args2) #<bytecode -0xae2556e228b88ff>) :remote-to-local-path-fn #f(compiled-function (&rest args2) #<bytecode -0xae2556e23a788ff>) :current-capabilities #<hash-table equal 20/65 0x158f0b5edbf5> :error-message nil :loaded-sources nil :program-proc nil :metadata #<hash-table eql 0/65 0x158f0b60e3df> :output-displayed nil) 1)
  dap--on-event(#s(dap--debug-session :name "Python: Remote Attach which workds" :last-id 12 :proc #<process Python: Remote Attach which workds> :response-handlers #<hash-table eql 0/65 0x158f0b5de62b> :parser #s(dap--parser :waiting-for-response nil :response-result nil :headers nil :body nil :reading-body nil :body-length nil :body-received nil :leftovers "") :output-buffer #<buffer *Python: Remote Attach which workds out*> :thread-id 1 :workspace nil :threads (#<hash-table equal 2/65 0x158f0df4ba35>) :thread-states #<hash-table eql 1/65 0x158f0b60e3bf> :active-frame-id nil :active-frame nil :cursor-marker nil :state running :breakpoints #<hash-table equal 3/65 0x158f0e43568d> :thread-stack-frames #<hash-table eql 0/65 0x158f0bd14069> :launch-args (:name "Python: Remote Attach which workds" :type "python" :request "attach" :justMyCode t :program "/home/dpshonko/Src/ncdn-filter-groups-sync/setup.p..." :args [] :host "localhost" :debugServer 5678) :local-to-remote-path-fn #f(compiled-function (&rest args2) #<bytecode -0xae2556e228b88ff>) :remote-to-local-path-fn #f(compiled-function (&rest args2) #<bytecode -0xae2556e23a788ff>) :current-capabilities #<hash-table equal 20/65 0x158f0b5edbf5> :error-message nil :loaded-sources nil :program-proc nil :metadata #<hash-table eql 0/65 0x158f0b60e3df> :output-displayed nil) #<hash-table equal 4/65 0x158f0d4e6c21>)
  #f(compiled-function (m) #<bytecode -0x1cad5a4a82a9b027>)("{\"seq\": 27, \"type\": \"event\", \"event\": \"stopped\", \"...")
  mapc(#f(compiled-function (m) #<bytecode -0x1cad5a4a82a9b027>) ("{\"seq\": 27, \"type\": \"event\", \"event\": \"stopped\", \"..."))
  #f(compiled-function (_ msg) #<bytecode -0x13bcee353f66f22d>)(#<process Python: Remote Attach which workds> "Content-Length: 146\15\n\15\n{\"seq\": 27, \"type\": \"event\"...")

I'm getting a similar error when trying to open the lsp-treemacs-symbols view.

Error in post-command-hook (treemacs--post-command): (wrong-type-argument number-or-marker-p nil)
Error processing message (void-variable treemacs-\'lsp-treemacs-generic-root-extension-instance). [2 times]
Error in post-command-hook (treemacs--post-command): (wrong-type-argument number-or-marker-p nil)

Hello, thanks for this great tool!
Today, I made a clean/fresh installation of emacs w/ doom emacs and updated all my packages, then I'm trying to use it for flutter development with the lsp-dart, but when I will try to execute some flutter test, I'm getting a similar error :

lsp-dart-test-tree--render: Symbol’s value as variable is void: treemacs-\'lsp-treemacs-generic-root-extension-instance

I am on it, it is regression due to breaking change in treemacs

Had the same error as other people above, just updated and now dap-mode gets stuck before hitting a breakpoint.
Point is somehow in session view, and once I try to expand the current session with TAB I get the following error.
Could this still be a problem with the newest treemacs? Installed with straight, on Emacs 28.1.

Let me know if you need a more info.

Debugger entered--Lisp error: (invalid-function lsp-treemacs-wcb-unless-killed)
  lsp-treemacs-wcb-unless-killed(#<buffer *dap-ui-sessions*> nil)
  #f(compiled-function (result) #<bytecode -0x6cd481279c75f12>)(((:label #("MainThread  Breakpoint" 0 10 (face dap-ui-sessions-thread-active-face) 10 22 (face lsp-lens-face)) :key "1" :icon thread-stopped :ret-action dap-ui-thread-select :session #s(dap--debug-session :name "Python :: Run file (buffer)<1>" :last-id 8 :proc #<process Python :: Run file (buffer)<1>> :response-handlers #<hash-table eql 1/65 0x1581b2a5e501> :parser #s(dap--parser :waiting-for-response nil :response-result nil :headers nil :body nil :reading-body nil :body-length nil :body-received nil :leftovers "") :output-buffer #<buffer *Python :: Run file (buffer)<1> out*> :thread-id 1 :workspace nil :threads (#<hash-table equal 2/65 0x1581b38c7513>) :thread-states #<hash-table eql 1/65 0x1581b2a63e37> :active-frame-id nil :active-frame nil :cursor-marker nil :state running :breakpoints #<hash-table equal 1/65 0x1581b2e8707b> :thread-stack-frames #<hash-table eql 1/65 0x1581b2f22027> :launch-args (:type "python" :request "launch" :name "Python :: Run file (buffer)<1>" :program "/home/tim/drive/bandmate/bandmate/data.py" :args [] :dap-server-path ("/home/tim/miniconda3/envs/bm/bin/python" "-m" "debugpy.adapter")) :local-to-remote-path-fn #f(compiled-function (&rest args2) #<bytecode -0xae2420a1acd057f>) :remote-to-local-path-fn #f(compiled-function (&rest args2) #<bytecode -0xae2420bf2a9057f>) :current-capabilities #<hash-table equal 20/65 0x1581b244ac93> :error-message nil :loaded-sources nil :program-proc nil :metadata #<hash-table eql 0/65 0x1581b2c54fc1> :output-displayed nil) :thread-id 1 :actions (["Select" dap-ui-thread-select] ["Continue" dap-ui-continue] "--" ["Delete All Sessions" dap-delete-all-sessions]) :children-async #f(compiled-function (node callback) #<bytecode -0x9fdf7406115f41f>))))
  #f(compiled-function (input0) #<bytecode -0x1e272a75dff12ffe>)(#<hash-table equal 6/65 0x1581b2522395>)
  #f(compiled-function (m) #<bytecode 0x19fe750a7c491359>)("{\"seq\": 16, \"type\": \"response\", \"request_seq\": 8, ...")
  mapc(#f(compiled-function (m) #<bytecode 0x19fe750a7c491359>) ("{\"seq\": 16, \"type\": \"response\", \"request_seq\": 8, ..."))
  #f(compiled-function (_ msg) #<bytecode -0x127268effd5e20fc>)(#<process Python :: Run file (buffer)<1>> "Content-Length: 144\15\n\15\n{\"seq\": 16, \"type\": \"respon...")

@timlod try deleting elpa dir, restarting emacs, and installing the packages again.

@yyoncho getting the same error as @timlod.

@yyoncho getting the same error as @timlod as well, also get an "No message handler for processid" when starting debug session. this is using spacemacs on 28.1

Sorry for the late response. I was updating using straight, so that didn't really apply.
I did try again just now on a clean Emacs install using package.el (28.2) and still get the same error.

@timlod can you test with M-x lsp-start-plain?

@yyoncho gave this a try myself this morning and it sort of works, do not get the "invalid-function lsp-treemacs-wcb-unless-killed" message... however it does not select a stopped thread automatically (process does stop at a break point but it is not highlighted until the thread is selected) and the thread has to be re-selected after each step over / into.

however it does not select a stopped thread automatically (process does stop at a break point but it is not highlighted until the thread is selected) and the thread has to be re-selected after each step over / into.

that might be a regression but open a separate issue for this.

Will do,the "invalid-funtion lsp-treemacs-wcb-unless-killed" seems to only happen when "with-expanded-depth" is passed to treemacs-initialize, if i comment this out then spacemacs behaves in the same way as it did when running through lsp-start-plain