mupchrch / split-diff

Side-by-side file compare for the Atom text editor.
https://atom.io/packages/split-diff
MIT License
200 stars 26 forks source link

Uncaught TypeError: Cannot read property 'tree' of null #155

Closed diszell2008 closed 5 years ago

diszell2008 commented 5 years ago

[Enter steps to reproduce:]

  1. Open the file have git
  2. Select split diff & see error

Atom: 1.33.1 x64 Electron: 2.0.16 OS: Mac OS X 10.14.2 Thrown From: split-diff package 1.5.3

Stack Trace

Uncaught TypeError: Cannot read property 'tree' of null

At /Applications/Atom.app/Contents/Resources/app/static/<embedded>:11

TypeError: Cannot read property 'tree' of null
    at TreeSitterLanguageMode._forEachTreeWithRange (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:2859231)
    at TreeSitterLanguageMode.getSyntaxNodeAndGrammarContainingRange (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:2860644)
    at TreeSitterLanguageMode.getSyntaxNodeContainingRange (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:2860385)
    at BracketMatcherView.findContainingTagsWithSyntaxTree (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:676990)
    at BracketMatcherView.findMatchingTagNameRangesWithSyntaxTree (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:676321)
    at BracketMatcherView.updateMatch (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:673649)
    at buffer.onDidChangeLanguageMode (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:8101)
    at emitter.on (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:498287)
    at Function.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:1190759)
    at Emitter.emit (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:1192200)
    at TextBuffer.setLanguageMode (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:498113)
    at Object._getEditorsForQuickDiff (/packages/split-diff/lib/split-diff.coffee:397:27)
    at Object.diffPanes (/packages/split-diff/lib/split-diff.coffee:208:27)
    at Object.toggle (/packages/split-diff/lib/split-diff.coffee:92:8)
    at /packages/split-diff/lib/split-diff.coffee:80:32)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:350034)
    at CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:348509)
    at AtomEnvironment.dispatchContextMenuCommand (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:1:667259)
    at EventEmitter.t (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:1:674726)
    at emitThree (events.js:136:13)
    at EventEmitter.emit (events.js:217:7)

Commands

     -0:48.6.0 core:select-all (input.hidden-input)
     -0:48.4.0 core:copy (input.hidden-input)
     -0:45.7.0 split-diff:toggle (div.line)
     -0:45 core:select-all (input.hidden-input)
     -0:44.8.0 core:paste (input.hidden-input)
     -0:23.8.0 core:copy (input.hidden-input)
     -0:22 core:paste (input.hidden-input)
     -0:21.6.0 core:save (input.hidden-input)
     -0:18.3.0 core:select-all (input.hidden-input)
     -0:17.5.0 core:copy (input.hidden-input)
     -0:16.1.0 core:select-all (input.hidden-input)
     -0:15.9.0 core:paste (input.hidden-input)
     -0:15.7.0 core:save (input.hidden-input)
     -0:10.8.0 core:select-all (input.hidden-input)
     -0:10.5.0 core:copy (input.hidden-input)
     -0:08.4.0 split-diff:toggle (div.line)

Non-Core Packages

city-lights-ui 1.5.3 
git-diff-details 1.4.0 
min-ui 0.0.4 
minimap 4.29.9 
rad-syntax 0.4.0 
split-diff 1.5.3 
mupchrch commented 5 years ago

@diszell2008 this might be fixed in the latest release thanks to #157. Let me know if it's fixed and we can close this issue, thanks!

StephaneJuban commented 5 years ago

I was on 1.5.3 Upgrading to 1.6.0 fixed the issue for me