Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Uncaught TypeError: Cannot read property 'selectLine' of undefined #5311

Closed

Description

@mr4torr

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.176.0
System: Mac OS X 10.10.2
Thrown From: Atom Core

Stack Trace

Uncaught TypeError: Cannot read property 'selectLine' of undefined

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

TypeError: Cannot read property 'selectLine' of undefined
  at [object Object].module.exports.React.createClass.onMouseDown (/Applications/Atom.app/Contents/Resources/app/src/text-editor-component.js:767:36)
  at HTMLDivElement.boundMethod (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactCompositeComponent.js:1295:21)

Commands

     -1:03.2 editor:move-to-end-of-screen-line (atom-text-editor.editor.php.is-focused)
     -1:02.8 emmet:insert-formatted-line-break-only (atom-text-editor.editor.php.is-focused)
     -1:02.8 editor:newline (atom-text-editor.editor.php.is-focused)
     -1:02.3 emmet:insert-formatted-line-break-only (atom-text-editor.editor.php.is-focused)
     -1:02.3 editor:newline (atom-text-editor.editor.php.is-focused)
  3x -0:33.6 core:move-left (atom-text-editor.editor.php.is-focused)
     -0:32.7 core:backspace (atom-text-editor.editor.php.is-focused)
  3x -0:32.1 core:move-right (atom-text-editor.editor.php.is-focused)
     -0:24.8 core:move-left (atom-text-editor.editor.php.is-focused)
     -0:21.5 core:move-right (atom-text-editor.editor.php.is-focused)
     -0:20.6 emmet:insert-formatted-line-break-only (atom-text-editor.editor.php.is-focused)
     -0:20.6 editor:newline (atom-text-editor.editor.php.is-focused)
     -0:16.5 emmet:expand-abbreviation-with-tab (atom-text-editor.editor.php.is-focused)
     -0:16.5 snippets:next-tab-stop (atom-text-editor.editor.php.is-focused)
     -0:09.7 emmet:expand-abbreviation-with-tab (atom-text-editor.editor.php.is-focused)
     -0:09.7 snippets:next-tab-stop (atom-text-editor.editor.php.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "html-img"
    ],
    "themes": [
      "seti-ui",
      "no-caffeine-syntax"
    ],
    "destroyEmptyPanes": false
  },
  "editor": {
    "fontSize": 12,
    "lineHeight": 1.8,
    "softWrapAtPreferredLineLength": true,
    "invisibles": {}
  }
}

Installed Packages

# User
color-picker, v1.2.5
dash, v1.0.0
editorconfig, v0.2.0
emmet-atom, v2.2.0
language-blade, v0.7.0
laravel-facades, v1.0.0
linter-coffeelint, v0.1.7
linter-jshint, v0.1.0
linter-php, v0.0.11
linter-rubocop, v0.2.1
local-history, v1.0.4
no-caffeine-syntax, v0.6.0
react, v0.7.0
ruby-define-method, v0.1.0
ruby-slim, v0.2.0
seti-ui, v0.3.6
terminal-status, v1.3.5

# Dev
No dev packages

Activity

  1. fank commented on Jan 30, 2015

    @fank
    Contributor

    Can you please add "steps to reproduce"?

  2. mr4torr commented on Feb 2, 2015

    @mr4torr
    Author

    If happen again post here because I do not remember how it happened.

  3. izuzak commented on Sep 9, 2015

    @izuzak
    Contributor

    @nathansobo Gonna pull you into this old issue as well. As far as I can tell, this exception happened here:

    @editor.getLastSelection().selectLine(null, autoscroll: false)

    which means that @editor.getLastSelection() returned undefined. I think I remember seeing another PR from you where you guarded against the situation where packages would somehow destroy all selections. Could that have happened here as well and would it make sense to guard against that here as well? 💭

  4. nathansobo commented on Sep 9, 2015

    @nathansobo
    Contributor

    This shouldn't be happening anymore, because getLastSelection auto-instantiates a new selection in the event one is missing. Have we had reports on recent versions?

  5. izuzak commented on Sep 9, 2015

    @izuzak
    Contributor

    Have we had reports on recent versions?

    No recent reports in the issue tracker. And I also just checked bugsnag and noticed one exception in the last 2 weeks, but that was thrown from someone still on version 0.184.0. 😄

    I'm going to close this -- thanks for taking a look, @nathansobo 🍊

  6. lock commented on Jan 20, 2019

    @lock

    This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

  7. locked as resolved and limited conversation to collaborators on Jan 20, 2019
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