neil-lindquist / lisp-paredit

Paredit for Atom
MIT License
24 stars 5 forks source link

Uncaught Error: Cannot decorate a destroyed marker #31

Closed Adrien79 closed 4 years ago

Adrien79 commented 7 years ago

[Enter steps to reproduce:]

  1. I selected a chunk code and deleted it, without paying attention if parentheses were balanced.
  2. The error occurred once, I was unable to reproduce it.

Atom: 1.15.0 x64 Electron: 1.3.13 OS: "Fedora release Thrown From: lisp-paredit package 0.5.5

Stack Trace

Uncaught Error: Cannot decorate a destroyed marker

At /usr/share/atom/resources/app.asar/src/decoration-manager.js:202

Error: Cannot decorate a destroyed marker
    at DecorationManager.module.exports.DecorationManager.decorateMarker (/app.asar/src/decoration-manager.js:192:17)
    at TextEditor.module.exports.TextEditor.decorateMarker (/app.asar/src/text-editor.js:1727:37)
    at Views.module.exports.Views.showErrors (/packages/lisp-paredit/lib/views.coffee:19:14)
    at checkSyntax (/packages/lisp-paredit/lib/main.coffee:129:11)
    at /packages/lisp-paredit/lib/main.coffee:123:5
    at Function.module.exports.Emitter.simpleDispatch (/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/app.asar/node_modules/event-kit/lib/emitter.js:129:28)
    at /app.asar/node_modules/text-buffer/lib/text-buffer.js:1371:25

Commands

     -1:32.3.0 core:delete (input.hidden-input)
     -1:31.2.0 core:backspace (input.hidden-input)
     -1:27.4.0 core:save-as (input.hidden-input)
     -1:09.6.0 editor:newline (input.hidden-input)
  6x -1:07.6.0 core:backspace (input.hidden-input)
     -0:56 core:move-left (input.hidden-input)
     -0:55.9.0 core:backspace (input.hidden-input)
     -0:55.8.0 editor:newline (input.hidden-input)
     -0:53.9.0 core:delete (input.hidden-input)
     -0:53.9.0 editor:newline (input.hidden-input)
  2x -0:53.3.0 core:select-up (input.hidden-input)
     -0:51 lisp-paredit:indent (input.hidden-input)
     -0:22.3.0 core:cut (input.hidden-input)
  2x -0:21.6.0 core:paste (input.hidden-input)
  4x -0:18.1.0 core:move-right (input.hidden-input)
  4x -0:17.4.0 core:delete (input.hidden-input)

Non-Core Packages

atom-slime 2.6.1 
language-lisp 0.2.0 
lisp-paredit 0.5.5 
Parinfer 1.17.0 
wnr commented 7 years ago

Getting the same error

Atom: 1.16.0 x64 Electron: 1.3.13 OS: Mac OS X 10.12.4 Thrown From: lisp-paredit package 0.5.5

Stack Trace

Uncaught Error: Cannot decorate a destroyed marker

At /Applications/Atom.app/Contents/Resources/app.asar/src/decoration-manager.js:204

Error: Cannot decorate a destroyed marker
    at DecorationManager.module.exports.DecorationManager.decorateMarker (/app.asar/src/decoration-manager.js:194:17)
    at TextEditor.module.exports.TextEditor.decorateMarker (/app.asar/src/text-editor.js:1732:37)
    at Views.module.exports.Views.showErrors (/packages/lisp-paredit/lib/views.coffee:19:14)
    at checkSyntax (/packages/lisp-paredit/lib/main.coffee:129:11)
    at /packages/lisp-paredit/lib/main.coffee:123:5
    at Function.module.exports.Emitter.simpleDispatch (/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/app.asar/node_modules/event-kit/lib/emitter.js:129:28)
    at /app.asar/node_modules/text-buffer/lib/text-buffer.js:1392:25

Commands

     -0:41.4.0 intentions:highlight (input.hidden-input)
  3x -0:41.2.0 editor:delete-to-beginning-of-word (input.hidden-input)
     -0:40.5.0 core:move-right (input.hidden-input)
     -0:40.3.0 core:backspace (input.hidden-input)
     -0:39.7.0 editor:move-to-end-of-line (input.hidden-input)
     -0:39.6.0 core:move-left (input.hidden-input)
     -0:39 lisp-paredit:newline (input.hidden-input)
     -0:37.5.0 core:paste (input.hidden-input)
     -0:35.1.0 core:undo (input.hidden-input)
     -0:32.9.0 intentions:highlight (input.hidden-input)
     -0:32.9.0 editor:delete-to-beginning-of-word (input.hidden-input)
  3x -0:32.5.0 core:backspace (input.hidden-input)
     -0:30.6.0 autocomplete-plus:cancel (input.hidden-input)
     -0:30.1.0 inline:clear-current (input.hidden-input)
     -0:30.1.0 editor:consolidate-selections (input.hidden-input)
     -0:30.1.0 core:cancel (input.hidden-input)

Non-Core Packages

an-old-hope-syntax 1.0.4 
ariake-dark-syntax 0.1.3 
atom-beautify 0.29.18 
atom-material-ui 1.3.9 
aurora-theme 1.2.2 
auto-detect-indentation 1.3.0 
busy-signal 1.3.0 
docblockr 0.9.4 
Earthsong 1.0.0 
editorconfig 2.2.2 
firewatch-hot-syntax 1.3.0 
firewatch-syntax 1.1.1 
fizzy 0.21.0 
genesis-syntax 1.0.9 
genesis-ui 0.5.0 
git-blame 0.4.12 
goto 1.8.3 
highlight-selected 0.13.1 
indentation-indicator 1.0.0 
ink 0.6.5 
intentions 1.1.2 
language-latex 1.0.0 
latex 0.43.0 
line-jumper 0.14.1 
linter 2.1.2 
linter-eslint 8.1.5 
linter-ui-default 1.2.2 
lisp-paredit 0.5.5 
nord-atom-syntax 0.7.0 
nord-atom-ui 0.11.0 
octocat-syntax 1.3.1 
Parinfer 1.17.0 
pretty-json 1.6.3 
proto-repl 1.4.19 
sort-lines 0.14.0 
spacegray-dark-neue-syntax 1.4.2 
split-diff 1.3.0 
tabs-to-spaces 1.0.3 
trailing-spaces 0.4.0 
bjonica commented 6 years ago

Figured out consistent reproduction steps. Assuming your editor has the default option of closing matching brackets/quotes enabled, typing (str "\") will reproduce the bug --- that is:

  1. Type (str ". You should now see (str "") in the editor.
  2. Type the backslash character, and don't add an escape character.
  3. Errors start getting thrown.
  4. Type n.
  5. Errors stopped because the string is valid again.

This gets extremely annoying when adding newline characters to strings.

neil-lindquist commented 4 years ago

Atom appears to have adjusted how markers work, so there isn't an error thrown anymore for the minimal working example. The code gets highlighted red for the incomplete expressions, but I don't think there is a way around that without inserting other characters. Please reopen if there is another way the error can be raised.