-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught TypeError: Cannot read property 'text' of undefined #23
Comments
Could you give the following information?
Thanks for reporting! |
Atom Version 0.177.0-5dea6e7 I am quite new to using atom. The setup should be fairly generic. I have added a (very) few settings tweaks from recommendations based on just what I have been doing. Working with html, css, javascript, markdown. Can not reproduce on the simple described sequence. Since the fail occurred in a much longer editing session, likely something else is interacting. For now, I am making it a habit to close and reopen the file after closing the split. |
Can you update to the latest version of Atom and let me know if this still reproduces? |
Pulled the latest repo commits. How often do I need to update to 'latest' for your reporting? Given how often commits are going in, I could be 10 behind in the time it takes to do the rebuild, and post this message. |
The latest release version (in this case, v0.182.0) is generally just fine. I suspect that this issue was caused by using the latest version of tabs-to-spaces on versions of Atom prior to v0.179.0, which was released over a week ago. Also, I'm probably going to give less priority to issues with unreleased versions that don't reproduce on released versions. |
backed up to version 0.182.0-d1e6dba and rebuilt. No problems with split / unsplit in preliminary testing. Since the original was built only a couple weeks ago, I had no idea it could be that far out of date. 5 'release' versions. |
Has this been resolved? |
I have not seen a repeat since upgrading the atom version. Looks like it. However, I have had to turn off the automatic untabify on save. With the size the project file has grown to, saving got too slow. At least when doing quick change and test cycles for the javascript. |
Thanks for the update! And #16 covers the performance issue. I don't really want to diverge from using Atom's built-in |
The speed comment was more to note that the reported problem is no longer being tested much in my environment. With tabs-to-spaces only being run 'on request', the scenario that caused the problem is not being hit any longer. And yes, atom itself needs some performance improvements. I just reported a simple case: select all with most of the content folded. |
This seems to be related to another atom reported problem when using tab splitting. The split seems to work, but after closing a split, various operation on same file in the 'main' tab start failing. At a high level, it looks to me like some of the structures / pointers for the file in another tab were deleted when the split was closed.
Remembered sequence: Slit a tab to get same file in 2 views; do stuff; save changes (operation very slow); close tab; do stuff; save; fail
Stack trace:
TypeError: Cannot read property 'text' of undefined
at DisplayBuffer.module.exports.DisplayBuffer.buildScreenLines (/opt/atom/share/atom/resources/app/src/display-buffer.js:1510:70)
at DisplayBuffer.module.exports.DisplayBuffer.updateScreenLines (/opt/atom/share/atom/resources/app/src/display-buffer.js:1464:20)
at DisplayBuffer.module.exports.DisplayBuffer.handleTokenizedBufferChange (/opt/atom/share/atom/resources/app/src/display-buffer.js:1444:12)
at /opt/atom/share/atom/resources/app/src/display-buffer.js:5:61
at Emitter.module.exports.Emitter.emit (/opt/atom/share/atom/resources/app/node_modules/event-kit/lib/emitter.js:82:11)
at TokenizedBuffer.module.exports.TokenizedBuffer.handleBufferChange (/opt/atom/share/atom/resources/app/src/tokenized-buffer.js:355:27)
at /opt/atom/share/atom/resources/app/src/tokenized-buffer.js:56:24
at Emitter.module.exports.Emitter.emit (/opt/atom/share/atom/resources/app/node_modules/service-hub/node_modules/event-kit/lib/emitter.js:82:11)
at TextBuffer.module.exports.TextBuffer.applyPatch (/opt/atom/share/atom/resources/app/node_modules/text-buffer/lib/text-buffer.js:594:20)
at BufferPatch.module.exports.BufferPatch.applyTo (/opt/atom/share/atom/resources/app/node_modules/text-buffer/lib/buffer-patch.js:74:21)
at Transaction.module.exports.Transaction.applyTo (/opt/atom/share/atom/resources/app/node_modules/text-buffer/lib/transaction.js:60:29)
at History.module.exports.History.abortTransaction (/opt/atom/share/atom/resources/app/node_modules/text-buffer/lib/history.js:165:24)
at History.module.exports.History.transact (/opt/atom/share/atom/resources/app/node_modules/text-buffer/lib/history.js:122:16)
at TextBuffer.module.exports.TextBuffer.transact (/opt/atom/share/atom/resources/app/node_modules/text-buffer/lib/text-buffer.js:687:27)
at TabsToSpaces.module.exports.TabsToSpaces.replaceWhitespaceWithSpaces (/home/phil/.atom/packages/tabs-to-spaces/lib/tabs-to-spaces.coffee:50:12)
at TabsToSpaces.module.exports.TabsToSpaces.untabify (/home/phil/.atom/packages/tabs-to-spaces/lib/tabs-to-spaces.coffee:19:6)
at /home/phil/.atom/packages/tabs-to-spaces/lib/index.coffee:39:24
at Emitter.module.exports.Emitter.emit (/opt/atom/share/atom/resources/app/node_modules/service-hub/node_modules/event-kit/lib/emitter.js:82:11)
at TextBuffer.module.exports.TextBuffer.saveAs (/opt/atom/share/atom/resources/app/node_modules/text-buffer/lib/text-buffer.js:965:20)
at TextBuffer.module.exports.TextBuffer.save (/opt/atom/share/atom/resources/app/node_modules/text-buffer/lib/text-buffer.js:958:19)
at TextEditor.module.exports.TextEditor.save (/opt/atom/share/atom/resources/app/src/text-editor.js:620:26)
at Pane.module.exports.Pane.saveItem (/opt/atom/share/atom/resources/app/src/pane.js:538:16)
at Pane.module.exports.Pane.saveActiveItem (/opt/atom/share/atom/resources/app/src/pane.js:522:19)
at Workspace.module.exports.Workspace.saveActivePaneItemAndReportErrors (/opt/atom/share/atom/resources/app/src/workspace.js:689:44)
at Workspace.module.exports.Workspace.saveActivePaneItem (/opt/atom/share/atom/resources/app/src/workspace.js:679:19)
at atom-workspace.atom.commands.add.core:save (/opt/atom/share/atom/resources/app/src/workspace-element.js:295:30)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/opt/atom/share/atom/resources/app/src/command-registry.js:243:29)
at /opt/atom/share/atom/resources/app/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/opt/atom/share/atom/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:558:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/opt/atom/share/atom/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:396:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/opt/atom/share/atom/resources/app/src/window-event-handler.js:170:20)
The text was updated successfully, but these errors were encountered: