pusher / atom-pair

An Atom package that allows for epic pair programming
MIT License
1.45k stars 28 forks source link

Uncaught TypeError: Cannot read property 'pasteText' of null #63

Closed zwacky closed 9 years ago

zwacky commented 9 years ago

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.0.4 System: Mac OS X 10.10.4 Thrown From: atom-pair package, v2.0.3

Stack Trace

Uncaught TypeError: Cannot read property 'pasteText' of null

At /Users/zwacky/.atom/packages/atom-pair/lib/modules/custom_paste.coffee:12

TypeError: Cannot read property 'pasteText' of null
  at /Users/zwacky/.atom/packages/atom-pair/lib/modules/custom_paste.coffee:12:18

Commands

  3x -9:41.3.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -9:40.3.0 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
     -9:40.3.0 core:cancel (atom-text-editor.editor.mini.is-focused)
     -9:39.9.0 find-and-replace:show (atom-text-editor#AtomPair.editor.is-focused)
  4x -9:38.2.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -9:37.2.0 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
     -9:37.2.0 core:cancel (atom-text-editor.editor.mini.is-focused)
     -9:19.1.0 core:close (atom-text-editor#AtomPair.editor.is-focused)
     -9:18.4.0 fuzzy-finder:toggle-file-finder (atom-text-editor#AtomPair.editor.is-focused)
     -9:17.3.0 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
     -9:17.3.0 core:cancel (atom-text-editor.editor.mini.is-focused)
     -9:16.5.0 application:new-file (atom-text-editor#AtomPair.editor.is-focused)
     -9:13.2.0 core:backspace (atom-text-editor#AtomPair.editor.is-focused)
     -0:04.4.0 application:new-file (atom-text-editor.editor.is-focused)
     -0:04.3.0 AtomPair:custom-paste (atom-text-editor#AtomPair.editor.is-focused)
     -0:02.5.0 core:close (atom-text-editor#AtomPair.editor.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "atom-jshint"
    ]
  }
}

Installed Packages

# User
atom-pair, v2.0.3
color-picker, v2.0.11
emmet, v2.3.12

# Dev
No dev packages
jpatel531 commented 9 years ago

Thanks for bringing this to my attention! Initially I had implemented a 'custom paste' as this would deal with when large insertions would cause a websocket error. But this will be gone by the end of the day in favour of using core copy-paste + having the buffer-listener deal with large-insertions more naturally

jpatel531 commented 9 years ago

But out of curiosity - this means that an editor object was null, which should never happen. Was this happening within a pairing session or outside of it? (In which case then the key-binding might override core ones - which is a problem)

zwacky commented 9 years ago

it was out of a session. i started one, then disconnected.

jpatel531 commented 9 years ago

Ah OK i see the problem - the subscription is still hanging around. I'll sort it!

zwacky commented 9 years ago

cool glad i could help