Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Uncaught TypeError: Cannot read property 'getBufferRange' of undefined #343

Closed

Description

@rachel-carvalho

On a .less file, over a samba share:

  1. Used a snippet
  2. Cut last line of generated text
  3. Select whole file until line before end
  4. Press TAB

Also generated this error: atom/bracket-matcher#102

Atom Version: 0.176.0
System: Mac OS X 10.10.1
Thrown From: find-and-replace package, v0.156.0

Stack Trace

Uncaught TypeError: Cannot read property 'getBufferRange' of undefined

At /Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1728

TypeError: Cannot read property 'getBufferRange' of undefined
  at TextEditor.module.exports.TextEditor.getSelectedBufferRange (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1728:37)
  at FindModel.module.exports.FindModel.setCurrentMarkerFromSelection (/Applications/Atom.app/Contents/Resources/app/node_modules/find-and-replace/lib/find-model.js:173:46)
  at FindModel.setCurrentMarkerFromSelection (/Applications/Atom.app/Contents/Resources/app/node_modules/find-and-replace/lib/find-model.js:3:61)
  at FindModel.module.exports.FindModel.destroyAllMarkers (/Applications/Atom.app/Contents/Resources/app/node_modules/find-and-replace/lib/find-model.js:245:19)
  at FindModel.module.exports.FindModel.updateMarkers (/Applications/Atom.app/Contents/Resources/app/node_modules/find-and-replace/lib/find-model.js:164:14)
  at /Applications/Atom.app/Contents/Resources/app/node_modules/find-and-replace/lib/find-model.js:56:28
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/service-hub/node_modules/event-kit/lib/emitter.js:82:11)
  at /Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:1151:25

Commands

  2x -0:21.7 editor:newline (atom-text-editor.editor.is-focused)
     -0:21.1 snippets:next-tab-stop (atom-text-editor.editor.is-focused)
     -0:21.1 snippets:expand (atom-text-editor.editor.is-focused)
     -0:15.8 editor:move-to-beginning-of-word (input)
     -0:15.1 core:move-left (atom-text-editor.editor.is-focused)
     -0:14.0 editor:consolidate-selections (atom-text-editor.editor.is-focused)
     -0:13.4 core:move-up (atom-text-editor.editor.is-focused)
     -0:12.8 core:cut (atom-text-editor.editor.is-focused)
     -0:11.9 core:select-down (atom-text-editor.editor.is-focused)
     -0:11.6 core:cut (atom-text-editor.editor.is-focused)
     -0:11.2 core:move-up (atom-text-editor.editor.is-focused)
     -0:10.4 core:move-down (atom-text-editor.editor.is-focused)
     -0:10.0 core:select-to-bottom (atom-text-editor.editor.is-focused)
     -0:09.4 core:select-up (atom-text-editor.editor.is-focused)
     -0:08.8 snippets:next-tab-stop (atom-text-editor.editor.is-focused)
     -0:01.4 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "remember-session",
      "linter-jshint",
      "merge-conflicts"
    ],
    "themes": [
      "atom-dark-ui",
      "monokai"
    ]
  }
}

Installed Packages

# User
atom-color-highlight, v3.0.5
autoclose-html, v0.14.0
autocomplete-plus, v1.1.0
file-types, v0.3.0
highlight-line, v0.9.3
language-jade, v0.3.0
language-smarty-php, v0.4.0
linter, v0.10.1
linter-jscs, v1.4.9
monokai, v0.11.0
save-session, v0.11.3

# Dev
No dev packages

/cc @atom/core

Activity

  1. izuzak commented on Feb 12, 2015

    @izuzak
    Contributor

    @rachel-carvalho I don't have a samba share, so can't really even try to reproduce. However, I did try to reproduce locally, but failed.

    Could you help us debug this issue a bit more?

    1. Are you able to reproduce the issue reliably in the latest version of Atom in safe mode
    2. If so, can you post the exact steps which reproduce the issue (which snippet you trigger, etc)?
    3. Are you able to reproduce the issue in safe mode but locally (not on a samba share)?
  2. rachel-carvalho commented on Feb 12, 2015

    @rachel-carvalho
    Author

    This has happened to me quite often, always on a less file, always using my snippet, always I use it wrap some rules in another selector:

    '.less':
      'selector':
        'prefix': 'sel'
        'body': '''
          ${1:selector} {
            ${2:// something}
          } // ${1:selector}
        '''

    But I'm still not exactly sure how to trigger it. And I don't get why find and replace is doing anything, because I'm never using find.

    I'll pay closer attention and will report back.

  3. benogle commented on Aug 11, 2015

    @benogle
    Contributor

    Is this still an issue?

  4. rachel-carvalho commented on Aug 24, 2015

    @rachel-carvalho
    Author

    I'm not seeing this error anymore for a while, I'll close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions