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 'scopeName' of undefined #6235
Atom Version: 0.189.0 System: linux 3.13.0-48-generic Thrown From: Atom Core
Stack Trace
Uncaught TypeError: Cannot read property 'scopeName' of undefined
At /opt/atom/resources/app/src/text-editor.js:2263
TypeError: Cannot read property 'scopeName' of undefined
at TextEditor.module.exports.TextEditor.usesSoftTabs (/opt/atom/resources/app/src/text-editor.js:2263:28)
at TextEditor.module.exports.TextEditor.handleTokenization (/opt/atom/resources/app/src/text-editor.js:2803:44)
at /opt/atom/resources/app/src/text-editor.js:205:24
at Emitter.module.exports.Emitter.emit (/opt/atom/resources/app/node_modules/event-kit/lib/emitter.js:82:11)
at TokenizedBuffer.module.exports.TokenizedBuffer.markTokenizationComplete (/opt/atom/resources/app/src/tokenized-buffer.js:306:22)
at TokenizedBuffer.module.exports.TokenizedBuffer.tokenizeNextChunk (/opt/atom/resources/app/src/tokenized-buffer.js:299:21)
at /opt/atom/resources/app/src/tokenized-buffer.js:247:26
at /opt/atom/resources/app/node_modules/underscore-plus/node_modules/underscore/underscore.js:666:47
@zdennis Thanks for providing some steps to reproduce this -- not sure if that's the same thing though, since you're manually setting the grammar to undefined there.
Can you think of a scenario where getGrammar() would return undefined (other than the user setting it to undefined)? Should we worry about this or just guard against the call on an undefined?
Tokenization occurs in chunks because we're still parsing on the UI thread and need to yield for browser updates when editing large files. This is why you see underscore at the top of the stack trace... we're using _.defer.
It seems like what may have happened is the grammar somehow got set to null in between two calls to tokenizeNextChunk. What's a bit confusing to me is how the grammar could have been assigned to null without throwing an exception itself. So, I don't have any answers here.
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
izuzak commentedon Apr 3, 2015
@ATNC Can you share some steps which reproduce the problem? Can you reproduce this in safe mode?
zdennis commentedon May 19, 2015
Putting the following in your init script reproduces the above issue for me:
Update: The above snippet fails because I don't actually have a markdown grammar installed.
izuzak commentedon May 26, 2015
@zdennis Thanks for providing some steps to reproduce this -- not sure if that's the same thing though, since you're manually setting the grammar to
undefinedthere.@nathansobo Seems like the exception is being thrown here:
Can you think of a scenario where
getGrammar()would return undefined (other than the user setting it toundefined)? Should we worry about this or just guard against the call on anundefined?nathansobo commentedon May 26, 2015
Tokenization occurs in chunks because we're still parsing on the UI thread and need to yield for browser updates when editing large files. This is why you see underscore at the top of the stack trace... we're using
_.defer.It seems like what may have happened is the grammar somehow got set to
nullin between two calls totokenizeNextChunk. What's a bit confusing to me is how the grammar could have been assigned tonullwithout throwing an exception itself. So, I don't have any answers here.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!