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 'matchesParams' of undefined when hit enter in html file #6899
Copy link
Copy link
Closed
Description
[Enter steps to reproduce below:]
- hit enter where the cursor shows in the above screenshot
Atom Version: 0.201.0
System: Mac OS X 10.10.4
Thrown From: Atom Core
Stack Trace
Uncaught TypeError: Cannot read property 'matchesParams' of undefined
At /Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/marker-store.js:134
TypeError: Cannot read property 'matchesParams' of undefined
at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/marker-store.js:134:21
at Set.forEach (native)
at MarkerStore.module.exports.MarkerStore.findMarkers (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/marker-store.js:130:17)
at TextBuffer.module.exports.TextBuffer.findMarkers (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:620:31)
at DisplayBuffer.module.exports.DisplayBuffer.findMarkers (/Applications/Atom.app/Contents/Resources/app.asar/src/display-buffer.js:1319:26)
at DisplayBuffer.module.exports.DisplayBuffer.decorationsForScreenRowRange (/Applications/Atom.app/Contents/Resources/app.asar/src/display-buffer.js:1208:20)
at TextEditor.module.exports.TextEditor.decorationsForScreenRowRange (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1210:33)
at TextEditorPresenter.module.exports.TextEditorPresenter.updateDecorations (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor-presenter.js:1500:26)
at TextEditorPresenter.module.exports.TextEditorPresenter.getState (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor-presenter.js:122:14)
at TextEditorComponent.module.exports.TextEditorComponent.updateSync (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor-component.js:182:38)
at TextEditorComponent.module.exports.TextEditorComponent.becameVisible (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor-component.js:278:21)
at TextEditorComponent.module.exports.TextEditorComponent.checkForVisibilityChange (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor-component.js:810:16)
at TextEditorComponent.module.exports.TextEditorComponent.pollDOM (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor-component.js:797:17)
at /Applications/Atom.app/Contents/Resources/app.asar/src/text-editor-component.js:3:61
at ViewRegistry.module.exports.ViewRegistry.performDocumentPoll (/Applications/Atom.app/Contents/Resources/app.asar/src/view-registry.js:202:11)
at /Applications/Atom.app/Contents/Resources/app.asar/src/view-registry.js:3:61
Commands
2x -0:34.4.0 pane:show-previous-item (atom-text-editor.editor.is-focused)
3x -0:33.2.0 pane:show-next-item (atom-text-editor.editor.is-focused)
-0:20.3.0 core:undo (atom-text-editor.editor.is-focused)
-0:19.6.0 core:redo (atom-text-editor.editor.is-focused)
-0:19.3.0 core:save (atom-text-editor.editor.is-focused)
-0:17.8.0 editor:move-to-first-character-of-line (atom-text-editor.editor.is-focused)
3x -0:17.5.0 atomic-emacs:previous-line (atom-text-editor.editor.is-focused)
-0:17 atomic-emacs:set-mark (atom-text-editor.editor.is-focused)
2x -0:16.8.0 atomic-emacs:next-line (atom-text-editor.editor.is-focused)
-0:16.5.0 editor:move-to-end-of-line (atom-text-editor.editor.is-focused)
-0:16 atomic-emacs:copy (atom-text-editor.editor.is-focused)
-0:15.6.0 editor:newline (atom-text-editor.editor.is-focused)
-0:15.3.0 core:paste (atom-text-editor.editor.is-focused)
2x -0:11 editor:newline (atom-text-editor.editor.is-focused)
-0:03.4.0 atomic-emacs:next-line (atom-text-editor.editor.is-focused)
-0:03.1.0 editor:move-to-first-character-of-line (atom-text-editor.editor.is-focused)
Config
{
"core": {
"themes": [
"seti-ui",
"seti-syntax"
],
"disabledPackages": [
"emacs-mode"
],
"projectHome": "~/projects",
"ignoredNames": [
".git",
".hg",
".svn",
".DS_Store",
"._*",
"Thumbs.db",
"bower_compponenets",
"node_modules"
]
},
"editor": {
"invisibles": {},
"fontSize": 12,
"lineHeight": 1.5
}
}Installed Packages
# User
atomic-emacs, v0.5.1
seti-syntax, v0.4.0
seti-ui, v0.7.1
# Dev
No dev packages
Activity
izuzak commentedon May 22, 2015
Thanks for the report, @onepill. Can you reliably reproduce this perhaps?
I wasn't able to reproduce this, but noticed that
pollDOMcall which we talked about recently, @kevinsawicki (I think we were looking at #6117? not sure). Maybe the same type of problem here?Also gonna /cc @nathansobo @maxbrunsfeld for more 👀 on these types of problems
nathansobo commentedon May 22, 2015
@maxbrunsfeld it seems like we're pulling a marker id out of the marker index that doesn't correspond to a marker object in the marker store. But how? My money is on a bug in the marker index deleting ids somehow. Maybe we should add that to the random spec?
nathansobo commentedon May 22, 2015
Nevermind. Delete is in the random spec.
nathansobo commentedon May 22, 2015
@izuzak Interestingly this doesn't seem directly related to entering the newline. The
pollDOMis detecting an editor becoming visible and triggering a display update, in which the exception occurs because of the inconsistent state discussed above. TheMarkerStorecontains aMarkerIndexto optimize lookups. The index just stores integer ids, which map to objects representing markers in the marker store, and for some reason these are getting out of sync.nathansobo commentedon May 22, 2015
This could be some evil interaction with atomic-emacs. It's still a core bug. No package should be able to put the marker index in an inconsistent state. But it might be helpful in reproducing. Looks like the
atomic-emacs:set-markcommand was used recently before the issue, which probably creates a marker... or it could be a red herring.onepill commentedon May 22, 2015
@izuzak Hi, cant reproduce it after i closed and re-open that file.
oggy commentedon Jun 7, 2015
I can reliably reproduce this by running
atomic-emacs:set-mark(ctrl-space), moving down a line, and theneditor:split-selections-into-lines(cmd-shift-L).Definitely seems like some interaction between AE & core, but I don't think we're doing anything outside the public API of Marker here. Will dig in more later.
nathansobo commentedon Jun 8, 2015
I can confirm these reproduction steps. Thanks very much. Investigating this now.
nathansobo commentedon Jun 8, 2015
Figured it out. When a destroyed marker is updated we are reinserting it into the index. Will push a fix later today when I'm done traveling.
oggy commentedon Jun 8, 2015
Great -- thanks for the update @nathansobo !
Don’t process updates on destroyed markers
nathansobo commentedon Jun 8, 2015
✨ Thanks a ton @oggy for the clear reproduction steps. You've saved us a lot of time.
PointedEars commentedon Feb 9, 2017
This problem appears to be back.
Atom: 1.14.0 x64 (no problems with 1.13.1)
Electron: 1.3.13
OS: Debian GNU/Linux
Thrown From: Atom Core
Stack Trace
Uncaught TypeError: Cannot read property 'matchesParams' of undefined
Commands
Non-Core Packages
Second error
Atom: 1.14.0 x64 (no problems with 1.13.1)
Electron: 1.3.13
OS: Debian GNU/Linux
Thrown From: tabs package 0.104.1
Stack Trace
Uncaught TypeError: Cannot read property 'destroy' of undefined
Commands
Non-Core Packages
clearmisp commentedon Feb 9, 2017
+1, same here with Atom 1.14.0.
nathansobo commentedon Feb 9, 2017
Investigating this. Please fall back to 1.13.1 and disable updates in the meantime.
nathansobo commentedon Feb 9, 2017
If people could post their own stack traces and list of non-core packages on this it would be helpful.
⬆️ text-buffer
⬆️ text-buffer
nathansobo commentedon Feb 9, 2017
This is fixed in 1.14.1, which I just published.
clare-aire commentedon Feb 10, 2017
Thank you for the fix!
lock commentedon Apr 3, 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!