orktes / atom-react

ReactJS Support for atom (syntax, snippets)
http://orktes.github.io/atom-react/
MIT License
476 stars 80 forks source link

Uncaught Error: This TextEditor has been destroyed #53

Closed MoOx closed 9 years ago

MoOx commented 9 years ago

[Enter steps to reproduce below:]

  1. open a jsx tab
  2. close it
  3. reopen it using "reopen last closed tab"
  4. try to edit the file
  5. BOOM

Atom Version: 0.194.0 System: Mac OS X 10.10.3 Thrown From: react package, v0.11.6

Stack Trace

Uncaught Error: This TextEditor has been destroyed

At /opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/history.js:128

Error: This TextEditor has been destroyed
  at DisplayBuffer.module.exports.DisplayBuffer.screenPositionForBufferPosition (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/display-buffer.js:1022:15)
  at Marker.module.exports.Marker.getHeadScreenPosition (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/marker.js:176:33)
  at Cursor.module.exports.Cursor.getScreenPosition (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/cursor.js:127:26)
  at Cursor.module.exports.Cursor.getScreenRange (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/cursor.js:695:20)
  at Cursor.module.exports.Cursor.autoscroll (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/cursor.js:700:51)
  at Selection.module.exports.Selection.autoscroll (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/selection.js:883:28)
  at Selection.module.exports.Selection.clear (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/selection.js:206:14)
  at Selection.module.exports.Selection.insertText (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/selection.js:432:12)
  at /opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/text-editor.js:716:31
  at /opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/text-editor.js:758:29
  at History.module.exports.History.transact (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/history.js:119:18)
  at TextBuffer.module.exports.TextBuffer.transact (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:647:27)
  at TextEditor.module.exports.TextEditor.transact (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1107:26)
  at /opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/text-editor.js:752:24
  at TextEditor.module.exports.TextEditor.mergeSelections (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1929:18)
  at TextEditor.module.exports.TextEditor.mergeIntersectingSelections (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1899:35)
  at TextEditor.module.exports.TextEditor.mutateSelectedText (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/text-editor.js:750:19)
  at TextEditor.module.exports.TextEditor.insertText (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/text-editor.js:713:21)
  at TextEditor.object.(anonymous function) (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/node_modules/underscore-plus/lib/underscore-plus.js:77:27)
  at TextEditor.object.(anonymous function) [as insertText] (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/node_modules/underscore-plus/lib/underscore-plus.js:77:27)
  at AtomReact.autoCloseTag (/Users/MoOx/setup/dotfiles/atom/packages/react/lib/atom-react.coffee:223:16)
  at /Users/MoOx/setup/dotfiles/atom/packages/react/lib/atom-react.coffee:287:26
  at Emitter.module.exports.Emitter.emit (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
  at TextBuffer.module.exports.TextBuffer.applyPatch (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:550:20)
  at TextBuffer.module.exports.TextBuffer.setTextInRange (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:461:12)
  at Selection.module.exports.Selection.insertText (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/selection.js:452:43)
  at /opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/text-editor.js:716:31
  at /opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/text-editor.js:758:29
  at History.module.exports.History.transact (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/history.js:119:18)
  at TextBuffer.module.exports.TextBuffer.transact (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:647:27)
  at TextEditor.module.exports.TextEditor.transact (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1107:26)
  at /opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/text-editor.js:752:24
  at TextEditor.module.exports.TextEditor.mergeSelections (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1929:18)
  at TextEditor.module.exports.TextEditor.mergeIntersectingSelections (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1899:35)
  at TextEditor.module.exports.TextEditor.mutateSelectedText (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/text-editor.js:750:19)
  at TextEditor.module.exports.TextEditor.insertText (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/text-editor.js:713:21)
  at TextEditor.object.(anonymous function) [as insertText] (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/node_modules/underscore-plus/lib/underscore-plus.js:77:27)
  at /opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/text-editor-component.js:438:31
  at History.module.exports.History.transact (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/history.js:119:18)
  at TextBuffer.module.exports.TextBuffer.transact (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:647:27)
  at TextEditor.module.exports.TextEditor.transact (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1107:26)
  at TextEditorComponent.module.exports.TextEditorComponent.onTextInput (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/text-editor-component.js:436:35)
  at HTMLDivElement.<anonymous> (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/text-editor-component.js:3:61)

Commands

  2x -1:03.5.0 core:move-up (atom-text-editor.editor.is-focused)
     -1:03.1.0 editor:move-to-end-of-screen-line (atom-text-editor.editor.is-focused)
     -1:02.8.0 core:backspace (atom-text-editor.editor.is-focused)
     -1:00.7.0 editor:select-to-end-of-line (atom-text-editor.editor.is-focused)
  3x -1:00.4.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:56.9.0 editor:select-to-end-of-line (atom-text-editor.editor.is-focused)
     -0:54.3.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:40.4.0 editor:select-to-end-of-line (atom-text-editor.editor.is-focused)
  2x -0:39.9.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:33.4.0 editor:select-to-end-of-line (atom-text-editor.editor.is-focused)
     -0:32.9.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:27.8.0 settings-view:open (atom-text-editor.editor.is-focused)
     -0:06.9.0 core:save (atom-text-editor.editor.is-focused)
     -0:06.3.0 core:close (atom-text-editor.editor.is-focused)
     -0:05.7.0 pane:reopen-closed-item (atom-text-editor.editor)
     -0:02.9.0 core:backspace (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "projectHome": "/Users/MoOx/Sync/Development",
    "disabledPackages": [
      "language-mustache",
      "welcome",
      "language-toml",
      "language-sass",
      "language-ruby-on-rails",
      "language-ruby",
      "language-python",
      "language-php",
      "language-perl",
      "language-objective-c",
      "language-less",
      "language-java",
      "language-hyperlink",
      "language-go",
      "language-csharp",
      "language-coffee-script",
      "language-clojure",
      "language-jsx",
      "close-tags"
    ]
  },
  "react": {}
}

Installed Packages

# User
atom-beautify, v0.24.1
atom-color-highlight, v3.0.9
atom-semicolons, v0.1.5
auto-update-packages, v0.2.2
bezier-curve-editor, v0.6.6
color-picker, v1.7.0
docblockr, v0.6.3
editorconfig, v1.0.0
file-type-icons, v0.5.4
gist-it, v0.6.10
git-log, v0.3.0
git-projects, v1.13.0
git-tab-status, v1.7.0
language-apache, v1.3.0
linter, v0.12.1
linter-eslint, v0.5.2
linter-jsonlint, v0.1.2
live-archive, v0.1.13
project-manager, v1.15.5
react, v0.11.6
term2, v0.9.5
terminal, v0.28.0
travis-ci-status, v0.13.0
web-browser, v1.4.4
yuno-commit, v0.0.2

# Dev
No dev packages
orktes commented 9 years ago

Fixed with https://github.com/orktes/atom-react/commit/be4ac7734b1825c62acfeafddadf5eb64ee8acd0