Osmose / advanced-open-file

Open files and folders in Atom easily.
https://atom.io/packages/advanced-open-file
Other
118 stars 20 forks source link

Uncaught TypeError: Invalid value used as weak map key #78

Closed destenson closed 8 years ago

destenson commented 8 years ago

This seems to occur whenever I attempt to close the last tab.

  1. Open document(s).
  2. Close them one-by-one.

Atom Version: 1.3.2 System: Microsoft Windows 10 Home Thrown From: advanced-open-file package, v0.13.0

Stack Trace

Uncaught TypeError: Invalid value used as weak map key

At /C:/Users/deste_000/.atom/packages/epitools/lib/epitools.coffee:50

TypeError: Invalid value used as weak map key
    at WeakMap.set (native)
    at Object.module.exports.Epitools.refresh (file:///C:/Users/deste_000/.atom/packages/epitools/lib/epitools.coffee:40:27)
    at Emitter.module.exports.Emitter.emit (C:\Users\deste_000\AppData\Local\atom\app-1.3.2\resources\app.asar\node_modules\event-kit\lib\emitter.js:86:11)
    at C:\Users\deste_000\AppData\Local\atom\app-1.3.2\resources\app.asar\src\pane-container.js:333:27
    at Emitter.module.exports.Emitter.emit (C:\Users\deste_000\AppData\Local\atom\app-1.3.2\resources\app.asar\node_modules\event-kit\lib\emitter.js:86:11)
    at Pane.module.exports.Pane.setActiveItem (C:\Users\deste_000\AppData\Local\atom\app-1.3.2\resources\app.asar\src\pane.js:248:22)
    at Pane.module.exports.Pane.removeItem (C:\Users\deste_000\AppData\Local\atom\app-1.3.2\resources\app.asar\src\pane.js:387:16)
    at Pane.module.exports.Pane.destroyItem (C:\Users\deste_000\AppData\Local\atom\app-1.3.2\resources\app.asar\src\pane.js:453:16)
    at atom-tabs.TabBarView.onClick (C:\Users\deste_000\AppData\Local\atom\app-1.3.2\resources\app.asar\node_modules\tabs\lib\tab-bar-view.js:695:17)

Commands

     -4:55.2.0 core:move-up (atom-text-editor.editor.is-focused)
     -4:54.7.0 editor:newline (atom-text-editor.editor.is-focused)
  3x -4:54.4.0 core:move-up (atom-text-editor.editor.is-focused)
     -4:53.7.0 editor:newline (atom-text-editor.editor.is-focused)
  5x -4:53.3.0 core:move-down (atom-text-editor.editor.is-focused)
     -4:52.5.0 editor:newline (atom-text-editor.editor.is-focused)
     -4:51 core:save (atom-text-editor.editor.is-focused)
     -4:40.9.0 linter:next-error (atom-workspace.workspace.scrollbars-visible-always.theme-atom-dark-syntax.theme-atom-dark-ui.find-visible)
  3x -4:28.2.0 omnisharp-atom:dock-toggle-errors (atom-workspace.workspace.scrollbars-visible-always.theme-atom-dark-syntax.theme-atom-dark-ui.find-visible)
     -4:04.4.0 omnisharp-atom:solution-status (atom-workspace.workspace.scrollbars-visible-always.theme-atom-dark-syntax.theme-atom-dark-ui.find-visible)
     -4:01.1.0 omnisharp-atom:restart-server (atom-workspace.workspace.scrollbars-visible-always.theme-atom-dark-syntax.theme-atom-dark-ui.find-visible)
     -3:03.0 find-and-replace:toggle (atom-text-editor.editor.mini.is-focused)
  2x -2:57.5.0 project-find:toggle (atom-text-editor.editor.is-focused)
     -2:49.1.0 omnisharp-atom:stop-server (atom-workspace.workspace.scrollbars-visible-always.theme-atom-dark-syntax.theme-atom-dark-ui)
     -2:47.8.0 omnisharp-atom:start-server (atom-workspace.workspace.scrollbars-visible-always.theme-atom-dark-syntax.theme-atom-dark-ui)
     -2:39.2.0 omnisharp-atom:stop-server (atom-workspace.workspace.scrollbars-visible-always.theme-atom-dark-syntax.theme-atom-dark-ui)

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "atom-dark-syntax"
    ],
    "disabledPackages": [
      "build-cocos",
      "linter-gcc",
      "git-grep"
    ]
  }
}

Installed Packages

# User
atom-beautify, v0.28.19
atom-yeoman, v0.3.15
autocomplete-clang, v0.8.8
epitools, v0.1.0
git-log, v0.4.1
git-wip, v0.2.2
gpp-compiler, v1.1.0
json-schema, v0.1.15
language-cpp14, v0.5.0
language-cuda, v0.1.0
linter, v1.11.3
linter-mcs, v0.2.0
minimap, v4.18.2
omnisharp-atom, v0.26.7
tree-view-git-branch, v0.0.6
tree-view-git-status, v0.2.2

# Dev
No dev packages
Osmose commented 8 years ago

Thanks for the report! I can replicate this, but only when epitools is installed. I can replicate it even with advanced-open-file disabled. Judging by that and by the stacktrace, I think this is an epitools bug, even though Atom seems to think our package threw it for some reason.

I've reported the issue over on the epitools repo. Hopefully they'll be able to track it down. Hope that helps!