Treemacs: Wrong type argument: arrayp, nil

Created on 25 Jul 2019  路  5Comments  路  Source: Alexander-Miller/treemacs

I've been using Treemacs for weeks now, but this morning suddenly all the treemacs commands I invoke (treemacs, treemacs-add-project etc) all return the same error: Wrong type argument: arrayp, nil

How can I fix this? Please let me know if you need more details.

Bug

Most helpful comment

Should be fixed now, though you may have to rebuild your workspace layout (I fixed a bug that would sometimes wipe it on update yesterday, I guess that's what happened to you originally).

All 5 comments

Try again with debug-on-error enabled. I'll need a stack trace to track this down.

It's probably related to this change: https://github.com/Alexander-Miller/treemacs/commit/38f5c7622815ee745e7a282047cc1b6cdefb002c#diff-a2c7a1c83fcd607a27b04f61df3cf555L56, but the workspace list is filled on the first run. How do you start treemacs?

Sure, here is the backtrace I get when I invoke treemacs (through my keybinding super-1):

Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
  treemacs--init()
  treemacs()
  funcall-interactively(treemacs)
  call-interactively(treemacs nil nil)
  command-execute(treemacs)

When I try to add a project "counter-app" (C-c C-p a) I get:

Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
  treemacs-add-project-to-workspace("/Users/ianyepan/counter-app/")
  funcall-interactively(treemacs-add-project-to-workspace "/Users/ianyepan/counter-app/")
  call-interactively(treemacs-add-project-to-workspace nil nil)
  command-execute(treemacs-add-project-to-workspace)

For your reference here's my treemacs config:

(use-package treemacs
  :after evil
  :config
  (global-set-key (kbd "s-1") 'treemacs)
  (setq treemacs-fringe-indicator-mode nil
        treemacs-no-png-images t
        treemacs-width 40
        treemacs-silent-refresh t
        treemacs-silent-filewatch t
        treemacs-file-event-delay 1000
        treemacs-file-follow-delay 0.1)
  (use-package treemacs-evil
    :after treemacs
    :config
    (evil-define-key 'treemacs treemacs-mode-map (kbd "l") 'treemacs-RET-action)
    (evil-define-key 'treemacs treemacs-mode-map (kbd "h") 'treemacs-TAB-action))
  (use-package treemacs-projectile :after treemacs projectile)
  (use-package treemacs-magit :after treemacs magit))

Should be fixed now, though you may have to rebuild your workspace layout (I fixed a bug that would sometimes wipe it on update yesterday, I guess that's what happened to you originally).

Yes, after pulling the update from MELPA, the issue disappeared. Cheers!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ianpan870102 picture ianpan870102  路  4Comments

ianpan870102 picture ianpan870102  路  7Comments

zoechi picture zoechi  路  6Comments

kenkangxgwe picture kenkangxgwe  路  9Comments

fiveNinePlusR picture fiveNinePlusR  路  12Comments