Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

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

Closed

Description

@priyankvex commented on Jan 24, 2015, 7:48 AM UTC:

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.175.0
System: linux 3.13.0-44-generic
Thrown From: go-to-line package, v0.30.0

Stack Trace

Uncaught TypeError: Cannot read property 'length' of undefined

At /usr/share/atom/resources/app/node_modules/text-buffer/lib/text-buffer.js:391

TypeError: Cannot read property 'length' of undefined
  at TextBuffer.module.exports.TextBuffer.lineLengthForRow (/usr/share/atom/resources/app/node_modules/text-buffer/lib/text-buffer.js:391:29)
  at TextBuffer.module.exports.TextBuffer.clipPosition (/usr/share/atom/resources/app/node_modules/text-buffer/lib/text-buffer.js:943:53)
  at DisplayBuffer.module.exports.DisplayBuffer.screenPositionForBufferPosition (/usr/share/atom/resources/app/src/display-buffer.js:1009:27)
  at DisplayBuffer.module.exports.DisplayBuffer.scrollToBufferPosition (/usr/share/atom/resources/app/src/display-buffer.js:661:47)
  at TextEditor.module.exports.TextEditor.scrollToBufferPosition (/usr/share/atom/resources/app/src/text-editor.js:2670:33)
  at GoToLineView.module.exports.GoToLineView.confirm (/usr/share/atom/resources/app/node_modules/go-to-line/lib/go-to-line-view.js:116:14)
  at atom-text-editor.<anonymous> (/usr/share/atom/resources/app/node_modules/go-to-line/lib/go-to-line-view.js:55:24)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app/src/command-registry.js:243:29)
  at /usr/share/atom/resources/app/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/share/atom/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:558:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/share/atom/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:396:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/usr/share/atom/resources/app/src/window-event-handler.js:170:20)

Commands

     -30:09.2 core:cancel (atom-text-editor.editor.mini)
     -30:05.4 application:new-file (atom-pane.pane.active.with-minimap)
     -30:03.5 go-to-line:toggle (atom-text-editor.editor.is-focused)
     -30:03.5 core:paste (atom-text-editor.editor.mini)
     -30:00.0 core:confirm (atom-text-editor.editor.mini)

Config

{
  "core": {}
}

Installed Packages

# User
minimap, v3.5.6

# Dev
No dev packages

/cc @atom/core

This issue was moved by daviwil from atom/go-to-line#19.

Activity

  1. ghost added on Oct 16, 2018
  2. PaulXiCao commented on Dec 6, 2018

    @PaulXiCao

    I just got a similar error message. Hope it helps

    [Enter steps to reproduce:]

    1. ...
    2. ...

    Atom: 1.32.2 x64
    Electron: 2.0.9
    OS: "openSUSE Leap
    Thrown From: Atom Core

    Stack Trace

    Uncaught TypeError: Cannot read property 'length' of undefined

    At /usr/share/atom/resources/app/static/<embedded>:14
    
    TypeError: Cannot read property 'length' of undefined
        at ScreenLineBuilder.emitText (/usr/share/atom/resources/app/static/<embedded>:14:1106180)
        at ScreenLineBuilder.buildScreenLines (/usr/share/atom/resources/app/static/<embedded>:14:1101890)
        at DisplayLayer.getScreenLines (/usr/share/atom/resources/app/static/<embedded>:14:89276)
        at TextEditorComponent.queryScreenLinesToRender (/usr/share/atom/resources/app/static/<embedded>:11:79025)
        at TextEditorComponent.updateSyncBeforeMeasuringContent (/usr/share/atom/resources/app/static/<embedded>:11:69678)
        at TextEditorComponent.updateSync (/usr/share/atom/resources/app/static/<embedded>:11:67306)
        at TextEditorComponent.flushPendingLogicalScrollPosition (/usr/share/atom/resources/app/static/<embedded>:11:99717)
        at TextEditorComponent.didShow (/usr/share/atom/resources/app/static/<embedded>:11:90954)
        at TextEditorComponent.didAttach (/usr/share/atom/resources/app/static/<embedded>:11:90106)
        at HTMLElement.attachedCallback (/app.asar/src/text-editor-element.js:41:25)
        at HTMLElement.activeItemChanged (/app.asar/src/pane-element.js:152:22)
        at Function.simpleDispatch (/usr/share/atom/resources/app/static/<embedded>:11:1186173)
        at Emitter.emit (/usr/share/atom/resources/app/static/<embedded>:11:1187614)
        at Pane.setActiveItem (/usr/share/atom/resources/app/static/<embedded>:11:452700)
        at Pane.activateItem (/usr/share/atom/resources/app/static/<embedded>:11:454948)
        at TabBarView.t.exports.TabBarView.onClick (/usr/share/atom/resources/app/static/<embedded>:11:1136678)
    

    Commands

    Non-Core Packages

    atom-beautify 0.33.4 
    atom-ide-debugger-native-gdb 0.7.3 
    atom-ide-ui 0.13.0 
    ide-fortran 0.3.0 
    indent-detective 0.3.1 
    ink 0.9.13 
    julia-client 0.7.11 
    language-fortran 2.1.7 
    language-ini 1.20.0 
    language-julia 0.18.0 
    language-latex 1.2.0 
    latex-completions 0.3.6 
    tool-bar 1.1.11 
    uber-juno 0.2.0 
    
  3. nwrox commented on Dec 6, 2018

    @nwrox
  4. sidhyatikku commented on Dec 8, 2018

    @sidhyatikku
  5. JOmarCuenca commented on Dec 12, 2018

    @JOmarCuenca

    Please help...

    [Enter steps to reproduce:]

    1. ...
    2. ...

    Atom: 1.26.1 x64
    Electron: 1.7.11
    OS: Ubuntu 16.04.5
    Thrown From: Atom Core

    Stack Trace

    Uncaught TypeError: Cannot read property 'length' of undefined

    At /opt/atom/resources/app/node_modules/text-buffer/lib/screen-line-builder.js:329
    
    TypeError: Cannot read property 'length' of undefined
        at ScreenLineBuilder.emitText (/opt/atom/resources/app/node_modules/text-buffer/lib/screen-line-builder.js:329:30)
        at ScreenLineBuilder.buildScreenLines (/opt/atom/resources/app/node_modules/text-buffer/lib/screen-line-builder.js:141:22)
        at DisplayLayer.getScreenLines (/opt/atom/resources/app/node_modules/text-buffer/lib/display-layer.js:643:41)
        at TextEditorComponent.queryScreenLinesToRender (/opt/atom/resources/app/src/text-editor-component.js:881:57)
        at TextEditorComponent.updateSyncBeforeMeasuringContent (/opt/atom/resources/app/src/text-editor-component.js:385:16)
        at TextEditorComponent.updateSync (/opt/atom/resources/app/src/text-editor-component.js:275:16)
        at etch.getScheduler.updateDocument (/opt/atom/resources/app/src/text-editor-component.js:225:46)
        at ViewRegistry.performDocumentUpdate (/opt/atom/resources/app/src/view-registry.js:238:13)
    

    Commands

    Non-Core Packages

    script 3.18.1 
    
  6. rsese commented on Dec 14, 2018

    @rsese
  7. Luro02 commented on Jan 2, 2019

    @Luro02

    Here is another one:
    [Enter steps to reproduce:]

    1. ...
    2. ...

    Atom: 1.33.1 x64
    Electron: 2.0.16
    OS: Ubuntu 18.04.1
    Thrown From: Atom Core

    Stack Trace

    Uncaught TypeError: Cannot read property 'length' of undefined

    At /usr/share/atom/resources/app/static/<embedded>:14
    
    TypeError: Cannot read property 'length' of undefined
        at ScreenLineBuilder.emitText (/usr/share/atom/resources/app/static/<embedded>:14:1107221)
        at ScreenLineBuilder.buildScreenLines (/usr/share/atom/resources/app/static/<embedded>:14:1102927)
        at DisplayLayer.getScreenLines (/usr/share/atom/resources/app/static/<embedded>:14:89306)
        at TextEditorComponent.queryScreenLinesToRender (/usr/share/atom/resources/app/static/<embedded>:11:79324)
        at TextEditorComponent.updateSyncBeforeMeasuringContent (/usr/share/atom/resources/app/static/<embedded>:11:69977)
        at TextEditorComponent.updateSync (/usr/share/atom/resources/app/static/<embedded>:11:67605)
        at TextEditorComponent.didShow (/usr/share/atom/resources/app/static/<embedded>:11:91235)
        at TextEditorComponent.didAttach (/usr/share/atom/resources/app/static/<embedded>:11:90405)
        at HTMLElement.attachedCallback (/app.asar/src/text-editor-element.js:41:25)
        at HTMLElement.activeItemChanged (/app.asar/src/pane-element.js:152:22)
        at Function.simpleDispatch (/usr/share/atom/resources/app/static/<embedded>:11:1189948)
        at Emitter.emit (/usr/share/atom/resources/app/static/<embedded>:11:1191389)
        at Pane.setActiveItem (/usr/share/atom/resources/app/static/<embedded>:11:455407)
        at Pane.activateItem (/usr/share/atom/resources/app/static/<embedded>:11:457655)
        at TabBarView.t.exports.TabBarView.onClick (/usr/share/atom/resources/app/static/<embedded>:11:1140453)
    

    Commands

      2x -6:35.7.0 core:save (input.hidden-input)
         -6:12.3.0 core:undo (input.hidden-input)
      4x -6:10.4.0 core:save (input.hidden-input)
         -4:25.1.0 core:backspace (input.hidden-input)
      3x -4:24.7.0 core:save (input.hidden-input)
         -3:52.2.0 core:move-left (input.hidden-input)
      2x -3:51.3.0 core:backspace (input.hidden-input)
         -3:48.4.0 core:paste (input.hidden-input)
      2x -3:47 core:undo (input.hidden-input)
         -3:46 core:backspace (input.hidden-input)
         -3:44.8.0 core:save (input.hidden-input)
      3x -3:12.1.0 core:backspace (input.hidden-input)
      2x -3:11 core:save (input.hidden-input)
         -1:47.9.0 core:copy (input.hidden-input)
         -1:47.6.0 find-and-replace:show (input.hidden-input)
         -1:47.3.0 core:paste (input.hidden-input)
    

    Non-Core Packages

    atom-ide-ui 0.13.0 
    ide-rust 0.19.3 
    language-rust 0.4.12 
    
  8. nicopoore commented on Jan 6, 2019

    @nicopoore

    Another:

    [Enter steps to reproduce:]

    1. ...
    2. ...

    Atom: 1.33.1 x64
    Electron: 2.0.16
    OS: Microsoft Windows 10 Pro
    Thrown From: Atom Core

    Stack Trace

    Uncaught TypeError: Cannot read property 'length' of undefined

    At C:\Users\...\AppData\Local\atom\app-1.33.1\resources\app\static\<embedded>:14
    
    TypeError: Cannot read property 'length' of undefined
        at ScreenLineBuilder.emitText (~/AppData/Local/atom/app-1.33.1/resources/app/static/<embedded>:14:1108114)
        at ScreenLineBuilder.buildScreenLines (~/AppData/Local/atom/app-1.33.1/resources/app/static/<embedded>:14:1103820)
        at DisplayLayer.getScreenLines (~/AppData/Local/atom/app-1.33.1/resources/app/static/<embedded>:14:89306)
        at TextEditorComponent.queryScreenLinesToRender (~/AppData/Local/atom/app-1.33.1/resources/app/static/<embedded>:11:79324)
        at TextEditorComponent.updateSyncBeforeMeasuringContent (~/AppData/Local/atom/app-1.33.1/resources/app/static/<embedded>:11:69977)
        at TextEditorComponent.updateSync (~/AppData/Local/atom/app-1.33.1/resources/app/static/<embedded>:11:67605)
        at TextEditorComponent.didMouseWheel (~/AppData/Local/atom/app-1.33.1/resources/app/static/<embedded>:11:92354)
    

    Commands

    Non-Core Packages

    script 3.18.1 
    
  9. stale commented on Feb 13, 2020

    @stale

    Thanks for your contribution!

    This issue has been automatically marked as stale because it has not had recent activity. Because the Atom team treats their issues as their backlog, stale issues are closed. If you would like this issue to remain open:

    1. Verify that you can still reproduce the issue in the latest version of Atom
    2. Comment that the issue is still reproducible and include:
      • What version of Atom you reproduced the issue on
      • What OS and version you reproduced the issue on
      • What steps you followed to reproduce the issue

    Issues that are labeled as triaged will not be automatically marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions