postcasio / tree-view-open-files

Atom package to show open files in a list above the tree view. (like Sublime Text)
MIT License
27 stars 20 forks source link

Uncaught TypeError: Cannot read property 'element' of undefined #11

Closed tonypine closed 9 years ago

tonypine commented 9 years ago

Uncaught TypeError: Cannot read property 'element' of undefined

Atom Version: 0.158.0 System: Mac OS X 10.10.1 Thrown From: tree-view-open-files package, v0.2.0

Steps To Reproduce

  1. ...
  2. ...

    Stack Trace

At /Users/webdev/.atom/packages/tree-view-open-files/lib/tree-view-open-files-pane-view.coffee:86

TypeError: Cannot read property 'element' of undefined
  at TreeViewOpenFilesPaneView.module.exports.TreeViewOpenFilesPaneView.updateTitle (/Users/webdev/.atom/packages/tree-view-open-files/lib/tree-view-open-files-pane-view.coffee:86:24)
  at /Users/webdev/.atom/packages/tree-view-open-files/lib/tree-view-open-files-pane-view.coffee:59:7
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:82:11)
  at /Applications/Atom.app/Contents/Resources/app/src/text-editor.js:154:25
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:82:11)
  at /Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:1118:25
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/pathwatcher/node_modules/event-kit/lib/emitter.js:35:25)
  at File.module.exports.File.handleNativeChangeEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/pathwatcher/lib/file.js:330:31)
  at PathWatcher.<anonymous> (/Applications/Atom.app/Contents/Resources/app/node_modules/pathwatcher/lib/file.js:368:48)
  at HandleWatcher.<anonymous> (/Applications/Atom.app/Contents/Resources/app/node_modules/pathwatcher/lib/main.js:132:26)
  at HandleWatcher.emit (events.js:110:17)
  at /Applications/Atom.app/Contents/Resources/app/node_modules/pathwatcher/lib/main.js:44:32
  at Object.oncomplete (fs.js:93:15)

/cc @atom/core

postcasio commented 9 years ago

This basically happens when Atom gets into a very weird state where an editor has been created but is not visible in the pane, and its tabs and list entries in this package are not created. I believe it's caused by some package throwing an exception during the editor creation, but these aren't yet reported by Atom.

This should be fixed in 0.2.1 (it will no longer throw an exception), but you should be aware that the real cause is likely to be another package. I'm betting there's another earlier exception logged in your developer tools console - please check it and report it if you can!