atom / bookmarks

Bookmark editor lines in Atom
MIT License
49 stars 36 forks source link

Uncaught Error: This TextEditor has been destroyed #58

Closed lx-berlin closed 5 years ago

lx-berlin commented 8 years ago

[Enter steps to reproduce below:]

  1. showing the list of existing bookmarks
  2. choosing a bookmark with arrow down key
  3. pressed enter to select

The bookmark list was still listing boomarks, that didnt exist any more. The problem occures, when i select such an orphaned link.

Atom Version: 1.8.0 System: Mac OS X 10.11.4 Thrown From: bookmarks package, v0.39.0

Stack Trace

Uncaught Error: This TextEditor has been destroyed

At /Users/lx/Applications/Atom.app/Contents/Resources/app.asar/src/display-buffer.js:794

Error: This TextEditor has been destroyed
    at DisplayBuffer.module.exports.DisplayBuffer.screenPositionForBufferPosition (/Users/lx/Applications/Atom.app/Contents/Resources/app.asar/src/display-buffer.js:794:15)
    at TextEditorMarker.module.exports.TextEditorMarker.getHeadScreenPosition (/Users/lx/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor-marker.js:179:33)
    at Cursor.module.exports.Cursor.getScreenPosition (/Users/lx/Applications/Atom.app/Contents/Resources/app.asar/src/cursor.js:73:26)
    at Cursor.module.exports.Cursor.getScreenRange (/Users/lx/Applications/Atom.app/Contents/Resources/app.asar/src/cursor.js:685:20)
    at Cursor.module.exports.Cursor.autoscroll (/Users/lx/Applications/Atom.app/Contents/Resources/app.asar/src/cursor.js:690:51)
    at Selection.module.exports.Selection.autoscroll (/Users/lx/Applications/Atom.app/Contents/Resources/app.asar/src/selection.js:969:28)
    at /Users/lx/Applications/Atom.app/Contents/Resources/app.asar/src/selection.js:109:19
    at Selection.module.exports.Selection.modifySelection (/Users/lx/Applications/Atom.app/Contents/Resources/app.asar/src/selection.js:978:7)
    at Selection.module.exports.Selection.setBufferRange (/Users/lx/Applications/Atom.app/Contents/Resources/app.asar/src/selection.js:100:19)
    at /Users/lx/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1871:29
    at TextEditor.module.exports.TextEditor.mergeSelections (/Users/lx/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:2224:18)
    at TextEditor.module.exports.TextEditor.mergeIntersectingSelections (/Users/lx/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:2186:35)
    at TextEditor.module.exports.TextEditor.setSelectedBufferRanges (/Users/lx/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1864:19)
    at TextEditor.module.exports.TextEditor.setSelectedBufferRange (/Users/lx/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1847:19)
    at BookmarksView.module.exports.BookmarksView.confirmed (/Users/lx/Applications/Atom.app/Contents/Resources/app.asar/node_modules/bookmarks/lib/bookmarks-view.js:150:14)
    at BookmarksView.module.exports.SelectListView.confirmSelection (/Users/lx/Applications/Atom.app/Contents/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 (/Users/lx/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:109:19)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Users/lx/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at /Users/lx/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Users/lx/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:580:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Users/lx/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:388:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/Users/lx/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:98:36)
    at HTMLDocument.<anonymous> (/Users/lx/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -0:12.3.0 bookmarks:toggle-bookmark (atom-text-editor.editor.is-focused)
     -0:10.6.0 bookmarks:view-all (atom-text-editor.editor.is-focused)
     -0:08.6.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -0:06.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:05.3.0 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
     -0:05.3.0 core:cancel (atom-text-editor.editor.mini.is-focused)
     -0:03.2.0 bookmarks:view-all (atom-text-editor.editor.is-focused)
     -0:02.3.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -0:01.9.0 core:move-up (atom-text-editor.editor.mini.is-focused)
     -0:00.7.0 core:confirm (atom-text-editor.editor.mini.is-focused)

Config

{}

Installed Packages

# User
proto-repl, v1.1.11
swackets, v0.10.0
terminal-plus, v0.14.5

# Dev
No dev packages
solendil commented 8 years ago

I confirm this happens when setting a bookmark on a "preview buffer" (those with the tab in italics). The bookmark remains in the list when the preview closes or changes and causes this error. This does not seem to happen in dev mode.

alokt1994 commented 8 years ago

same problem my windows 10 atom 1.8.0 and how to fix

winstliu commented 5 years ago

This hasn't happened in a while.