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 'isComment' of undefined #5905
Copy link
Copy link
Closed
Description
- Editing an unsaved .xml file
Atom Version: 0.182.0
System: linux 3.18.6-1-ARCH
Thrown From: Atom Core
Stack Trace
Uncaught TypeError: Cannot read property 'isComment' of undefined
At /usr/share/atom/resources/app/src/tokenized-buffer.js:401
TypeError: Cannot read property 'isComment' of undefined
at TokenizedBuffer.module.exports.TokenizedBuffer.isFoldableCodeAtRow (/usr/share/atom/resources/app/src/tokenized-buffer.js:401:71)
at TokenizedBuffer.module.exports.TokenizedBuffer.isFoldableAtRow (/usr/share/atom/resources/app/src/tokenized-buffer.js:396:19)
at TokenizedBuffer.module.exports.TokenizedBuffer.updateFoldableStatus (/usr/share/atom/resources/app/src/tokenized-buffer.js:384:25)
at TokenizedBuffer.module.exports.TokenizedBuffer.handleBufferChange (/usr/share/atom/resources/app/src/tokenized-buffer.js:351:20)
at /usr/share/atom/resources/app/src/tokenized-buffer.js:56:24
at Emitter.module.exports.Emitter.emit (/usr/share/atom/resources/app/node_modules/event-kit/lib/emitter.js:82:11)
at TextBuffer.module.exports.TextBuffer.applyPatch (/usr/share/atom/resources/app/node_modules/text-buffer/lib/text-buffer.js:594:20)
at BufferPatch.module.exports.BufferPatch.applyTo (/usr/share/atom/resources/app/node_modules/text-buffer/lib/buffer-patch.js:74:21)
at Transaction.module.exports.Transaction.applyTo (/usr/share/atom/resources/app/node_modules/text-buffer/lib/transaction.js:60:29)
at History.module.exports.History.abortTransaction (/usr/share/atom/resources/app/node_modules/text-buffer/lib/history.js:165:24)
at History.module.exports.History.transact (/usr/share/atom/resources/app/node_modules/text-buffer/lib/history.js:122:16)
at TextBuffer.module.exports.TextBuffer.transact (/usr/share/atom/resources/app/node_modules/text-buffer/lib/text-buffer.js:687:27)
at TextEditor.module.exports.TextEditor.transact (/usr/share/atom/resources/app/src/text-editor.js:1195:26)
at atom-text-editor.newCommandListeners.(anonymous function) (/usr/share/atom/resources/app/src/text-editor-element.js:304:22)
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:176:20)
Commands
3x -1:41.5 editor:newline (atom-text-editor.editor.is-focused)
-1:33.4 core:backspace (atom-text-editor.editor.is-focused)
-1:31.2 autocomplete:toggle (atom-text-editor.editor.is-focused)
-1:29.8 core:move-up (atom-text-editor.editor.is-focused)
-1:20.2 core:backspace (atom-text-editor.editor.is-focused)
-0:00.6 editor:newline (atom-text-editor.editor.is-focused)
Config
{
"core": {
"destroyEmptyPanes": false
},
"editor": {
"invisibles": {}
}
}Installed Packages
# User
atom-beautify, v0.21.3
file-icons, v1.5.1
linter, v0.12.0
linter-xmllint, v0.0.5
xml-formatter, v0.8.1
# Dev
No dev packagesReacted by xh3b4sd
Activity
thomasjo commentedon Mar 9, 2015
This is in all likelihood a bug in either
xml-formatterorlinter-xmllint; please verify if you are able to reproduce the problem in safe mode.maqen commentedon May 21, 2015
I'm unfortunately able to reproduce this in safe mode
Atom Version: 0.200.0
System: Mac OS X 10.10.3
Thrown From: Atom Core
Stack Trace
Uncaught TypeError: Cannot read property 'isComment' of undefined
Commands
Config
{ "core": { "themes": [ "atom-dark-ui", "solarized-dark-syntax" ], "disabledPackages": [ "coffee-lint", "language-haml", "run-command" ] }, "editor": { "showIndentGuide": true, "invisibles": {}, "scrollPastEnd": true, "softWrap": true } }Installed Packages
mnquintana commentedon May 21, 2015
@maqen Could you upload an example file that throws this error to a Gist?
Glavin001 commentedon May 23, 2015
I just experienced this bug. Here's a Gist: https://gist.github.com/Glavin001/c42ec72dc17fa9b7127c
My Gist includes the file I was typing, and what I did that was reproducing it. However after I pasted on top of the file it no longer causes error. Maybe that cleaned something.
Update: It appears to also occurs when I paste, not just when I type. This is terrible: I cannot paste into my code...
Update: I closed my split pane, that I had copied from. I opened up both files as separate tabs. Copied from one, and pasted into the other. It works now! So maybe a combination of pasting / typing + Split pane.
yeldarby commentedon May 29, 2015
Getting this error as well but when copy/pasting between two php files. Can confirm that it occurs when copying from one split pane and pasting into another and that the error does not occur if I am not using split panes but instead have them in tabs.
The bug is not consistently reproducible though. I just tried to open the file in a split pane again and it works now.
henriquebremenkanp commentedon Jun 3, 2015
Atom 0.204.0
Mac OSX 10.10.3
Some packages installed.
This is how I can reproduce the issue:

I think the problem is related to duplicated files in different tabs, which is the default behaviour when you create a new tab. On that new tab, having the old one still open, copy and paste a function will lead to this error. Anyway, closing the previously open tab and keeping the new one makes it work again.
Sorry for my bad english. I hope it helps someone.
izuzak commentedon Jun 10, 2015
@henriquebremenkanp @yeldarby Can you try reproducing this in Atom 0.208.0? I just tried following @henriquebremenkanp's instructions and wasn't able to reproduce, so wondering if you're seeing the same.
Also cc-ing @nathansobo for another pair of 👀 (it seems that some users were running into this with no packages installed).
izuzak commentedon Jun 13, 2015
Reported again over at #7260:
Eschon commentedon Jun 16, 2015
This error happened for me today
[Enter steps to reproduce below:]
I was just switching between tabs.
Atom Version: 0.209.0
System: Mac OS X 10.10.3
Thrown From: Atom Core
Stack Trace
Uncaught TypeError: Cannot read property 'isComment' of undefined
Commands
Config
{ "core": { "themes": [ "one-dark-ui", "solarized-dark-syntax" ], "disabledPackages": [ "image-view", "background-tips", "language-go", "language-less", "language-property-list", "language-todo", "language-toml", "spell-check", "bookmarks", "welcome", "autoflow", "merge-conflicts", "markdown-preview", "go-to-line", "language-c", "language-csharp", "language-java", "language-objective-c", "language-perl", "language-php", "language-python", "package-generator", "linter-tidy" ] }, "editor": { "invisibles": {}, "softWrapAtPreferredLineLength": true, "showInvisibles": true, "scrollPastEnd": true } }Installed Packages
Absorb exception in isFoldableCodeAtRow and report assertion failure
Absorb exception in isFoldableCodeAtRow and report assertion failure
stale commentedon Jul 22, 2017
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
lock commentedon Mar 31, 2018
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!