You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Uncaught TypeError: Cannot read property 'length' of undefined #16892
Atom: 1.24.0 x64 Electron: 1.6.16 OS: Mac OS X 10.13.3 Thrown From: Atom Core
Stack Trace
Uncaught TypeError: Cannot read property 'length' of undefined
At /Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/screen-line-builder.js:329
TypeError: Cannot read property 'length' of undefined
at ScreenLineBuilder.emitText (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/screen-line-builder.js:329:30)
at ScreenLineBuilder.buildScreenLines (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/screen-line-builder.js:141:22)
at DisplayLayer.getScreenLines (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/display-layer.js:643:41)
at TextEditorComponent.queryScreenLinesToRender (/Applications/Atom.app/Contents/Resources/app/src/text-editor-component.js:867:57)
at TextEditorComponent.updateSyncBeforeMeasuringContent (/Applications/Atom.app/Contents/Resources/app/src/text-editor-component.js:376:16)
at TextEditorComponent.updateSync (/Applications/Atom.app/Contents/Resources/app/src/text-editor-component.js:274:16)
at TextEditorComponent.didMouseWheel (/Applications/Atom.app/Contents/Resources/app/src/text-editor-component.js:1550:59)
@rsese I am able to reproduce in safe mode. When not in safe mode it pops up really often. In safe mode not so much. There is one specific file that if I remember correctly I used the collapse lines.
Could you try running atom --clear-window-state? I suggest reading the link below first as "Clearing the saved state permanently destroys any state that Atom has saved across all projects"
Atom had been crashing frequently for me for the past couple of days and this problem cropped up today. Don't remember what triggered this. But clearing window state helped. Will post an update if the problem reappears
To see this bug I:
Worked on a elm file in Atom.
Closed Atom
Worked on the same Elm file in JetBrains Rider
Save and close Rider
Open Atom
Bug appears:
Uncaught TypeError: Cannot read property 'length' of undefined
/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/screen-line-builder.js:329
To fix
Quit Atom
atom --clear-window-state
Reacted by Sandile Shongwe, michelBarthelemy, Felix Berger and Asmaa Zakaria
Just got the same problem, for some reason wen I try to open one project (this happen only at this project) the developer tools window is opened and so the atom stop working for this project. All other projects can run normally at the same time.
Reseting the window state atom --clear-window-state worked for me
Reacted by Vladislav Kuznecov
Reacted by Nagesh Jaunjal
Reacted by Javier Gutiérrez, Yehia Hesham Said Aly Ahmed, Wes Roberts and Vladislav Kuznecov
Reseting the window state atom --clear-window-state worked for me too.
The problem showed up this morning, errors seemed to be triggered from the minimap package. On disabling minimap, the linter-ui-default began causing the error. Disabling that package, the error came from atom/atom.
Now on Atom Mac, before the error the file was edited on Atom Windows and then pushed into Bitbucket.
Today (2018-08-07), I also get "Uncaught TypeError: Cannot read property 'length' of undefined" on my Mac (High Sierra 10.13.6). It did this before I updated Atom and all packages and it also did it after I updated everything. I also got the minimap error, reported above on July 4. ^^
It did it repeatedly, but only if I opened files that Atom knew about in its history. If I did atom --help or atom -? or if I did atom <file that does not exist>, it would work.
Just atom or atom <file that generated the error>, it would crash with the above error message. It also did it in atom --safe mode.
After I closed all files in atom's history and closing atom, I can no longer reproduce the issue. It now works, again.
Similar to #16892 (comment), I was using collapse lines (collapsed many different blocks, collapsed/uncollapsed the same blocks several times). This is the first time I used collapsing feature, did not have this problem at all before (when not using collapsing feature).
Uncaught TypeError: Cannot read property 'length' of undefined
At /usr/share/atom/resources/app/node_modules/text-buffer/lib/screen-line-builder.js:329
TypeError: Cannot read property 'length' of undefined
at ScreenLineBuilder.emitText (/usr/share/atom/resources/app/node_modules/text-buffer/lib/screen-line-builder.js:329:30)
at ScreenLineBuilder.buildScreenLines (/usr/share/atom/resources/app/node_modules/text-buffer/lib/screen-line-builder.js:141:22)
at DisplayLayer.getScreenLines (/usr/share/atom/resources/app/node_modules/text-buffer/lib/display-layer.js:643:41)
at TextEditorComponent.queryScreenLinesToRender (/usr/share/atom/resources/app/src/text-editor-component.js:870:57)
at TextEditorComponent.updateSyncBeforeMeasuringContent (/usr/share/atom/resources/app/src/text-editor-component.js:377:16)
at TextEditorComponent.updateSync (/usr/share/atom/resources/app/src/text-editor-component.js:275:16)
at etch.getScheduler.updateDocument (/usr/share/atom/resources/app/src/text-editor-component.js:225:46)
at ViewRegistry.performDocumentUpdate (/usr/share/atom/resources/app/src/view-registry.js:238:13)
@chokri You Atom version is very old and there has been many fixes regarding the error you are seeing since then.
@alisianoi There are some bugs with folding that you may want to subscribe to I believe #16078 could cause this error.
@beginrescueend If you get this after updating a package with an error from that package I believe it's an error with this package and should be filed there. Before you file any issues there please ensure you are using the latest version of Atom since we have fixed some bugs for this in the 1.2X releases.
To be able to move forward with this issue we are going to require some steps to reproduce the problem. Don't hesitate to reach out if you have steps to reproduce in a recent release of Atom.
Atom: 1.31.1 x64 Electron: 2.0.7 OS: Mac OS X 10.12.6 Thrown From: Atom Core
Stack Trace
Uncaught TypeError: Cannot read property 'length' of undefined
At /Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/screen-line-builder.js:328
TypeError: Cannot read property 'length' of undefined
at ScreenLineBuilder.emitText (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/screen-line-builder.js:328:31)
at ScreenLineBuilder.buildScreenLines (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/screen-line-builder.js:140:22)
at DisplayLayer.getScreenLines (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/display-layer.js:643:41)
at TextEditorComponent.queryScreenLinesToRender (/Applications/Atom.app/Contents/Resources/app/src/text-editor-component.js:871:57)
at TextEditorComponent.updateSyncBeforeMeasuringContent (/Applications/Atom.app/Contents/Resources/app/src/text-editor-component.js:386:16)
at TextEditorComponent.updateSync (/Applications/Atom.app/Contents/Resources/app/src/text-editor-component.js:276:16)
at TextEditorComponent.didMouseWheel (/Applications/Atom.app/Contents/Resources/app/src/text-editor-component.js:1560:59)
Was editing python file and came up with and error
C:\Users\username\AppData\Local\atom\app-1.31.2\resources\app\node_modules\text-buffer\lib\screen-line-builder.js:328
Hide Stack Trace
TypeError: Cannot read property 'length' of undefined
at ScreenLineBuilder.emitText (C:\Users\username\AppData\Local\atom\app-1.31.2\resources\app\node_modules\text-buffer\lib\screen-line-builder.js:328:31)
at ScreenLineBuilder.buildScreenLines (C:\Users\username\AppData\Local\atom\app-1.31.2\resources\app\node_modules\text-buffer\lib\screen-line-builder.js:140:22)
at DisplayLayer.getScreenLines (C:\Users\username\AppData\Local\atom\app-1.31.2\resources\app\node_modules\text-buffer\lib\display-layer.js:643:41)
at TextEditorComponent.queryScreenLinesToRender (C:\Users\username\AppData\Local\atom\app-1.31.2\resources\app\src\text-editor-component.js:871:57)
at TextEditorComponent.updateSyncBeforeMeasuringContent (C:\Users\username\AppData\Local\atom\app-1.31.2\resources\app\src\text-editor-component.js:386:16)
at TextEditorComponent.updateSync (C:\Users\username\AppData\Local\atom\app-1.31.2\resources\app\src\text-editor-component.js:276:16)
at etch.getScheduler.updateDocument (C:\Users\username\AppData\Local\atom\app-1.31.2\resources\app\src\text-editor-component.js:226:46)
at ViewRegistry.performDocumentUpdate (C:\Users\username\AppData\Local\atom\app-1.31.2\resources\app\src\view-registry.js:238:13)
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!
Activity
rsese commentedon Mar 6, 2018
Thanks for the report! Can you confirm a few things for us?
dixonwille commentedon Mar 7, 2018
@rsese I am able to reproduce in safe mode. When not in safe mode it pops up really often. In safe mode not so much. There is one specific file that if I remember correctly I used the collapse lines.
dixonwille commentedon Mar 7, 2018
Just switched from
One DarktoAtom Darktheme and unable to reproduce now?davisk4rpi commentedon Mar 7, 2018
Could you try running
atom --clear-window-state? I suggest reading the link below first as "Clearing the saved state permanently destroys any state that Atom has saved across all projects"https://flight-manual.atom.io/hacking-atom/sections/debugging/#clearing-saved-state
dixonwille commentedon Mar 7, 2018
@davisk4rpi as mentioned above I am unable to reproduce now (changed themes back and still unable to reproduce). Wish I could be of more help.
alxtz commentedon Mar 8, 2018
I've also faced the same issue, I think this is quite critical since the editor would freeze forever unless you clear the window state manually.
edalexfancher commentedon Mar 8, 2018
rsese commentedon Mar 8, 2018
Does anyone have specific steps to reproduce the error? And if you can still reproduce, is it reproducible for you in safe mode?
Also curious if you can share your community package list, I wonder if there's anything in common (
apm list --installed).probkiller commentedon Mar 10, 2018
Atom had been crashing frequently for me for the past couple of days and this problem cropped up today. Don't remember what triggered this. But clearing window state helped. Will post an update if the problem reappears
fergusmeiklejohn commentedon Mar 23, 2018
To see this bug I:
Worked on a elm file in Atom.
Closed Atom
Worked on the same Elm file in JetBrains Rider
Save and close Rider
Open Atom
Bug appears:
Uncaught TypeError: Cannot read property 'length' of undefined
/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/screen-line-builder.js:329
To fix
Quit Atom
atom --clear-window-state
rsese commentedon Mar 23, 2018
Thanks @fergusmeiklejohn - with those steps can you reproduce in safe mode?
AldonIsenberg11 commentedon Mar 26, 2018
apm list --installed├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
FernandoGOT commentedon Apr 5, 2018
Just got the same problem, for some reason wen I try to open one project (this happen only at this project) the developer tools window is opened and so the atom stop working for this project. All other projects can run normally at the same time.
Reseting the window state
atom --clear-window-stateworked for me9 remaining items
josfaber commentedon Jul 4, 2018
Reseting the window state atom --clear-window-state worked for me too.
The problem showed up this morning, errors seemed to be triggered from the minimap package. On disabling minimap, the linter-ui-default began causing the error. Disabling that package, the error came from atom/atom.
Now on Atom Mac, before the error the file was edited on Atom Windows and then pushed into Bitbucket.
beginrescueend commentedon Aug 7, 2018
Today (2018-08-07), I also get "Uncaught TypeError: Cannot read property 'length' of undefined" on my Mac (High Sierra 10.13.6). It did this before I updated Atom and all packages and it also did it after I updated everything. I also got the
minimaperror, reported above on July 4. ^^It did it repeatedly, but only if I opened files that Atom knew about in its history. If I did
atom --helporatom -?or if I didatom <file that does not exist>, it would work.Just
atomoratom <file that generated the error>, it would crash with the above error message. It also did it inatom --safemode.After I closed all files in atom's history and closing
atom, I can no longer reproduce the issue. It now works, again.alisianoi commentedon Aug 28, 2018
Subscribing. My two cents:
Similar to #16892 (comment), I was using collapse lines (collapsed many different blocks, collapsed/uncollapsed the same blocks several times). This is the first time I used collapsing feature, did not have this problem at all before (when not using collapsing feature).
Similar to #16892 (comment) my theme is One Dark.
chokri commentedon Sep 21, 2018
[Enter steps to reproduce:]
Atom: 1.25.0 x64
Electron: 1.7.11
OS: Ubuntu 18.04.1
Thrown From: Atom Core
Stack Trace
Uncaught TypeError: Cannot read property 'length' of undefined
Commands
Non-Core Packages
Ben3eeE commentedon Sep 21, 2018
@chokri You Atom version is very old and there has been many fixes regarding the error you are seeing since then.
@alisianoi There are some bugs with folding that you may want to subscribe to I believe #16078 could cause this error.
@beginrescueend If you get this after updating a package with an error from that package I believe it's an error with this package and should be filed there. Before you file any issues there please ensure you are using the latest version of Atom since we have fixed some bugs for this in the 1.2X releases.
Ben3eeE commentedon Sep 21, 2018
To be able to move forward with this issue we are going to require some steps to reproduce the problem. Don't hesitate to reach out if you have steps to reproduce in a recent release of Atom.
nickanna42 commentedon Oct 1, 2018
Same issue
[Enter steps to reproduce:]
Atom: 1.31.1 x64
Electron: 2.0.7
OS: Mac OS X 10.12.6
Thrown From: Atom Core
Stack Trace
Uncaught TypeError: Cannot read property 'length' of undefined
Commands
Non-Core Packages
nickanna42 commentedon Oct 1, 2018
RTFM:
I closed all files in all open windows, closed all windows, ran
atom --clear-window-state, and problem resolved itselfHouley01 commentedon Oct 15, 2018
Was editing python file and came up with and error
C:\Users\username\AppData\Local\atom\app-1.31.2\resources\app\node_modules\text-buffer\lib\screen-line-builder.js:328
Hide Stack Trace
TypeError: Cannot read property 'length' of undefined
at ScreenLineBuilder.emitText (C:\Users\username\AppData\Local\atom\app-1.31.2\resources\app\node_modules\text-buffer\lib\screen-line-builder.js:328:31)
at ScreenLineBuilder.buildScreenLines (C:\Users\username\AppData\Local\atom\app-1.31.2\resources\app\node_modules\text-buffer\lib\screen-line-builder.js:140:22)
at DisplayLayer.getScreenLines (C:\Users\username\AppData\Local\atom\app-1.31.2\resources\app\node_modules\text-buffer\lib\display-layer.js:643:41)
at TextEditorComponent.queryScreenLinesToRender (C:\Users\username\AppData\Local\atom\app-1.31.2\resources\app\src\text-editor-component.js:871:57)
at TextEditorComponent.updateSyncBeforeMeasuringContent (C:\Users\username\AppData\Local\atom\app-1.31.2\resources\app\src\text-editor-component.js:386:16)
at TextEditorComponent.updateSync (C:\Users\username\AppData\Local\atom\app-1.31.2\resources\app\src\text-editor-component.js:276:16)
at etch.getScheduler.updateDocument (C:\Users\username\AppData\Local\atom\app-1.31.2\resources\app\src\text-editor-component.js:226:46)
at ViewRegistry.performDocumentUpdate (C:\Users\username\AppData\Local\atom\app-1.31.2\resources\app\src\view-registry.js:238:13)
no-response commentedon Oct 19, 2018
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.
lock commentedon Apr 17, 2019
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!