Pulsar-Edit-Highlights / line

@Pulsar-Edit package for highlighting the currently selected line.
https://web.pulsar-edit.dev/packages/highlight-line
MIT License
52 stars 16 forks source link

Uncaught Error: This TextEditor has been destroyed #56

Closed GuillaumeLegendre closed 8 years ago

GuillaumeLegendre commented 9 years ago

Hello

When the package open last project is enabled an error is throw when I try to close a tab. I don't know if it comes from this package or open last project. But it would be awesome if the issue was resolve.

Thanks a lot !

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.181.0 System: Mac OS X 10.10.2 Thrown From: highlight-line package, v0.9.3

Stack Trace

Uncaught Error: This TextEditor has been destroyed

At /Applications/Atom.app/Contents/Resources/app/src/display-buffer.js:1005

Error: This TextEditor has been destroyed
    at DisplayBuffer.module.exports.DisplayBuffer.screenPositionForBufferPosition (/Applications/Atom.app/Contents/Resources/app/src/display-buffer.js:1005:15)
    at DisplayBuffer.module.exports.DisplayBuffer.screenRangeForBufferRange (/Applications/Atom.app/Contents/Resources/app/src/display-buffer.js:870:20)
    at Marker.module.exports.Marker.getScreenRange (/Applications/Atom.app/Contents/Resources/app/src/marker.js:173:33)
    at Selection.module.exports.Selection.getScreenRange (/Applications/Atom.app/Contents/Resources/app/src/selection.js:95:26)
    at Selection.module.exports.Selection.isSingleScreenLine (/Applications/Atom.app/Contents/Resources/app/src/selection.js:180:19)
    at HighlightLineView.module.exports.HighlightLineView.handleSingleLine (/Users/guillaumelegendre/.atom/packages/highlight-line/lib/highlight-line-view.coffee:88:23)
    at HighlightLineView.handleSingleLine (/Users/guillaumelegendre/.atom/packages/highlight-line/lib/highlight-line-view.coffee:3:61)
    at HighlightLineView.module.exports.HighlightLineView.showHighlight (/Users/guillaumelegendre/.atom/packages/highlight-line/lib/highlight-line-view.coffee:79:19)
    at HighlightLineView.showHighlight (/Users/guillaumelegendre/.atom/packages/highlight-line/lib/highlight-line-view.coffee:3:61)
    at HighlightLineView.module.exports.HighlightLineView.updateSelectedLine (/Users/guillaumelegendre/.atom/packages/highlight-line/lib/highlight-line-view.coffee:60:19)

Commands

     -0:01.1 core:close (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "atom-dark-syntax"
    ],
    "disabledPackages": [
      "welcome"
    ]
  }
}

Installed Packages

# User
autocomplete-paths, v1.0.2
autocomplete-plus, v2.1.6
file-icons, v1.4.11
highlight-line, v0.9.3
local-history, v2.2.2
open-last-project, v0.3.1
white-cursor, v0.5.2

# Dev
No dev packages
richrace commented 9 years ago

I can't seem to replicate this.

Have you got any steps that can get this to happen? I've installed open-last-project v0.3.1 using Atom 0.182.0; tried:

  1. Open Atom via terminal in folder.
  2. Open 1 tab
  3. Quit Atom
  4. Open Atom from Spotlight/Dock
  5. Close open tab

And

  1. Open Atom via terminal in folder.
  2. Open 5 tabs
  3. Quit Atom
  4. Open Atom from Spotlight/Dock
  5. Close all tabs

And don't get the error.

petewalker commented 9 years ago

I just had the problem, closed / re-opened atom, and couldn't replicate again...

Seems to be a difficult one to reproduce.

tnrich commented 9 years ago

Having this issue currently. Closed and reopened and it seems to have gone away. It occurred after installing several packages though I'm not sure this was the root cause.

richrace commented 9 years ago

Still happening?