dvcrn / proton

space-atom. spacemacs and sublimious style editing in atom
GNU General Public License v3.0
565 stars 55 forks source link

Crashed atom with undefined length with my layers config #173

Open rxqd opened 8 years ago

rxqd commented 8 years ago

This is compiled version from master. Same error with atom.io version [Enter steps to reproduce below:]

I've just added couple of layers and restart atom.

My layers is

:layers
  [
    ;; -----------------------------------
    ;; core layer. Don't remove.
    ;; -----------------------------------
    :core

    ;; -----------------------------------
    ;; tools
    ;; -----------------------------------
    :tools/git
    :tools/bookmarks

    ;; -----------------------------------
    ;; Languages
    ;; -----------------------------------
    :lang/clojure
    :lang/markdown
    :lang/html
    :lang/javascript
    :lang/css
    :lang/ruby

  ]

  ;

Atom Version: 1.5.4 System: Mac OS X 10.10.2 Thrown From: proton-mode package, v0.8.0

Stack Trace

Uncaught TypeError: Cannot read property 'length' of undefined

At /Users/mvl/dev/proton/plugin/lib/proton.js:2011

TypeError: Cannot read property 'length' of undefined
    at Function.cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2 (/Users/mvl/dev/proton/plugin/lib/proton.js:392:197)
    at Function.cljs.core.array_seq.cljs$core$IFn$_invoke$arity$1 (/Users/mvl/dev/proton/plugin/lib/proton.js:394:89)
    at /Users/mvl/dev/proton/plugin/lib/proton.js:2706:265
    at [object Object].cljs.core.MultiFn.cljs$core$IFn$_invoke$arity$1 (/Users/mvl/dev/proton/plugin/lib/proton.js:1666:400)
    at /Users/mvl/dev/proton/plugin/lib/proton.js:2641:33
    at /Users/mvl/dev/proton/plugin/lib/proton.js:875:207
    at /Users/mvl/dev/proton/plugin/lib/proton.js:875:220
    at [object Object].cljs.core.LazySeq.sval (/Users/mvl/dev/proton/plugin/lib/proton.js:611:253)
    at [object Object].cljs.core.LazySeq.cljs$core$ISeqable$_seq$arity$1 (/Users/mvl/dev/proton/plugin/lib/proton.js:614:233)
    at Object.cljs.core.seq (/Users/mvl/dev/proton/plugin/lib/proton.js:355:142)
    at [object Object].cljs.core.Cons.cljs$core$INext$_next$arity$1 (/Users/mvl/dev/proton/plugin/lib/proton.js:593:250)
    at Object.cljs.core.next (/Users/mvl/dev/proton/plugin/lib/proton.js:357:123)
    at Function.cljs.core.dorun.cljs$core$IFn$_invoke$arity$1 (/Users/mvl/dev/proton/plugin/lib/proton.js:1492:478)
    at Function.cljs.core.doall.cljs$core$IFn$_invoke$arity$1 (/Users/mvl/dev/proton/plugin/lib/proton.js:1494:455)
    at Object.proton.lib.proton.run_init_package_hook (/Users/mvl/dev/proton/plugin/lib/proton.js:2640:285)
    at Object.proton.lib.package_manager.enable_package (/Users/mvl/dev/proton/plugin/lib/proton.js:2669:204)
    at /Users/mvl/dev/proton/plugin/lib/proton.js:2676:418
    at /Users/mvl/dev/proton/plugin/lib/proton.js:875:207
    at /Users/mvl/dev/proton/plugin/lib/proton.js:875:220
    at [object Object].cljs.core.LazySeq.sval (/Users/mvl/dev/proton/plugin/lib/proton.js:611:253)
    at [object Object].cljs.core.LazySeq.cljs$core$ISeqable$_seq$arity$1 (/Users/mvl/dev/proton/plugin/lib/proton.js:614:233)
    at Object.cljs.core.seq (/Users/mvl/dev/proton/plugin/lib/proton.js:355:142)
    at [object Object].cljs.core.Cons.cljs$core$INext$_next$arity$1 (/Users/mvl/dev/proton/plugin/lib/proton.js:593:250)
    at Object.cljs.core.next (/Users/mvl/dev/proton/plugin/lib/proton.js:357:123)
    at Function.cljs.core.dorun.cljs$core$IFn$_invoke$arity$1 (/Users/mvl/dev/proton/plugin/lib/proton.js:1492:478)
    at Function.cljs.core.doall.cljs$core$IFn$_invoke$arity$1 (/Users/mvl/dev/proton/plugin/lib/proton.js:1494:455)
    at Object.proton.lib.package_manager.activate_packages_BANG_ (/Users/mvl/dev/proton/plugin/lib/proton.js:2676:277)
    at /Users/mvl/dev/proton/plugin/lib/proton.js:3014:483
    at d (/Users/mvl/dev/proton/plugin/lib/proton.js:3009:204)
    at b (/Users/mvl/dev/proton/plugin/lib/proton.js:3010:17)
    at Object.cljs.core.async.impl.ioc_helpers.run_state_machine (/Users/mvl/dev/proton/plugin/lib/proton.js:2010:198)
    at Object.cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped (/Users/mvl/dev/proton/plugin/lib/proton.js:2011:116)
    at /Users/mvl/dev/proton/plugin/lib/proton.js:3040:210
    at Immediate.cljs.core.async.impl.dispatch.process_messages [as _onImmediate] (/Users/mvl/dev/proton/plugin/lib/proton.js:1967:298)
    at processImmediate [as _immediateCallback] (timers.js:374:17)

Commands

  4x -0:06.4.0 blur (atom-pane.pane.active)

Config

{
  "core": {
    "disabledPackages": [
      "relative-numbers"
    ],
    "themes": [
      "nucleus-dark-ui",
      "atom-dark-fusion-syntax"
    ]
  }
}

Installed Packages

# User
Parinfer, v1.14.0
atom-dark-fusion-syntax, v1.1.0
atom-ternjs, v0.13.2
atomatigit, v1.5.5
autoclose-html, v0.23.0
autocomplete-html-entities, v0.1.0
autocomplete-modules, v1.4.1
autocomplete-paths, v1.0.2
autocomplete-ruby, v0.1.0
autoupdate-packages, v1.3.1
css-snippets, v0.9.0
docblockr, v0.7.3
easy-motion-redux, v1.0.0
emmet, v2.4.1
environment, v1.1.1
file-icons, v1.6.17
highlight-line, v0.11.1
highlight-selected, v0.11.2
ink, v0.4.0
javascript-snippets, v1.2.1
language-diff, v0.4.0
markdown-scroll-sync, v2.1.2
nucleus-dark-ui, v0.7.10
pigments, v0.24.2
project-manager, v2.7.6
proto-repl, v0.16.2
proton-mode, v0.8.0
react, v0.14.1
react-snippets, v0.3.0
recent-files-fuzzy-finder, v0.2.4
release-notes, v0.53.0
ruby-block, v0.3.5
ruby-block-converter, v3.5.0
vim-mode-plus, v0.22.1
zentabs, v0.8.7

# Dev
No dev packages
rxqd commented 8 years ago

Oh, I've added linter and it works. Need check for main linter package in dependences

geksilla commented 8 years ago

@mli-max, thanks for report! So you've added :tools/linter to .proton and error not throws?

rxqd commented 8 years ago

@geksilla oh, no. It were installed but I have error again. Check please

Stack Trace

Uncaught TypeError: Cannot read property 'length' of undefined

At /Users/mvl/dev/proton/plugin/lib/proton.js:2011

TypeError: Cannot read property 'length' of undefined
    at Function.cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2 (/Users/mvl/dev/proton/plugin/lib/proton.js:392:197)
    at Function.cljs.core.array_seq.cljs$core$IFn$_invoke$arity$1 (/Users/mvl/dev/proton/plugin/lib/proton.js:394:89)
    at /Users/mvl/dev/proton/plugin/lib/proton.js:2706:265
    at [object Object].cljs.core.MultiFn.cljs$core$IFn$_invoke$arity$1 (/Users/mvl/dev/proton/plugin/lib/proton.js:1666:400)
    at /Users/mvl/dev/proton/plugin/lib/proton.js:2641:33
    at /Users/mvl/dev/proton/plugin/lib/proton.js:875:207
    at /Users/mvl/dev/proton/plugin/lib/proton.js:875:220
    at [object Object].cljs.core.LazySeq.sval (/Users/mvl/dev/proton/plugin/lib/proton.js:611:253)
    at [object Object].cljs.core.LazySeq.cljs$core$ISeqable$_seq$arity$1 (/Users/mvl/dev/proton/plugin/lib/proton.js:614:233)
    at Object.cljs.core.seq (/Users/mvl/dev/proton/plugin/lib/proton.js:355:142)
    at [object Object].cljs.core.Cons.cljs$core$INext$_next$arity$1 (/Users/mvl/dev/proton/plugin/lib/proton.js:593:250)
    at Object.cljs.core.next (/Users/mvl/dev/proton/plugin/lib/proton.js:357:123)
    at Function.cljs.core.dorun.cljs$core$IFn$_invoke$arity$1 (/Users/mvl/dev/proton/plugin/lib/proton.js:1492:478)
    at Function.cljs.core.doall.cljs$core$IFn$_invoke$arity$1 (/Users/mvl/dev/proton/plugin/lib/proton.js:1494:455)
    at Object.proton.lib.proton.run_init_package_hook (/Users/mvl/dev/proton/plugin/lib/proton.js:2640:285)
    at Object.proton.lib.package_manager.enable_package (/Users/mvl/dev/proton/plugin/lib/proton.js:2669:204)
    at /Users/mvl/dev/proton/plugin/lib/proton.js:2676:418
    at /Users/mvl/dev/proton/plugin/lib/proton.js:875:207
    at /Users/mvl/dev/proton/plugin/lib/proton.js:875:220
    at [object Object].cljs.core.LazySeq.sval (/Users/mvl/dev/proton/plugin/lib/proton.js:611:253)
    at [object Object].cljs.core.LazySeq.cljs$core$ISeqable$_seq$arity$1 (/Users/mvl/dev/proton/plugin/lib/proton.js:614:233)
    at Object.cljs.core.seq (/Users/mvl/dev/proton/plugin/lib/proton.js:355:142)
    at [object Object].cljs.core.Cons.cljs$core$INext$_next$arity$1 (/Users/mvl/dev/proton/plugin/lib/proton.js:593:250)
    at Object.cljs.core.next (/Users/mvl/dev/proton/plugin/lib/proton.js:357:123)
    at Function.cljs.core.dorun.cljs$core$IFn$_invoke$arity$1 (/Users/mvl/dev/proton/plugin/lib/proton.js:1492:478)
    at Function.cljs.core.doall.cljs$core$IFn$_invoke$arity$1 (/Users/mvl/dev/proton/plugin/lib/proton.js:1494:455)
    at Object.proton.lib.package_manager.activate_packages_BANG_ (/Users/mvl/dev/proton/plugin/lib/proton.js:2676:277)
    at /Users/mvl/dev/proton/plugin/lib/proton.js:3014:483
    at d (/Users/mvl/dev/proton/plugin/lib/proton.js:3009:204)
    at b (/Users/mvl/dev/proton/plugin/lib/proton.js:3010:17)
    at Object.cljs.core.async.impl.ioc_helpers.run_state_machine (/Users/mvl/dev/proton/plugin/lib/proton.js:2010:198)
    at Object.cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped (/Users/mvl/dev/proton/plugin/lib/proton.js:2011:116)
    at /Users/mvl/dev/proton/plugin/lib/proton.js:3040:210
    at Immediate.cljs.core.async.impl.dispatch.process_messages [as _onImmediate] (/Users/mvl/dev/proton/plugin/lib/proton.js:1967:298)
    at processImmediate [as _immediateCallback] (timers.js:374:17)

Commands

  3x -0:08.1.0 blur (atom-pane.pane.active)

Config

{
  "core": {
    "disabledPackages": [
      "relative-numbers",
      "linter-jshint"
    ],
    "themes": [
      "nucleus-dark-ui",
      "atom-dark-fusion-syntax"
    ]
  }
}

Installed Packages

# User
Parinfer, v1.14.0
atom-dark-fusion-syntax, v1.1.0
atom-ternjs, v0.13.2
atomatigit, v1.5.5
autoclose-html, v0.23.0
autocomplete-html-entities, v0.1.0
autocomplete-modules, v1.4.1
autocomplete-paths, v1.0.2
autocomplete-ruby, v0.1.0
autoupdate-packages, v1.3.1
css-snippets, v0.9.0
docblockr, v0.7.3
easy-motion-redux, v1.0.0
emmet, v2.4.1
environment, v1.1.1
file-icons, v1.6.17
highlight-line, v0.11.1
highlight-selected, v0.11.2
ink, v0.4.0
javascript-snippets, v1.2.1
language-diff, v0.4.0
linter, v1.11.3
linter-bootlint, v1.0.2
linter-clojure, v1.1.2
linter-csslint, v1.3.1
linter-eslint, v7.0.0
linter-markdown, v1.5.0
linter-rubocop, v0.4.7
linter-ruby, v1.2.2
linter-xmllint, v1.3.4
markdown-scroll-sync, v2.1.2
nucleus-dark-ui, v0.7.10
pigments, v0.24.2
project-manager, v2.7.6
proto-repl, v0.16.2
proton-mode, v0.8.0
react, v0.14.1
react-snippets, v0.3.0
recent-files-fuzzy-finder, v0.2.4
release-notes, v0.53.0
ruby-block, v0.3.5
ruby-block-converter, v3.5.0
vim-mode-plus, v0.22.1
zentabs, v0.8.7
rxqd commented 8 years ago

Also, link to create an issue from atom leads to https://github.com/dvcrn/proton-bin/issues/new. is it atom url based on package?

geksilla commented 8 years ago

@mli-max no needs to create issue in proton-bin repo. All issues and PRs are handled here.

geksilla commented 8 years ago

@mli-max, could you please check config value for "proton.core.selectedLayers"?

You can do this using devtools.

execute following snippet:

atom.config.get('proton.core.selectedLayers');

Or open your config using Command Pallette and check its value there.

Thanks.

rxqd commented 8 years ago

["core", "tools/git", "tools/linter", "tools/bookmarks", "lang/clojure", "lang/markdown", "lang/html", "lang/javascript", "lang/css", "lang/ruby"]

rxqd commented 8 years ago

@geksilla this is in lang/html, I deleted one by one package and it has gone after html

geksilla commented 8 years ago

@mli-max, thanks for investigation. Same problem and layer configuration was reported by @austincrft on slack. This is strange a bit since I also use :lang/html layer and don't get this error. I will take a look guys.

If you use master branch version, may be this workaround will work for you: Change this method with:

(defn run-init-package-hook [package-name]
  (if-let [selected-layers (atom-env/get-config "proton.core.selectedLayers")]
    (when-not (empty? selected-layers)
      (let [layers (map keyword (array-seq selected-layers))]
        (doall (map #(layerbase/init-package [% package-name]) layers))))))
geksilla commented 8 years ago

I've found the issue.

additionalGrammars config was removed from autoclose-html package.

rxqd commented 8 years ago

I checked my previous config without linter, removed html and it works. So linter dependences are not installed. Good for me.

geksilla commented 8 years ago

fixed by #174

rxqd commented 8 years ago

@geksilla I have checked, it seems it is not fixed. I used last version from master then compile and install