atom-minimap / minimap

A preview of the full source code.
https://atom.io/packages/minimap
MIT License
646 stars 130 forks source link

Uncaught TypeError: Cannot read property 'length' of undefined #660

Open youngjuning opened 6 years ago

youngjuning commented 6 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.25.0-beta3 x64 Electron: 1.7.11 OS: Unknown Windows version Thrown From: minimap package 4.29.8

Stack Trace

Uncaught TypeError: Cannot read property 'length' of undefined

At C:\Users\10037\AppData\Local\atom\app-1.25.0-beta3\resources\app\node_modules\text-buffer\lib\screen-line-builder.js:329

TypeError: Cannot read property 'length' of undefined
    at ScreenLineBuilder.emitText (~/AppData/Local/atom/app-1.25.0-beta3/resources/app/node_modules/text-buffer/lib/screen-line-builder.js:329:30)
    at ScreenLineBuilder.buildScreenLines (~/AppData/Local/atom/app-1.25.0-beta3/resources/app/node_modules/text-buffer/lib/screen-line-builder.js:141:22)
    at DisplayLayer.getScreenLines (~/AppData/Local/atom/app-1.25.0-beta3/resources/app/node_modules/text-buffer/lib/display-layer.js:643:41)
    at DisplayLayer.getScreenLine (~/AppData/Local/atom/app-1.25.0-beta3/resources/app/node_modules/text-buffer/lib/display-layer.js:639:60)
    at TextEditor.screenLineForScreenRow (~/AppData/Local/atom/app-1.25.0-beta3/resources/app/src/text-editor.js:1248:36)
    at TextEditor.tokensForScreenRow (~/AppData/Local/atom/app-1.25.0-beta3/resources/app/src/text-editor.js:1230:41)
    at HTMLElement.eachTokenForScreenRows (/packages/minimap/lib/mixins/canvas-drawer.js:419:14)
    at HTMLElement.drawLines (/packages/minimap/lib/mixins/canvas-drawer.js:453:10)
    at HTMLElement.redrawRangesOnLayer (/packages/minimap/lib/mixins/canvas-drawer.js:270:14)
    at HTMLElement.updateTokensLayer (/packages/minimap/lib/mixins/canvas-drawer.js:136:10)
    at HTMLElement.updateCanvas (/packages/minimap/lib/mixins/canvas-drawer.js:104:10)
    at HTMLElement.update (/packages/minimap/lib/minimap-element.js:887:10)
    at requestAnimationFrame (/packages/minimap/lib/minimap-element.js:780:12)

Commands

Non-Core Packages

activate-power-mode 2.7.0 
advanced-open-file 0.16.8 
api-docs 0.0.6 
ask-stack 2.2.0 
atom-beautify 0.32.2 
atom-bmob 0.1.2 
atom-bootstrap3 1.2.12 
atom-bootstrap4 0.0.1 
atom-ide-ui 0.9.4 
atom-leancloud 1.0.0 
atom-material-syntax-light 0.4.6 
atom-material-ui 2.1.3 
atom-minify 0.8.0 
atom-weui 0.0.5 
autocomplete-json 5.5.2 
autocomplete-paths 2.12.2 
build 0.70.0 
build-gulp 0.11.0 
busy-signal 1.4.3 
color-picker 2.2.5 
css-snippets 1.1.0 
docblockr 0.13.7 
emmet 2.4.3 
emmet-snippets-compatibility 1.0.6 
expose 0.15.0 
fe-snippets 1.0.3 
file-icons 2.1.17 
flex-tool-bar 1.1.0 
gulp-snippets 0.6.2 
highlight-line 0.12.0 
highlight-selected 0.13.1 
html2jade-plus 1.0.0 
hyperclick 0.0.0 
hyperlink-hyperclick 2.0.0 
ide-css 0.2.0 
ide-html 0.4.2 
ide-json 0.2.1 
ide-php 0.7.11 
javascript-snippets 1.2.1 
jquery-snippets 11.0.0 
language-apache 1.8.0 
language-ini 1.19.0 
language-markdown 0.25.1 
language-nginx 0.8.0 
language-pug 0.0.22 
language-vuejs 0.3.1 
language-wx 0.4.0 
linter-jshint 3.1.6 
markdown-preview-enhanced 0.15.3 
markdown-table-editor 1.1.0 
markdown-writer 2.7.3 
minimap 4.29.8 
minimap-find-and-replace 4.5.2 
minimap-git-diff 4.3.1 
minimap-highlight-selected 4.6.1 
minimap-linter 2.1.3 
one-dark-material-syntax 1.0.3 
one-dark-vivid-syntax 1.8.0 
open-file 1.4.0 
open-in-browsers 0.0.30 
open-terminal-here 2.3.1 
pdf-view 0.65.0 
pigments 0.40.2 
regex-railroad-diagram 0.19.4 
remote-ftp 2.1.4 
seti-icons 1.5.4 
simple-drag-drop-text 0.4.0 
simplified-chinese-menu 5.3.5 
source-preview 0.5.3 
source-preview-pug 0.2.0 
sublime-block-comment 0.5.1 
sync-settings 0.8.5 
todo-show 2.2.0 
toggle-quotes 1.1.0 
toggler 0.3.1 
tool-bar 1.1.6 
tree-view-git-status 1.4.0 
vue-element-ui-snippets 0.7.0 
NetOpWibby commented 6 years ago

This happens on macOS Mojave as well.

maguri commented 6 years ago

@NetOperatorWibby is not Mojave still beta?

NetOpWibby commented 6 years ago

@maguri Oh it is but this issue is open so clearly, something is still broken.

maguri commented 6 years ago

@NetOperatorWibby Totally Agree

maguri commented 6 years ago

¯_(ツ)_/¯ Something is happening here: https://github.com/atom/text-buffer/blob/master/src/screen-line-builder.js#L329

probably passing wrong argument in function emitText (text, reopenTags = true)

netizen-ais commented 5 years ago

Can someone else verify if this is fixed by "unfolding" all?

TizianoGC commented 5 years ago

I had the same error and I can confirm that it disappears after selecting "Unfold all".

Atom: 1.35.1 x64 Electron: 2.0.18 Chrome: 61.0.3163.100 Node: v8.9.3 OS: Ubuntu 18.04

Thrown From: minimap package 4.29.9

dosjota commented 5 years ago

Error persists after selecting "Unfold all".

Atom: 1.35.1 x64 Electron: 2.0.18 Chrome: 73.0.3683.103 Node: v10.15.0 OS: Fedora 29 minimapa: 4.29.9