Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Uncaught TypeError: Cannot read property 'editors' of undefined #480

Closed

Description

@LeKangouroo

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.201.0
System: Mac OS X 10.10.3
Thrown From: autocomplete-plus package, v2.17.1

Stack Trace

Uncaught TypeError: Cannot read property 'editors' of undefined

At /Users/ahemt_s/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:683

TypeError: Cannot read property 'editors' of undefined
  at /Users/ahemt_s/Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/symbol-provider.js:116:54
  at Emitter.module.exports.Emitter.emit (/Users/ahemt_s/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
  at TextBuffer.module.exports.TextBuffer.applyChange (/Users/ahemt_s/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:503:20)
  at TextBuffer.module.exports.TextBuffer.setTextInRange (/Users/ahemt_s/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:470:12)
  at Selection.module.exports.Selection.insertText (/Users/ahemt_s/Applications/Atom.app/Contents/Resources/app.asar/src/selection.js:452:43)
  at /Users/ahemt_s/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:729:31
  at /Users/ahemt_s/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:771:29
  at TextBuffer.module.exports.TextBuffer.transact (/Users/ahemt_s/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:678:18)
  at TextEditor.module.exports.TextEditor.transact (/Users/ahemt_s/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1132:26)
  at /Users/ahemt_s/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:765:24
  at TextEditor.module.exports.TextEditor.mergeSelections (/Users/ahemt_s/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1950:43)
  at TextEditor.module.exports.TextEditor.mergeIntersectingSelections (/Users/ahemt_s/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1924:35)
  at TextEditor.module.exports.TextEditor.mutateSelectedText (/Users/ahemt_s/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:763:19)
  at TextEditor.module.exports.TextEditor.insertText (/Users/ahemt_s/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:726:21)
  at TextEditor.object.(anonymous function) [as insertText] (/Users/ahemt_s/Applications/Atom.app/Contents/Resources/app.asar/node_modules/underscore-plus/lib/underscore-plus.js:77:27)
  at TextEditor.module.exports.TextEditor.insertNewline (/Users/ahemt_s/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:747:19)
  at TextEditor.object.(anonymous function) [as insertNewline] (/Users/ahemt_s/Applications/Atom.app/Contents/Resources/app.asar/node_modules/underscore-plus/lib/underscore-plus.js:77:27)
  at TextEditor.atom.commands.add.stopEventPropagationAndGroupUndo.editor:newline (/Users/ahemt_s/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor-element.js:593:19)
  at /Users/ahemt_s/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor-element.js:305:34
  at TextBuffer.module.exports.TextBuffer.transact (/Users/ahemt_s/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:678:18)
  at TextEditor.module.exports.TextEditor.transact (/Users/ahemt_s/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1132:26)
  at atom-text-editor.newCommandListeners.(anonymous function) (/Users/ahemt_s/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor-element.js:304:22)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Users/ahemt_s/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:238:29)
  at /Users/ahemt_s/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Users/ahemt_s/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:519:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Users/ahemt_s/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:354:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Users/ahemt_s/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:178:20)

Commands

  4x -1:45.9.0 core:close (ul.list-inline.tab-bar.inset-panel)
  2x -0:49.9.0 core:move-left (atom-text-editor.editor.is-focused)
     -0:49.1.0 core:move-right (atom-text-editor.editor.is-focused)
     -0:48.7.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:48.4.0 core:move-right (atom-text-editor.editor.is-focused)
  4x -0:42 core:backspace (atom-text-editor.editor.is-focused)
  4x -0:37.9.0 editor:move-to-beginning-of-word (atom-text-editor.editor.is-focused)
  2x -0:36.6.0 core:save (atom-text-editor.editor.is-focused.autocomplete-active)
     -0:08.1.0 pane:show-next-item (atom-text-editor.editor.is-focused)
     -0:04.6.0 pane:show-previous-item (atom-text-editor.editor.is-focused)
     -0:04.1.0 pane:show-next-item (atom-text-editor.editor.is-focused)
     -0:03.7.0 core:move-up (atom-text-editor.editor.is-focused)
     -0:03.5.0 core:move-down (atom-text-editor.editor.is-focused)
     -0:03.2.0 emmet:insert-formatted-line-break-only (atom-text-editor.editor.is-focused)
     -0:03.2.0 docblockr:parse-enter (atom-text-editor.editor.is-focused)
     -0:03.2.0 editor:newline (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "update-package-dependencies",
      "sublime-tabs",
      "language-mustache"
    ],
    "audioBeep": false
  },
  "autocomplete-plus": {
    "confirmCompletion": "tab and enter",
    "includeCompletionsFromAllBuffers": true
  }
}

Installed Packages

# User
aligner, v0.13.0
aligner-scss, v1.0.1
animated-cursor, v1.0.4
atom-beautify, v0.27.6
autocomplete-modules, v0.3.4
autocomplete-paths, v1.0.2
color-picker, v1.7.0
docblockr, v0.7.2
editorconfig, v1.0.0
emmet, v2.3.10
html-entities, v0.4.0
layout-manager, v0.2.3
project-manager, v1.15.7
project-palette-finder, v2.4.17
script, v2.23.0
tab-control, v0.1.1
tabs-to-spaces, v0.10.0

# Dev
No dev packages

Activity

  1. benogle commented on May 27, 2015

    @benogle
    Contributor

    Can you provide more information?

    • Was this a new file? If so, did you create an untitled buffer then save it?
    • Did you rename or move the file?
    • Any other path munging before this happened?
    • Did you have a split open with this file in it? If so was it open in multiple splits? Did you close a split this was in?

    It looks like an issue with path tracking, and I may have missed a case. I can paper over this error, but would like to understand the steps to cause it.

  2. AnotherJoSmith commented on Jun 1, 2015

    @AnotherJoSmith

    Just had this issue after I renamed the file. Could be related.. It will not let me type anything in the editor afterwards.

  3. benogle commented on Jun 1, 2015

    @benogle
    Contributor

    @AnotherJoSmith Did you have splits or anything? Was the file named before or was it untitled?

  4. AnotherJoSmith commented on Jun 1, 2015

    @AnotherJoSmith

    The file was named before and I had splits. I am currently trying to reproduce this more reliably.

  5. techmag commented on Jun 3, 2015

    @techmag

    Just had this appear with a sexy red box that pointed me here right after I renamed a file as well

    Unlikely to be repeatable but if I spot the pattern I'll be back.

    Uncaught TypeError: Cannot read property 'editors' of undefined
    /Applications/Atom.app/Contents/Resources/app.asar/node_modules/q/q.js:128
    Hide Stack Trace
    TypeError: Cannot read property 'editors' of undefined
      at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/symbol-provider.js:116:54
      at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
      at TextBuffer.module.exports.TextBuffer.applyChange (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:592:20)
      at TextBuffer.module.exports.TextBuffer.setTextInRange (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:532:12)
      at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:495:21
      at TextBuffer.module.exports.TextBuffer.transact (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:750:18)
      at TextBuffer.module.exports.TextBuffer.setTextViaDiff (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:476:19)
      at TextBuffer.module.exports.TextBuffer.reload (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1045:12)
      at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1169:26
      at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
      at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/pathwatcher/lib/file.js:430:40
      at _fulfilled (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/q/q.js:794:54)
      at self.promiseDispatch.done (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/q/q.js:823:30)
      at Promise.promise.promiseDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/q/q.js:756:13)
      at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/q/q.js:564:44
      at flush (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/q/q.js:110:17)
      at process._tickCallback (node.js:357:13)
      at EventEmitter.ipc.sendSync (/Applications/Atom.app/Contents/Resources/atom.asar/renderer/api/lib/ipc.js:21:31)
      at Object.RemoteMemberFunction [as showMessageBox] (/Applications/Atom.app/Contents/Resources/atom.asar/renderer/api/lib/remote.js:110:29)
      at Atom.module.exports.Atom.confirm (/Applications/Atom.app/Contents/Resources/app.asar/src/atom.js:720:23)
      at Pane.module.exports.Pane.promptToSaveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:488:21)
      at Pane.module.exports.Pane.destroyItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:441:18)
      at PaneView._results.push._this.(anonymous function) [as destroyItem] (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/delegato/lib/delegator.js:67:61)
      at SublimeTabBarView.module.exports.TabBarView.closeTab (/Users/garyhewett/.atom/packages/sublime-tabs/lib/tabs/tab-bar-view.coffee:124:11)
      at SublimeTabBarView.module.exports.TabBarView.closeOtherTabs (/Users/garyhewett/.atom/packages/sublime-tabs/lib/tabs/tab-bar-view.coffee:130:6)
      at HTMLUListElement.<anonymous> (/Users/garyhewett/.atom/packages/sublime-tabs/lib/tabs/tab-bar-view.coffee:15:43)
      at HTMLUListElement.handler (/Applications/Atom.app/Contents/Resources/app.asar/src/space-pen-extensions.js:112:34)
      at HTMLUListElement.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/space-pen/vendor/jquery.js:4681:9)
      at HTMLUListElement.elemData.handle (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/space-pen/vendor/jquery.js:4359:46)
      at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:238:29)
      at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61)
      at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:153:19)
      at [object Object].jQuery.fn.trigger (/Applications/Atom.app/Contents/Resources/app.asar/src/space-pen-extensions.js:64:23)
      at EventEmitter.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:75:67)
      at emitTwo (events.js:87:13)
      at EventEmitter.emit (events.js:169:7)
      at EventEmitter.ipc.sendSync (/Applications/Atom.app/Contents/Resources/atom.asar/renderer/api/lib/ipc.js:21:31)
      at BrowserWindow.RemoteMemberFunction [as emit] (/Applications/Atom.app/Contents/Resources/atom.asar/renderer/api/lib/remote.js:110:29)
      at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/context-menu-manager.js:170:31)
      at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:148:33)
      at HTMLDocument.handler (/Applications/Atom.app/Contents/Resources/app.asar/src/space-pen-extensions.js:112:34)
      at HTMLDocument.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/space-pen/vendor/jquery.js:4681:9)
      at HTMLDocument.elemData.handle (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/space-pen/vendor/jquery.js:4359:46)
    The error was thrown from the autocomplete-plus package. This issue has already been reported.
    View Issue 
    

    tklist_scala_-_users_garyhewett_documents_github_play_icrmalpha-_atom

  6. UnconventionalMindset commented on Jun 22, 2015

    @UnconventionalMindset

    Happened to me too after renaming a file from index.html.haml to index.html.erb and with the tab of the file already opened after renaming, I clicked on the file name to open it (even if it was alredy open).

    1. ...
    2. ...
    
    **Atom Version**: 0.210.0
    **System**: Mac OS X 10.10.3
    **Thrown From**: [autocomplete-plus](https://github.com/atom/autocomplete-plus) package, v2.17.4
    
    ### Stack Trace
    
    Uncaught TypeError: Cannot read property 'editors' of undefined
    
    

    At /Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:745

    TypeError: Cannot read property 'editors' of undefined
    at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/symbol-provider.js:115:54
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
    at TextBuffer.module.exports.TextBuffer.applyChange (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:594:20)
    at TextBuffer.module.exports.TextBuffer.setTextInRange (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:534:12)
    at Selection.module.exports.Selection.insertText (/Applications/Atom.app/Contents/Resources/app.asar/src/selection.js:452:43)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:746:31
    at /Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:791:29
    at TextBuffer.module.exports.TextBuffer.transact (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:740:18)
    at TextEditor.module.exports.TextEditor.transact (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1152:26)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:785:24
    at TextEditor.module.exports.TextEditor.mergeSelections (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1990:43)
    at TextEditor.module.exports.TextEditor.mergeIntersectingSelections (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1964:35)
    at TextEditor.module.exports.TextEditor.mutateSelectedText (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:783:19)
    at TextEditor.module.exports.TextEditor.insertText (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:743:21)
    at TextEditor.object.(anonymous function) [as insertText] (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/underscore-plus/lib/underscore-plus.js:77:27)
    at TextEditorComponent.module.exports.TextEditorComponent.onTextInput (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor-component.js:440:35)
    at HTMLDivElement. (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor-component.js:3:61)

    
    ### Commands
    
    
    
    ### Config
    
    ``` json
    {
      "core": {
        "disabledPackages": [
          "atom-color-highlight"
        ]
      },
      "autocomplete-plus": {
        "confirmCompletion": "tab and enter",
        "suggestionListFollows": "Cursor"
      }
    }
    

    Installed Packages

    # User
    highlight-column, v0.4.3
    highlight-line, v0.11.0
    highlight-selected, v0.10.1
    language-haml, v0.21.0
    regex-railroad-diagram, v0.8.0
    tabs-to-spaces, v0.11.0
    vim-mode, v0.53.0
    
    # Dev
    No dev packages
  7. atcwells commented on Jul 2, 2015

    @atcwells

    Received the same error when doing a find and replace on a large file. Same behaviour, once triggered caused the error to repeat whatever command I used.

  8. adamreisnz commented on Jul 3, 2015

    @adamreisnz

    Same happened here after renaming a file. Couldn't type anything in it anymore.

  9. added a commit that references this issue on Jul 7, 2015
    ef538af
  10. splashx commented on Jul 21, 2015

    @splashx

    got the error after selecting a block and CMD+X to cut it.

  11. benogle commented on Jul 21, 2015

    @benogle
    Contributor

    The fix for this will be out in atom 1.0.3 next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions