gandm / language-babel

ES2017, flow, React JSX and GraphQL grammar and transpilation for ATOM
https://atom.io/packages/language-babel
MIT License
476 stars 81 forks source link

Uncaught TypeError: Cannot set property 'isDirty' of undefined #348

Closed RTSchriner closed 7 years ago

RTSchriner commented 7 years ago

[Enter steps to reproduce:]

I opened a .js file, clicked a line and hit the Enter key.

I can't reproduce it in other files.

Restarted Atom and I haven't been able to reproduce the issue.

Atom: 1.16.0-beta0 x64 Electron: 1.3.13 OS: Mac OS X 10.12.4 Thrown From: language-babel package 2.57.2

Stack Trace

Uncaught TypeError: Cannot set property 'isDirty' of undefined

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

TypeError: Cannot set property 'isDirty' of undefined
    at disposables.push.editor.getBuffer.onDidChange.e (atom-ternjs-manager.js:262:9)
    at Function.module.exports.Emitter.simpleDispatch (/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/app.asar/node_modules/event-kit/lib/emitter.js:129:28)
    at TextBuffer.module.exports.TextBuffer.emitDidChangeEvent (/app.asar/node_modules/text-buffer/lib/text-buffer.js:680:20)
    at TextBuffer.module.exports.TextBuffer.applyChange (/app.asar/node_modules/text-buffer/lib/text-buffer.js:664:12)
    at TextBuffer.module.exports.TextBuffer.revertToCheckpoint (/app.asar/node_modules/text-buffer/lib/text-buffer.js:877:16)
    at TextBuffer.module.exports.TextBuffer.transact (/app.asar/node_modules/text-buffer/lib/text-buffer.js:831:14)
    at TextEditor.module.exports.TextEditor.transact (/app.asar/src/text-editor.js:1594:26)
    at /app.asar/src/text-editor.js:1155:24
    at TextEditor.module.exports.TextEditor.mergeSelections (/app.asar/src/text-editor.js:2572:18)
    at TextEditor.module.exports.TextEditor.mergeIntersectingSelections (/app.asar/src/text-editor.js:2534:35)
    at TextEditor.module.exports.TextEditor.mutateSelectedText (/app.asar/src/text-editor.js:1153:19)
    at TextEditor.module.exports.TextEditor.insertText (/app.asar/src/text-editor.js:1119:19)
    at /packages/language-babel/lib/did-insert-text.coffee:77:18)
    at /app.asar/node_modules/underscore-plus/lib/underscore-plus.js:77:27)
    at TextEditor.module.exports.TextEditor.insertNewline (/app.asar/src/text-editor.js:1134:19)
    at /app.asar/node_modules/underscore-plus/lib/underscore-plus.js:77:27)
    at /app.asar/src/register-default-commands.js:606:21)
    at /app.asar/src/register-default-commands.js:666:34
    at TextBuffer.module.exports.TextBuffer.transact (/app.asar/node_modules/text-buffer/lib/text-buffer.js:828:18)
    at TextEditor.module.exports.TextEditor.transact (/app.asar/src/text-editor.js:1594:26)
    at /app.asar/src/register-default-commands.js:665:22)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)
    at /app.asar/src/command-registry.js:3:59
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:599:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:390:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/app.asar/src/window-event-handler.js:106:36)
    at /app.asar/src/window-event-handler.js:3:59)

Commands

     -3:32.5.0 project-find:show (ul.list-inline.tab-bar.inset-panel)
     -3:31.9.0 core:confirm (input.hidden-input)
     -3:31.3.0 core:move-up (input.hidden-input)
     -3:30.6.0 core:move-down (input.hidden-input)
     -3:30.1.0 core:backspace (input.hidden-input)
     -0:16.5.0 fuzzy-finder:toggle-file-finder (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
     -0:13.1.0 core:move-down (input.hidden-input)
     -0:12.8.0 core:confirm (input.hidden-input)
     -0:07.7.0 core:move-down (input.hidden-input)
     -0:07.1.0 core:move-up (input.hidden-input)
     -0:06.8.0 editor:newline (input.hidden-input)
     -0:06.6.0 core:paste (input.hidden-input)

Non-Core Packages

atom-beautify 0.29.18 
atom-meteor-snippets 0.1.0 
atom-ternjs 0.18.2 
atom-wordpress 0.3.0 
autocomplete 0.47.0 
autoprefixer 3.6.1 
editorconfig 2.2.2 
emmet 2.4.3 
fold-functions 0.5.0 
language-babel 2.57.2 
language-pug 0.0.21 
language-spacebars 0.2.2 
language-vue 0.21.2 
line-diff-details 1.8.0 
minimap 4.27.1 
minimap-git-diff 4.3.1 
minimap-pigments 0.2.2 
multi-cursor 2.1.5 
pdf-view 0.57.0 
pigments 0.39.1 
react 0.16.2 
Remote-FTP 0.10.7 
seti-ui 1.7.0 
sort-lines 0.14.0 
title-case 0.4.0 
todo-show 1.11.0 
tree-view-copy-relative-path 1.1.0 
vue2-autocomplete 0.1.0-alpha.4 
wordpress-api 1.2.2 
gandm commented 7 years ago

I think it's an issue with ternjs which is the last non-atom package that is in the stack trace. See https://github.com/tststs/atom-ternjs/issues/295 that look similar i.e. accessing isDirty

gandm commented 7 years ago

Another report of this issue to do with ternjs https://github.com/atom/atom/issues/14085.

I'll close this issue.