atom / git-diff

Diff markers in Atom's gutter
MIT License
102 stars 36 forks source link

Uncaught TypeError: Cannot read property 'onDidDestroy' of undefined #141

Closed alekszaf closed 6 years ago

alekszaf commented 7 years ago

Shows up on the opening of an html file. The error did not appear when I opened the file in the older version of atom.

Atom: 1.19.4 x64 Electron: 1.6.9 OS: Mac OS X 10.10.5 Thrown From: git-diff package 1.3.6

Stack Trace

Uncaught TypeError: Cannot read property 'onDidDestroy' of undefined

At /Applications/Atom.app/Contents/Resources/app/src/decoration.js:58

TypeError: Cannot read property 'onDidDestroy' of undefined
    at new Decoration (/Applications/Atom.app/Contents/Resources/app/src/decoration.js:58:55)
    at DecorationManager.decorateMarker (/Applications/Atom.app/Contents/Resources/app/src/decoration-manager.js:194:30)
    at TextEditor.module.exports.TextEditor.decorateMarker (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1811:43)
    at GitDiffView.module.exports.GitDiffView.markRange (/Applications/Atom.app/Contents/Resources/app/node_modules/git-diff/lib/git-diff-view.js:199:25)
    at GitDiffView.module.exports.GitDiffView.addDecorations (/Applications/Atom.app/Contents/Resources/app/node_modules/git-diff/lib/git-diff-view.js:179:22)
    at GitDiffView.module.exports.GitDiffView.updateDiffs (/Applications/Atom.app/Contents/Resources/app/node_modules/git-diff/lib/git-diff-view.js:163:29)
    at Immediate.<anonymous> (/Applications/Atom.app/Contents/Resources/app/node_modules/git-diff/lib/git-diff-view.js:3:65)
    at runCallback (timers.js:651:20)
    at tryOnImmediate (timers.js:624:5)
    at processImmediate [as _immediateCallback] (timers.js:596:5)

Commands

     -0:12.3.0 application:open (input.hidden-input)

Non-Core Packages

rsese commented 7 years ago

Thanks for the report! Can you confirm a few things for us?

alekszaf commented 7 years ago

It is reproducible, but only on different HTML files, other formats seem to be fine. The error does not appear in the safe mode. Before the update I was using version 1.18.0.

rsese commented 7 years ago

The error does not appear in the safe mode.

Hmmm, that's odd - the error reporter seems to show that you have no community packages installed? Can you confirm by running:

apm list --installed
50Wliu commented 6 years ago

Thank you for your issue!

We haven't gotten a response to our questions in our comment https://github.com/atom/git-diff/issues/141#issuecomment-326416387. With only the information that is currently in the issue, we don't have enough information to take action. I'm going to close this but don't hesitate to reach out if you have or find the answers we need, we'll be happy to reopen the issue.