Skip to content

Uncaught TypeError: Cannot read property 'split' of null #36

@kadecole

Description

@kadecole

[Enter steps to reproduce below:]

  1. Open one file in Atom editor.
  2. Have only one Pane open with one file open.
  3. Choose Packages -> Split Diff -> Toggle menu option.
  4. Crash occurs.

Atom Version: 1.7.2
System: Mac OS X 10.11.4
Thrown From: split-diff package, v0.7.4

Stack Trace

Uncaught TypeError: Cannot read property 'split' of null

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

TypeError: Cannot read property 'split' of null
    at Function.module.exports.Range.fromText (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/range.js:47:19)
    at TextBuffer.module.exports.TextBuffer.setTextInRange (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:588:24)
    at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:576:26
    at TextBuffer.module.exports.TextBuffer.transact (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:828:18)
    at TextBuffer.module.exports.TextBuffer.setTextInRange (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:574:21)
    at TextBuffer.module.exports.TextBuffer.setText (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:514:19)
    at TextEditor.module.exports.TextEditor.setText (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:810:26)
    at Object.module.exports.SplitDiff.getVisibleEditors (/Users/kcole/.atom/packages/split-diff/lib/split-diff.coffee:77:21)
    at Object.module.exports.SplitDiff.diffPanes (/Users/kcole/.atom/packages/split-diff/lib/split-diff.coffee:108:16)
    at Object.module.exports.SplitDiff.toggle (/Users/kcole/.atom/packages/split-diff/lib/split-diff.coffee:400:8)
    at atom-workspace.subscriptions.add.atom.commands.add.split-diff:toggle (/Users/kcole/.atom/packages/split-diff/lib/split-diff.coffee:34:32)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260: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:160:19)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (/Applications/Atom.app/Contents/Resources/app.asar/src/atom-environment.js:1100:28)
    at EventEmitter.outerCallback (/Applications/Atom.app/Contents/Resources/app.asar/src/application-delegate.js:314:25)
    at emitTwo (events.js:87:13)
    at EventEmitter.emit (events.js:172:7)

Commands

     -0:00.9.0 split-diff:toggle (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "atom-dark-syntax"
    ]
  }
}

Installed Packages

# User
atom-jinja2, v0.5.0
split-diff, v0.7.4

# Dev
No dev packages

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions