markdown-toc icon indicating copy to clipboard operation
markdown-toc copied to clipboard

Uncaught Error: This TextEditor has been destroyed

Open wowtous opened this issue 9 years ago • 14 comments

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.0.11 System: Ubuntu 15.04 Thrown From: markdown-toc package, v0.3.0

Stack Trace

Uncaught Error: This TextEditor has been destroyed

At /usr/share/atom/resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:773

Error: This TextEditor has been destroyed
  at DisplayBuffer.module.exports.DisplayBuffer.screenPositionForBufferPosition (/usr/share/atom/resources/app.asar/src/display-buffer.js:1097:15)
  at Marker.module.exports.Marker.getHeadScreenPosition (/usr/share/atom/resources/app.asar/src/marker.js:179:33)
  at Cursor.module.exports.Cursor.getScreenPosition (/usr/share/atom/resources/app.asar/src/cursor.js:90:26)
  at Cursor.module.exports.Cursor.getScreenRange (/usr/share/atom/resources/app.asar/src/cursor.js:708:20)
  at Cursor.module.exports.Cursor.autoscroll (/usr/share/atom/resources/app.asar/src/cursor.js:713:51)
  at Selection.module.exports.Selection.autoscroll (/usr/share/atom/resources/app.asar/src/selection.js:951:28)
  at Selection.module.exports.Selection.clear (/usr/share/atom/resources/app.asar/src/selection.js:198:14)
  at Selection.module.exports.Selection.insertText (/usr/share/atom/resources/app.asar/src/selection.js:452:12)
  at /usr/share/atom/resources/app.asar/src/text-editor.js:745:29
  at /usr/share/atom/resources/app.asar/src/text-editor.js:787:29
  at TextBuffer.module.exports.TextBuffer.transact (/usr/share/atom/resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:768:18)
  at TextEditor.module.exports.TextEditor.transact (/usr/share/atom/resources/app.asar/src/text-editor.js:1168:26)
  at /usr/share/atom/resources/app.asar/src/text-editor.js:781:24
  at TextEditor.module.exports.TextEditor.mergeSelections (/usr/share/atom/resources/app.asar/src/text-editor.js:2033:43)
  at TextEditor.module.exports.TextEditor.mergeIntersectingSelections (/usr/share/atom/resources/app.asar/src/text-editor.js:1999:35)
  at TextEditor.module.exports.TextEditor.mutateSelectedText (/usr/share/atom/resources/app.asar/src/text-editor.js:779:19)
  at TextEditor.module.exports.TextEditor.insertText (/usr/share/atom/resources/app.asar/src/text-editor.js:742:19)
  at TextEditor.object.(anonymous function) [as insertText] (/usr/share/atom/resources/app.asar/node_modules/underscore-plus/lib/underscore-plus.js:77:27)
  at Toc.module.exports.Toc.create (/home/darebeat/.atom/packages/markdown-toc/lib/Toc.coffee:31:13)
  at atom-workspace.atom.commands.add.markdown-toc:create (/home/darebeat/.atom/packages/markdown-toc/lib/markdown-toc.coffee:8:72)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:245:29)
  at /usr/share/atom/resources/app.asar/src/command-registry.js:3:61
  at CommandPaletteView.module.exports.CommandPaletteView.confirmed (/usr/share/atom/resources/app.asar/node_modules/command-palette/lib/command-palette-view.js:159:32)
  at CommandPaletteView.module.exports.SelectListView.confirmSelection (/usr/share/atom/resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:338:21)
  at space-pen-div.atom.commands.add.core:confirm (/usr/share/atom/resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:109:19)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:245:29)
  at /usr/share/atom/resources/app.asar/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:524:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:347:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/usr/share/atom/resources/app.asar/src/window-event-handler.js:184:20)

Commands

     -4:28.8.0 markdown-toc:update (atom-text-editor.editor)
  4x -4:23.1.0 core:undo (atom-text-editor.editor.is-focused)
     -4:21.5.0 core:save (atom-text-editor.editor.is-focused)
     -3:58.6.0 core:move-up (atom-text-editor.editor.is-focused)
     -3:58.1.0 markdown-writer:insert-new-line (atom-text-editor.editor.is-focused)
     -3:57.4.0 core:move-up (atom-text-editor.editor.is-focused)
     -3:55.8.0 command-palette:toggle (atom-text-editor.editor.is-focused)
     -3:51.7.0 markdown-toc:create (atom-text-editor.editor)
     -0:14.2.0 atom-beautify:beautify-editor (atom-text-editor.editor.is-focused)
     -0:11.6.0 core:save (atom-text-editor.editor.is-focused)
     -0:06.6.0 core:move-left (atom-text-editor.editor.is-focused)
     -0:05.9.0 markdown-writer:insert-new-line (atom-text-editor.editor.is-focused)
     -0:05.2.0 core:move-up (atom-text-editor.editor.is-focused)
     -0:03.5.0 command-palette:toggle (atom-text-editor.editor.is-focused)
     -0:00.7.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:00.7.0 markdown-toc:create (atom-text-editor.editor)

Config

{
  "core": {
    "themes": [
      "atom-material-ui",
      "monokai"
    ],
    "packagesWithKeymapsDisabled": [
      "color-picker"
    ],
    "disabledPackages": [
      "vim-mode",
      "flatten-json",
      "json-colorer",
      "json-converter",
      "json-schema",
      "language-mongodb",
      "merge-conflicts",
      "nodemon-atom",
      "pretty-json",
      "color-picker"
    ]
  }
}

Installed Packages

# User
atom-beautify, v0.28.12
atom-material-ui, v0.6.1
markdown-toc, v0.3.0
markdown-writer, v1.9.3
minimap, v4.13.3
monokai, v0.18.0
pigments, v0.15.0
tool-bar, v0.1.9

# Dev
No dev packages

wowtous avatar Sep 17 '15 13:09 wowtous

+1

dkebler avatar Dec 13 '15 00:12 dkebler

Also getting this.

sqmk avatar Jan 03 '16 05:01 sqmk

+1

CJYate avatar Jan 04 '16 15:01 CJYate

Also seeing this.

I suspect it is related to: https://github.com/nok/markdown-toc/issues/54

seanhealy avatar Jan 18 '16 23:01 seanhealy

+1

torsday avatar Feb 04 '16 02:02 torsday

+1

haibinpark avatar Mar 02 '16 02:03 haibinpark

+1

nkcoder avatar Mar 12 '16 03:03 nkcoder

+1

zhaolion avatar Mar 12 '16 13:03 zhaolion

+1

anuragkapur avatar Apr 07 '16 17:04 anuragkapur

+1

kylozw avatar Apr 24 '16 09:04 kylozw

+1

chalkpe avatar Apr 30 '16 02:04 chalkpe

+1

nkmr-jp avatar May 01 '16 07:05 nkmr-jp

+1

mpolci avatar Jun 01 '16 21:06 mpolci

this happened to me having 3 markdown files and trying to create toc to one of them while another one had already its toc generated.

jose-oc avatar Jul 01 '16 14:07 jose-oc