Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Uncaught Error: No screen line exists when converting buffer row to screen row #136

Closed
lc-ffx opened this issue May 20, 2015 · 9 comments
Closed

Comments

@lc-ffx
Copy link

lc-ffx commented May 20, 2015

[Enter steps to reproduce below:]

  1. Had two panes of files open
  2. Performed a commit in command line
  3. Performed a git pull --rebase
  4. Switched back to atom window

Atom Version: 0.200.0
System: Mac OS X 10.10.3
Thrown From: bracket-matcher package, v0.74.0

Stack Trace

Uncaught Error: No screen line exists when converting buffer row to screen row

At /Applications/Atom.app/Contents/Resources/app.asar/node_modules/q/q.js:128

Error: No screen line exists when converting buffer row to screen row
  at DisplayBuffer.module.exports.DisplayBuffer.screenPositionForBufferPosition (/Applications/Atom.app/Contents/Resources/app.asar/src/display-buffer.js:1030:17)
  at Marker.module.exports.Marker.getHeadScreenPosition (/Applications/Atom.app/Contents/Resources/app.asar/src/marker.js:174:33)
  at Cursor.module.exports.Cursor.getScreenPosition (/Applications/Atom.app/Contents/Resources/app.asar/src/cursor.js:127:26)
  at TextEditor.module.exports.TextEditor.getCursorScreenPosition (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1315:35)
  at TextEditor.module.exports.TextEditor.isFoldedAtCursorRow (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:2430:44)
  at BracketMatcherView.module.exports.BracketMatcherView.updateMatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/bracket-matcher/lib/bracket-matcher-view.js:111:23)
  at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/bracket-matcher/lib/bracket-matcher-view.js:40:24
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:228:32
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
  at DisplayBuffer.module.exports.DisplayBuffer.emitDidChange (/Applications/Atom.app/Contents/Resources/app.asar/src/display-buffer.js:293:20)
  at DisplayBuffer.module.exports.DisplayBuffer.updateScreenLines (/Applications/Atom.app/Contents/Resources/app.asar/src/display-buffer.js:1456:19)
  at DisplayBuffer.module.exports.DisplayBuffer.handleTokenizedBufferChange (/Applications/Atom.app/Contents/Resources/app.asar/src/display-buffer.js:1422:12)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/display-buffer.js:5:61
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
  at TokenizedBuffer.module.exports.TokenizedBuffer.handleBufferChange (/Applications/Atom.app/Contents/Resources/app.asar/src/tokenized-buffer.js:383:27)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/tokenized-buffer.js:57:24
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
  at TextBuffer.module.exports.TextBuffer.applyChange (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:556:20)
  at TextBuffer.module.exports.TextBuffer.revertToCheckpoint (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:717:16)
  at TextBuffer.module.exports.TextBuffer.transact (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:681:14)
  at TextBuffer.module.exports.TextBuffer.setTextViaDiff (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:414:19)
  at TextBuffer.module.exports.TextBuffer.reload (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:998:12)
  at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1122:26
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
  at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/pathwatcher/lib/file.js:430:40
  at _fulfilled (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/q/q.js:794:54)
  at self.promiseDispatch.done (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/q/q.js:823:30)
  at Promise.promise.promiseDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/q/q.js:756:13)
  at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/q/q.js:564:44
  at flush (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/q/q.js:110:17)
  at process._tickCallback (node.js:357:13)

Commands

     -3:22.5.0 snippets:expand (atom-text-editor.editor.is-focused)
     -3:22.5.0 docblockr:parse-tab (atom-text-editor.editor.is-focused)
     -3:22.5.0 editor:indent (atom-text-editor.editor.is-focused)
  5x -3:20.9.0 core:backspace (atom-text-editor.editor.is-focused)
     -3:15.3.0 core:save (atom-text-editor.editor.is-focused)
  2x -2:10.4.0 core:backspace (atom-text-editor.editor.is-focused)
     -2:09.4.0 core:move-right (atom-text-editor.editor.is-focused)
  6x -2:08.7.0 core:move-down (atom-text-editor.editor.is-focused)
     -2:07.4.0 editor:move-to-end-of-screen-line (atom-text-editor.editor.is-focused)
     -2:06.8.0 editor:delete-to-beginning-of-line (atom-text-editor.editor.is-focused)
     -2:06.3.0 snippets:next-tab-stop (atom-text-editor.editor.is-focused)
     -2:06.3.0 snippets:expand (atom-text-editor.editor.is-focused)
     -2:06.3.0 docblockr:parse-tab (atom-text-editor.editor.is-focused)
     -2:06.3.0 editor:indent (atom-text-editor.editor.is-focused)
     -2:05.7.0 core:paste (atom-text-editor.editor.is-focused)
     -2:05.3.0 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "one-dark-ui",
      "monokai"
    ]
  }
}

Installed Packages

# User
docblockr, v0.7.1
editorconfig, v1.0.0
highlight-selected, v0.9.3
linter, v0.12.4
linter-jshint, v0.1.4
monokai, v0.14.0
pretty-json, v0.3.3

# Dev
No dev packages
@50Wliu
Copy link
Contributor

50Wliu commented May 20, 2015

Can you reproduce this in safe mode (atom --safe)?

@kriskova
Copy link

Same issue here

[Enter steps to reproduce below :]

(can't reproduce :/)

  1. Edit code below
  2. Browse the web
  3. Return to Atom
  4. Start edit again

Atom Version: 0.200.0
System: linux 3.13.0-24-generic
Thrown From: bracket-matcher package, v0.74.0

Stack Trace

Uncaught Error: No screen line exists when converting buffer row to screen row

At /opt/atom/resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:683

Error: No screen line exists when converting buffer row to screen row
    at DisplayBuffer.module.exports.DisplayBuffer.screenPositionForBufferPosition (/opt/atom/resources/app.asar/src/display-buffer.js:1030:17)
    at Marker.module.exports.Marker.getHeadScreenPosition (/opt/atom/resources/app.asar/src/marker.js:174:33)
    at Cursor.module.exports.Cursor.getScreenPosition (/opt/atom/resources/app.asar/src/cursor.js:127:26)
    at TextEditor.module.exports.TextEditor.getCursorScreenPosition (/opt/atom/resources/app.asar/src/text-editor.js:1315:35)
    at TextEditor.module.exports.TextEditor.isFoldedAtCursorRow (/opt/atom/resources/app.asar/src/text-editor.js:2430:44)
    at BracketMatcherView.module.exports.BracketMatcherView.updateMatch (/opt/atom/resources/app.asar/node_modules/bracket-matcher/lib/bracket-matcher-view.js:111:23)
    at /opt/atom/resources/app.asar/node_modules/bracket-matcher/lib/bracket-matcher-view.js:40:24
    at Emitter.module.exports.Emitter.emit (/opt/atom/resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
    at /opt/atom/resources/app.asar/src/text-editor.js:228:32
    at Emitter.module.exports.Emitter.emit (/opt/atom/resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
    at DisplayBuffer.module.exports.DisplayBuffer.emitDidChange (/opt/atom/resources/app.asar/src/display-buffer.js:293:20)

Commands

     -5:04.7.0 editor:indent (atom-text-editor.editor.is-focused)
  7x -5:04.5.0 core:move-right (atom-text-editor.editor.is-focused)
  6x -4:57.7.0 core:backspace (atom-text-editor.editor.is-focused.autocomplete-active)
     -4:53.2.0 autocomplete-plus:cancel (atom-text-editor.editor.is-focused.autocomplete-active)
  2x -4:52.2.0 core:move-right (atom-text-editor.editor.is-focused)
  2x -4:50.6.0 core:save (atom-text-editor.editor.is-focused)
  2x -1:45.4.0 core:backspace (atom-text-editor.editor.is-focused)
  2x -1:03.0 core:move-down (atom-text-editor.editor.is-focused)
     -0:56.6.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:52.1.0 autocomplete-plus:confirm (atom-text-editor.editor.is-focused.autocomplete-active)
     -0:48.3.0 core:move-right (atom-text-editor.editor.is-focused)
  2x -0:46.1.0 editor:newline (atom-text-editor.editor.is-focused)
     -0:42.8.0 core:move-up (atom-text-editor.editor.is-focused)
     -0:08.9.0 editor:newline (atom-text-editor.editor.is-focused)
  3x -0:01.1.0 core:move-left (atom-text-editor.editor.is-focused)
     -0:00.3.0 editor:newline (atom-text-editor.editor.is-focused)

Config

{
  "core": {}
}

Installed Packages

# User
language-haml, v0.20.0

# Dev
No dev packages

The code i was working with:

$('#control_panel').replaceWith("<%= j render 'control_panel' %>");
$('#player_list').replaceWith("<%= j render partial: 'player_list', locals: {game: @game} %>");

// $.getScript( "/assets/game_client.js" )
//   .done(function( script, textStatus ) {
//     console.log( textStatus );
//   })
//   .fail(function( jqxhr, settings, exception ) {
//     console.log(exception);
// });
$.ajax({
  url: "/assets/game_client.js"
}).done(function(data) {
  $.globalEval(data);
}).fail(function() {});
                // ^ i created this "{}" bracket, hit enter inside the bracket, then error occurs

I can edit other parts of this code without any trouble, but i can't hit enter inside the bracket.
Can't reproduce after Atom restart.

@lc-ffx
Copy link
Author

lc-ffx commented May 22, 2015

I also haven't been able to reproduce this behaviour since reporting it

@rpavlik
Copy link

rpavlik commented May 22, 2015

I had this problem today as well, copying and pasting some cmake code. Seemed OK after update of unrelated plugins and restart.

@PD75
Copy link

PD75 commented May 31, 2015

I have the same problem writing functions with curly bracket in javascript. Just happened today. Never before. Managed before to close atom and open again and it worked.

@frantic1048
Copy link

Atom Version: 0.204.0
System:Linux 4.0.4-2 x86_64
Thrown From:bracket-matcher 0.74.0

same issue as above

var Header = React.createClass({});

open a blank file,I typed above line,and move cursor between {},then hit enter, the error occours.

@imjohnbon
Copy link

Subscribed. This happens a lot to me when I write css and do something like .class-name {}. When I hit enter in between the brackets, it errors constantly.

@Jeff-Coons
Copy link

Much like everyone here, I'm getting the error when I hit enter between the curly brackets { }. It started slowly at first but now it's happening more frequently.

@50Wliu
Copy link
Contributor

50Wliu commented Sep 25, 2016

No further reports, closing.

@50Wliu 50Wliu closed this as completed Sep 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants