atom / status-bar

Status bar for Atom
MIT License
100 stars 72 forks source link

Uncaught TypeError: Cannot read property 'getBufferPosition' of undefined #56

Closed silasvasconcelos closed 6 years ago

silasvasconcelos commented 9 years ago

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.174.0 System: Mac OS X 10.10.2 Thrown From: status-bar package, v0.57.0

Stack Trace

Uncaught TypeError: Cannot read property 'getBufferPosition' of undefined

At /Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1336

TypeError: Cannot read property 'getBufferPosition' of undefined
  at TextEditor.module.exports.TextEditor.getCursorBufferPosition (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1336:34)
  at status-bar-cursor.CursorPositionView.updatePosition (/Applications/Atom.app/Contents/Resources/app/node_modules/status-bar/lib/cursor-position-view.js:48:73)
  at status-bar-cursor.CursorPositionView.subscribeToActiveTextEditor (/Applications/Atom.app/Contents/Resources/app/node_modules/status-bar/lib/cursor-position-view.js:39:19)
  at /Applications/Atom.app/Contents/Resources/app/node_modules/status-bar/lib/cursor-position-view.js:17:24
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:82:11)
  at /Applications/Atom.app/Contents/Resources/app/src/pane-container.js:347:34
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:82:11)
  at Pane.module.exports.Pane.setActiveItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:264:22)
  at Pane.module.exports.Pane.activateItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:328:21)
  at Pane.module.exports.Pane.activateItemAtIndex (/Applications/Atom.app/Contents/Resources/app/src/pane.js:322:19)
  at Pane.module.exports.Pane.activatePreviousItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:293:21)
  at Pane.module.exports.Pane.removeItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:393:16)
  at Pane.module.exports.Pane.destroyItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:457:16)
  at HTMLDivElement.<anonymous> (/Applications/Atom.app/Contents/Resources/app/node_modules/tabs/lib/tab-bar-view.js:174:22)
  at space-pen-ul.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/archive-view/node_modules/atom-space-pen-views/node_modules/space-pen/vendor/jquery.js:4676:9)
  at space-pen-ul.elemData.handle (/Applications/Atom.app/Contents/Resources/app/node_modules/archive-view/node_modules/atom-space-pen-views/node_modules/space-pen/vendor/jquery.js:4360:46)

Commands

     -1:35.4 editor:move-to-first-character-of-line (atom-text-editor.editor)
     -1:32.9 editor:move-to-end-of-screen-line (atom-text-editor.editor)
  4x -1:32.0 core:backspace (atom-text-editor.editor)
  3x -1:28.0 core:move-up (atom-text-editor.editor)
     -1:25.3 core:move-down (atom-text-editor.editor)
     -1:25.0 editor:move-to-end-of-screen-line (atom-text-editor.editor)
     -1:24.8 editor:newline (atom-text-editor.editor)
  2x -1:21.7 core:backspace (atom-text-editor.editor)
  3x -1:19.9 snippets:next-tab-stop (atom-text-editor.editor)
  3x -1:16.1 core:backspace (atom-text-editor.editor)
  2x -1:04.6 core:move-up (atom-text-editor.editor)
     -1:00.0 core:move-down (atom-text-editor.editor)
     -0:59.7 core:backspace (atom-text-editor.editor)
     -0:53.0 deprecation-cop:view (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-base16-tomorrow-dark-theme.theme-seti-ui)
  3x -0:03.1 core:backspace (atom-text-editor.editor.mini)
     -0:00.0 core:confirm (atom-text-editor.editor.mini)

Config

{
  "core": {
    "themes": [
      "seti-ui",
      "base16-tomorrow-dark-theme"
    ]
  }
}

Installed Packages

# User
atom-beautify, v0.21.2
atom-django, v0.2.1
django-templates, v0.3.0
language-django, v0.1.1
language-python-django-templates, v0.1.0
ruby-strftime-reference, v0.2.0
seti-ui, v0.6.1

# Dev
No dev packages

/cc @atom/core

benogle commented 9 years ago

You should upgrade atom to the latest version. Let me know if this is still an issue.

elpollitodiablo commented 9 years ago

I'm on 0.194.0 and i get this too. will post stack trace when it happens again

elpollitodiablo commented 9 years ago
  1. open a lot of files
  2. start closing them till error

Atom Version: 0.194.0 System: Mac OS X 10.10.2 Thrown From: status-bar package, v0.69.0

Stack Trace

Uncaught TypeError: Cannot read property 'getBufferPosition' of undefined

At /Applications/Dev/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1269

TypeError: Cannot read property 'getBufferPosition' of undefined
  at TextEditor.module.exports.TextEditor.getCursorBufferPosition (/Applications/Dev/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1269:34)
  at status-bar-cursor.CursorPositionView.updatePosition (/Applications/Dev/Atom.app/Contents/Resources/app.asar/node_modules/status-bar/lib/cursor-position-view.js:48:73)
  at status-bar-cursor.CursorPositionView.subscribeToActiveTextEditor (/Applications/Dev/Atom.app/Contents/Resources/app.asar/node_modules/status-bar/lib/cursor-position-view.js:39:19)
  at /Applications/Dev/Atom.app/Contents/Resources/app.asar/node_modules/status-bar/lib/cursor-position-view.js:17:24
  at Emitter.module.exports.Emitter.emit (/Applications/Dev/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
  at /Applications/Dev/Atom.app/Contents/Resources/app.asar/src/pane-container.js:338:34
  at Emitter.module.exports.Emitter.emit (/Applications/Dev/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
  at Pane.module.exports.Pane.setActiveItem (/Applications/Dev/Atom.app/Contents/Resources/app.asar/src/pane.js:234:22)
  at Pane.module.exports.Pane.activateItem (/Applications/Dev/Atom.app/Contents/Resources/app.asar/src/pane.js:298:21)
  at Pane.module.exports.Pane.activateItemAtIndex (/Applications/Dev/Atom.app/Contents/Resources/app.asar/src/pane.js:292:19)
  at Pane.module.exports.Pane.activatePreviousItem (/Applications/Dev/Atom.app/Contents/Resources/app.asar/src/pane.js:263:21)
  at Pane.module.exports.Pane.removeItem (/Applications/Dev/Atom.app/Contents/Resources/app.asar/src/pane.js:372:16)
  at Pane.module.exports.Pane.destroyItem (/Applications/Dev/Atom.app/Contents/Resources/app.asar/src/pane.js:442:16)
  at Pane.module.exports.Pane.destroyActiveItem (/Applications/Dev/Atom.app/Contents/Resources/app.asar/src/pane.js:419:12)
  at Workspace.module.exports.Workspace.destroyActivePaneItem (/Applications/Dev/Atom.app/Contents/Resources/app.asar/src/workspace.js:582:35)
  at Workspace.module.exports.Workspace.destroyActivePaneItemOrEmptyPane (/Applications/Dev/Atom.app/Contents/Resources/app.asar/src/workspace.js:621:21)
  at atom-workspace.atom.commands.add.core:close (/Applications/Dev/Atom.app/Contents/Resources/app.asar/src/workspace-element.js:307:30)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Dev/Atom.app/Contents/Resources/app.asar/src/command-registry.js:238:29)
  at /Applications/Dev/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Dev/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:519:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Dev/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:354:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Dev/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:178:20)

Commands

     -0:59.1.0 deprecation-cop:view (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
     -0:36.3.0 core:save (atom-text-editor.editor.is-focused)
     -0:34.6.0 core:undo (atom-text-editor.editor.is-focused)
  2x -0:34.1.0 core:save (atom-text-editor.editor.is-focused)
     -0:10.3.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:09.5.0 core:save (atom-text-editor.editor.is-focused)
  4x -0:08.9.0 core:close (atom-text-editor.editor.is-focused)

Config

{
  "core": {}
}

Installed Packages

# User
Stylus, v0.6.0
atom-terminal, v0.7.0
jshint, v0.7.2
linter, v0.5.18
save-session, v0.12.0

# Dev
No dev packages
lee-dohm commented 9 years ago

Can you be more specific than "a lot" of files? I haven't seen this behavior on less than twenty files. And admittedly, I don't open more than that at once.

elpollitodiablo commented 9 years ago

ok i have to correct myself after testing it again:

  1. open 2 or more files
  2. close them quickly one after another
  3. last file triggers error additionally: this seems to happen only after some time working with atom. upon closing and re-opening atom, I can't trigger the error anymore.
Fed03 commented 9 years ago

+1 This happens to me also with just one file opened. I'm on Windows 7 x64, Atom 0.194

mikafinja commented 9 years ago

Same Problem here.

Atom Version: 1.0.0 System: "Fedora release 21 Thrown From: status-bar package, v0.74.0

Stack Trace

Uncaught TypeError: Cannot read property 'getBufferPosition' of undefined

At /usr/share/atom/resources/app.asar/src/text-editor.js:1322

TypeError: Cannot read property 'getBufferPosition' of undefined
  at TextEditor.module.exports.TextEditor.getCursorBufferPosition (/usr/share/atom/resources/app.asar/src/text-editor.js:1322:34)
  at status-bar-cursor.CursorPositionView.updatePosition (/usr/share/atom/resources/app.asar/node_modules/status-bar/lib/cursor-position-view.js:73:73)
  at status-bar-cursor.CursorPositionView.subscribeToActiveTextEditor (/usr/share/atom/resources/app.asar/node_modules/status-bar/lib/cursor-position-view.js:51:19)
  at /usr/share/atom/resources/app.asar/node_modules/status-bar/lib/cursor-position-view.js:19:24
  at Emitter.module.exports.Emitter.emit (/usr/share/atom/resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
  at /usr/share/atom/resources/app.asar/src/pane-container.js:343:34
  at Emitter.module.exports.Emitter.emit (/usr/share/atom/resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
  at Pane.module.exports.Pane.setActiveItem (/usr/share/atom/resources/app.asar/src/pane.js:234:22)
  at Pane.module.exports.Pane.activateItem (/usr/share/atom/resources/app.asar/src/pane.js:298:21)
  at Pane.module.exports.Pane.activateItemAtIndex (/usr/share/atom/resources/app.asar/src/pane.js:292:19)
  at Pane.module.exports.Pane.activateNextItem (/usr/share/atom/resources/app.asar/src/pane.js:253:21)
  at Pane.module.exports.Pane.removeItem (/usr/share/atom/resources/app.asar/src/pane.js:370:16)
  at Pane.module.exports.Pane.destroyItem (/usr/share/atom/resources/app.asar/src/pane.js:442:16)
  at HTMLDivElement.<anonymous> (/usr/share/atom/resources/app.asar/node_modules/tabs/lib/tab-bar-view.js:236:22)
  at space-pen-ul.jQuery.event.dispatch (/usr/share/atom/resources/app.asar/node_modules/jquery/dist/jquery.js:4435:9)
  at space-pen-ul.elemData.handle (/usr/share/atom/resources/app.asar/node_modules/jquery/dist/jquery.js:4121:28)

Commands

     -7:22.7.0 core:backspace (atom-text-editor.editor.is-focused)
     -7:21.8.0 core:undo (atom-text-editor.editor.is-focused)
     -7:20.2.0 editor:delete-to-beginning-of-word (atom-text-editor.editor.is-focused)
     -7:17.2.0 core:undo (atom-text-editor.editor.is-focused)
     -7:16.2.0 core:paste (atom-text-editor.editor.is-focused)
     -7:15.1.0 core:select-all (atom-text-editor.editor.is-focused)
     -7:14.2.0 snippets:next-tab-stop (atom-text-editor.editor.is-focused)
     -7:14.2.0 snippets:expand (atom-text-editor.editor.is-focused)
     -7:14.2.0 editor:indent (atom-text-editor.editor.is-focused)
     -7:13.7.0 snippets:next-tab-stop (atom-text-editor.editor.is-focused)
     -7:13.7.0 snippets:expand (atom-text-editor.editor.is-focused)
     -7:13.7.0 editor:indent (atom-text-editor.editor.is-focused)
     -7:08.7.0 grammar-selector:show (atom-text-editor.editor)
     -7:08.1.0 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
     -7:08.1.0 core:cancel (atom-text-editor.editor.mini.is-focused)
     -7:06.5.0 core:select-all (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "one-dark-ui",
      "solarized-dark-syntax"
    ],
    "audioBeep": false,
    "autoHideMenuBar": true
  }
}

Installed Packages

# User
ctrl-last-tab, v0.2.0

# Dev
No dev packages
sriharshakappala commented 9 years ago

[Enter steps to reproduce below:]

1.Switching over multiple files quickly Ctrl+Alt+T throws this too

Atom Version: 0.209.0 System: Microsoft Windows 8 Single Language Thrown From: status-bar package, v0.74.0

Stack Trace

Uncaught TypeError: Cannot read property 'getBufferPosition' of undefined

At C:\Users\Sri Harsha Kappala\AppData\Local\atom\app-0.209.0\resources\app.asar\src\text-editor.js:1318

TypeError: Cannot read property 'getBufferPosition' of undefined
    at TextEditor.module.exports.TextEditor.getCursorBufferPosition (C:\Users\Sri Harsha Kappala\AppData\Local\atom\app-0.209.0\resources\app.asar\src\text-editor.js:1318:34)
    at status-bar-cursor.CursorPositionView.updatePosition (C:\Users\Sri Harsha Kappala\AppData\Local\atom\app-0.209.0\resources\app.asar\node_modules\status-bar\lib\cursor-position-view.js:73:73)
    at status-bar-cursor.CursorPositionView.subscribeToActiveTextEditor (C:\Users\Sri Harsha Kappala\AppData\Local\atom\app-0.209.0\resources\app.asar\node_modules\status-bar\lib\cursor-position-view.js:51:19)
    at C:\Users\Sri Harsha Kappala\AppData\Local\atom\app-0.209.0\resources\app.asar\node_modules\status-bar\lib\cursor-position-view.js:19:24
    at Emitter.module.exports.Emitter.emit (C:\Users\Sri Harsha Kappala\AppData\Local\atom\app-0.209.0\resources\app.asar\node_modules\event-kit\lib\emitter.js:82:11)
    at C:\Users\Sri Harsha Kappala\AppData\Local\atom\app-0.209.0\resources\app.asar\src\pane-container.js:343:34
    at Emitter.module.exports.Emitter.emit (C:\Users\Sri Harsha Kappala\AppData\Local\atom\app-0.209.0\resources\app.asar\node_modules\event-kit\lib\emitter.js:82:11)
    at Pane.module.exports.Pane.setActiveItem (C:\Users\Sri Harsha Kappala\AppData\Local\atom\app-0.209.0\resources\app.asar\src\pane.js:234:22)
    at Pane.module.exports.Pane.activateItem (C:\Users\Sri Harsha Kappala\AppData\Local\atom\app-0.209.0\resources\app.asar\src\pane.js:298:21)
    at Pane.module.exports.Pane.activateItemAtIndex (C:\Users\Sri Harsha Kappala\AppData\Local\atom\app-0.209.0\resources\app.asar\src\pane.js:292:19)

Commands

  2x -0:14.6.0 pane:show-next-item (atom-text-editor.editor.is-focused)

Config

{
  "core": {}
}

Installed Packages

# User
language-rust, v0.4.3

# Dev
No dev packages
jdsimcoe commented 9 years ago

:+1: This happens when I used the contextual menu to Close this pane. Running Atom 1.0.2.

bsaunder commented 8 years ago

[Enter steps to reproduce below:]

  1. Open Settings Tab when 1 or more Other files are open
  2. Click the "X" on the Settings Tab to Close it

Atom Version: 0.182.0 System: linux 4.5.7-200.fc23.x86_64 Thrown From: status-bar package, v0.60.0

Stack Trace

Uncaught TypeError: Cannot read property 'getBufferPosition' of undefined

At /usr/share/atom/resources/app/src/text-editor.js:1358

TypeError: Cannot read property 'getBufferPosition' of undefined
  at TextEditor.module.exports.TextEditor.getCursorBufferPosition (/usr/share/atom/resources/app/src/text-editor.js:1358:34)
  at status-bar-cursor.CursorPositionView.updatePosition (/usr/share/atom/resources/app/node_modules/status-bar/lib/cursor-position-view.js:48:73)
  at status-bar-cursor.CursorPositionView.subscribeToActiveTextEditor (/usr/share/atom/resources/app/node_modules/status-bar/lib/cursor-position-view.js:39:19)
  at /usr/share/atom/resources/app/node_modules/status-bar/lib/cursor-position-view.js:17:24
  at Emitter.module.exports.Emitter.emit (/usr/share/atom/resources/app/node_modules/event-kit/lib/emitter.js:82:11)
  at /usr/share/atom/resources/app/src/pane-container.js:347:34
  at Emitter.module.exports.Emitter.emit (/usr/share/atom/resources/app/node_modules/event-kit/lib/emitter.js:82:11)
  at Pane.module.exports.Pane.setActiveItem (/usr/share/atom/resources/app/src/pane.js:264:22)
  at Pane.module.exports.Pane.activateItem (/usr/share/atom/resources/app/src/pane.js:328:21)
  at Pane.module.exports.Pane.activateItemAtIndex (/usr/share/atom/resources/app/src/pane.js:322:19)
  at Pane.module.exports.Pane.activatePreviousItem (/usr/share/atom/resources/app/src/pane.js:293:21)
  at Pane.module.exports.Pane.removeItem (/usr/share/atom/resources/app/src/pane.js:393:16)
  at Pane.module.exports.Pane.destroyItem (/usr/share/atom/resources/app/src/pane.js:457:16)
  at HTMLDivElement.<anonymous> (/usr/share/atom/resources/app/node_modules/tabs/lib/tab-bar-view.js:179:22)
  at space-pen-ul.jQuery.event.dispatch (/usr/share/atom/resources/app/node_modules/jquery/dist/jquery.js:4430:9)
  at space-pen-ul.elemData.handle (/usr/share/atom/resources/app/node_modules/jquery/dist/jquery.js:4116:28)

Commands

Config

{
  "core": {
    "disabledPackages": [
      "git-plus"
    ]
  }
}

Installed Packages

# User
asciidoc-preview, v1.0.1
autoclose-html, v0.23.0
autocomplete-plus, v2.2.0
language-asciidoc, v1.4.3
language-puppet, v0.19.1
linter-puppet-lint, v0.6.2
markdown-preview-plus, v2.4.0
pandoc-convert, v1.0.4
pigments, v0.29.2
xml-tools, v0.2.1

# Dev
No dev packages
no-response[bot] commented 6 years ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.