Cannot read property 'cursor' of undefined


#1

I started getting an error when I open my project folder in Atom. Below is the stack trace. Atom keeps crashing and won’t let open the folder at all.

TypeError: Cannot read property 'cursor' of undefined
  at Editor.module.exports.Editor.addCursorAtBufferPosition (/Applications/Atom.app/Contents/Resources/app/src/editor.js:1102:37)
  at new Editor (/Applications/Atom.app/Contents/Resources/app/src/editor.js:99:14)
  at Function.module.exports.Serializable.deserialize (/Applications/Atom.app/Contents/Resources/app/node_modules/serializable/lib/serializable.js:72:22)
  at DeserializerManager.module.exports.DeserializerManager.deserialize (/Applications/Atom.app/Contents/Resources/app/src/deserializer-manager.js:42:29)
  at /Applications/Atom.app/Contents/Resources/app/src/pane.js:86:35
  at Array.map (native)
  at Pane.module.exports.Pane.deserializeParams (/Applications/Atom.app/Contents/Resources/app/src/pane.js:85:36)
  at Function.module.exports.Serializable.deserialize (/Applications/Atom.app/Contents/Resources/app/node_modules/serializable/lib/serializable.js:58:25)
  at DeserializerManager.module.exports.DeserializerManager.deserialize (/Applications/Atom.app/Contents/Resources/app/src/deserializer-manager.js:42:29)
  at /Applications/Atom.app/Contents/Resources/app/src/pane-axis.js:49:35
  at Array.map (native)
  at PaneAxis.module.exports.PaneAxis.deserializeParams (/Applications/Atom.app/Contents/Resources/app/src/pane-axis.js:48:41)
  at Function.module.exports.Serializable.deserialize (/Applications/Atom.app/Contents/Resources/app/node_modules/serializable/lib/serializable.js:58:25)
  at DeserializerManager.module.exports.DeserializerManager.deserialize (/Applications/Atom.app/Contents/Resources/app/src/deserializer-manager.js:42:29)
  at PaneContainer.module.exports.PaneContainer.deserializeParams (/Applications/Atom.app/Contents/Resources/app/src/pane-container.js:47:40)
  at Function.module.exports.Serializable.deserialize (/Applications/Atom.app/Contents/Resources/app/node_modules/serializable/lib/serializable.js:58:25)
  at Workspace.module.exports.Workspace.deserializeParams (/Applications/Atom.app/Contents/Resources/app/src/workspace.js:70:44)
  at Function.module.exports.Serializable.deserialize (/Applications/Atom.app/Contents/Resources/app/node_modules/serializable/lib/serializable.js:58:25)
  at Atom.module.exports.Atom.deserializeWorkspaceView (/Applications/Atom.app/Contents/Resources/app/src/atom.js:305:42)
  at Atom.module.exports.Atom.deserializeEditorWindow (/Applications/Atom.app/Contents/Resources/app/src/atom.js:320:19)
  at Atom.module.exports.Atom.startEditorWindow (/Applications/Atom.app/Contents/Resources/app/src/atom.js:344:12)
  at Object.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/window-bootstrap.js:14:8)
  at Object.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/window-bootstrap.js:20:4)
  at Module._compile (module.js:455:26)
  at Object.Module._extensions..js (module.js:473:10)
  at Module.load (/Applications/Atom.app/Contents/Resources/app/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:311:12)
  at Module.require (module.js:363:17)
  at require (module.js:379:17)
  at window.onload (file:///Applications/Atom.app/Contents/Resources/app/static/index.js:20:5)
 index.js:29

#2

Have you tried deleting ~/.atom/storage? See Atom crashes on start, but only in one project directory?


#3

That solved the problem. Atom’s alive now.


#4

The temporary fix still works, but this still happens several times a day, mostly when I’m using the split screen view, if I remember correctly.


#5
  1. Which version of Atom are you using?
  2. What packages do you have installed beyond the base ones?
  3. What path is Atom installed in?

#6
  1. I’m using version 0.89.0
  2. here’s the list from the packages folder:
  • docs-snippets
  • javascript-snippets
  • autoclose-html
  • language-csharp
  • color-picker
  • language-jsx
  • colorpicker
  • Atom-Syntax-highlighting-for-sass
  1. in ~/.atom

Thanks


#7
  1. Ok
  2. Can you try running Atom with no extra packages and see if this still reproduces? Most often this kind of issue is due to a package problem.
  3. Atom.app is not in /Applications?

#8

Thanks I’ll try without any packages for a couple of days and see how it goes.


#9

I’ve tried it for a few days without any extra packages and it hasn’t crashed a single time yet. Thanks!