facebookarchive / nuclide

An open IDE for web and native mobile development, built on top of Atom
https://nuclide.io
Other
7.79k stars 683 forks source link

Uncaught TypeError: Cannot read property 'length' of undefined #120

Closed mngyuan closed 9 years ago

mngyuan commented 9 years ago

Steps to reproduce:

  1. Open 3 columns?
  2. Scroll to bottom on middle column
  3. Place cursor on closing brace?
  4. Write some code that will produce lint / flow errors
  5. Mouse into BOTTOM HALF (works fine on top half) of middle column

Atom Version: 1.0.12431697 System: Mac OS X 10.10.3 Thrown From: hyperclick package, v0.0.0

Stack Trace

Uncaught TypeError: Cannot read property 'length' of undefined

At /Applications/Nuclide.app/Contents/Resources/app/node_modules/hyperclick/lib/get-word-text-and-range.js:0

TypeError: Cannot read property 'length' of undefined
  at NuclideTextBuffer.module.exports.TextBuffer.lineLengthForRow (/Applications/Nuclide.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:413:29)
  at NuclideTextBuffer.module.exports.TextBuffer.rangeForRow (/Applications/Nuclide.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:915:65)
  at getWordTextAndRange (/Applications/Nuclide.app/Contents/Resources/app/node_modules/hyperclick/lib/get-word-text-and-range.js:26:41)
  at HyperclickForTextEditor._onMouseMove (/Applications/Nuclide.app/Contents/Resources/app/node_modules/hyperclick/lib/HyperclickForTextEditor.js:96:34)

Commands

 10x -2:02.8.0 vim-mode:move-up (atom-text-editor.editor.vim-mode.is-focused.command-mode)
  9x -2:01.5.0 vim-mode:move-down (atom-text-editor.editor.vim-mode.is-focused.command-mode)
  2x -2:00.2.0 vim-mode:move-to-next-word (atom-text-editor.editor.vim-mode.is-focused.command-mode)
     -1:52.8.0 core:close (atom-text-editor.editor.vim-mode.is-focused.command-mode.hyperclick-loading)
     -1:50.1.0 pane:split-right (atom-text-editor.editor.vim-mode.command-mode.is-focused)
  2x -1:47.6.0 nuclide-quick-open:toggle-omni-search (atom-text-editor.editor.vim-mode.command-mode.is-focused.hyperclick-loading)
  3x -1:41.2.0 core:move-down (atom-text-editor.editor.mini.is-focused)
  2x -1:34.5.0 nuclide-file-tree:toggle (atom-text-editor.editor.vim-mode.command-mode.is-focused.hyperclick-loading)
     -1:21.2.0 vim-mode:move-down (atom-text-editor.editor.vim-mode.command-mode.is-focused)
     -1:18.4.0 core:close (atom-text-editor.editor.vim-mode.command-mode.is-focused.hyperclick-loading)
     -1:17.8.0 pane:reopen-closed-item (atom-text-editor.editor.vim-mode.command-mode.is-focused.hyperclick-loading)
  2x -1:11.4.0 vim-mode:move-to-end-of-word (atom-text-editor.editor.vim-mode.command-mode.is-focused)
     -0:59.7.0 find-and-replace:show (atom-text-editor.editor.vim-mode.command-mode.is-focused.hyperclick-loading)
  4x -0:58.6.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:52.9.0 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
     -0:52.9.0 core:cancel (atom-text-editor.editor.mini.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "deprecation-cop",
      "incompatible-packages",
      "metrics",
      "styleguide",
      "timecop",
      "tree-view"
    ]
  }
}

Installed Packages

# User
atom-alignment, v0.12.1
color-picker, v2.0.7
minimap, v4.10.1
pigments, v0.8.2
project-manager, v1.15.10
vim-mode, v0.54.0

# Dev
No dev packages
jssln commented 9 years ago

Thanks for the detailed bug report @phorust! We'll be working to fix this.

zahanm commented 9 years ago

In my case, you don't need 3 columns and all that. Single column (unsure of the rest of the setup here), move mouse to the end of the page.

Doesn't trigger if you're scrolled up away from end. Don't need to click on anything. Just mouse-over end of page.

jssln commented 9 years ago

@phorust, @zahanm, this is fixed now: https://github.com/facebook/nuclide/commit/a6ec8357ae6077c837fd125f60fa42af6b6480e7

mngyuan commented 9 years ago

Awesome! Wanted to use nuclide for a bit to confirm on my end I'm not having the same problem anymore, and it looks great to me. Cheers :beers:

tychota commented 8 years ago

[Enter steps to reproduce below:]

  1. Open Nuclide Menu
  2. Click Start Ios Navigator Log

Atom Version: 1.8.0 System: Mac OS X 10.11.5 Thrown From: nuclide package, v0.148.0

Stack Trace

Uncaught TypeError: Cannot read property 'length' of undefined

At /Users/tychotatitscheff/.atom/packages/nuclide/pkg/nuclide-console/lib/ui/Console.js:92

TypeError: Cannot read property 'length' of undefined
  at Console.render (/Users/tychotatitscheff/.atom/packages/nuclide/pkg/nuclide-console/lib/ui/Console.js:92:152)
  at [object Object].E._renderValidatedComponentWithoutOwnerOrContext (/Users/tychotatitscheff/.atom/packages/nuclide/node_modules/react/dist/react-with-addons.min.js:13:21550)
  at [object Object].E._renderValidatedComponent (/Users/tychotatitscheff/.atom/packages/nuclide/node_modules/react/dist/react-with-addons.min.js:13:21638)
  at [object Object].E.performInitialMount (/Users/tychotatitscheff/.atom/packages/nuclide/node_modules/react/dist/react-with-addons.min.js:13:17578)
  at [object Object].E.mountComponent (/Users/tychotatitscheff/.atom/packages/nuclide/node_modules/react/dist/react-with-addons.min.js:13:16637)
  at Object.i.mountComponent (/Users/tychotatitscheff/.atom/packages/nuclide/node_modules/react/dist/react-with-addons.min.js:15:8972)
  at [object Object].E.performInitialMount (/Users/tychotatitscheff/.atom/packages/nuclide/node_modules/react/dist/react-with-addons.min.js:13:17710)
  at [object Object].E.mountComponent (/Users/tychotatitscheff/.atom/packages/nuclide/node_modules/react/dist/react-with-addons.min.js:13:16637)
  at Object.i.mountComponent (/Users/tychotatitscheff/.atom/packages/nuclide/node_modules/react/dist/react-with-addons.min.js:15:8972)
  at [object Object].E.performInitialMount (/Users/tychotatitscheff/.atom/packages/nuclide/node_modules/react/dist/react-with-addons.min.js:13:17710)
  at [object Object].E.mountComponent (/Users/tychotatitscheff/.atom/packages/nuclide/node_modules/react/dist/react-with-addons.min.js:13:16637)
  at Object.i.mountComponent (/Users/tychotatitscheff/.atom/packages/nuclide/node_modules/react/dist/react-with-addons.min.js:15:8972)
  at a (/Users/tychotatitscheff/.atom/packages/nuclide/node_modules/react/dist/react-with-addons.min.js:14:27712)
  at r.o.perform (/Users/tychotatitscheff/.atom/packages/nuclide/node_modules/react/dist/react-with-addons.min.js:16:10062)
  at s (/Users/tychotatitscheff/.atom/packages/nuclide/node_modules/react/dist/react-with-addons.min.js:14:27931)
  at r.o.perform (/Users/tychotatitscheff/.atom/packages/nuclide/node_modules/react/dist/react-with-addons.min.js:16:10062)
  at Object.d.batchedUpdates (/Users/tychotatitscheff/.atom/packages/nuclide/node_modules/react/dist/react-with-addons.min.js:14:17100)
  at Object.i [as batchedUpdates] (/Users/tychotatitscheff/.atom/packages/nuclide/node_modules/react/dist/react-with-addons.min.js:15:16775)
  at Object.F._renderNewRootComponent (/Users/tychotatitscheff/.atom/packages/nuclide/node_modules/react/dist/react-with-addons.min.js:14:29118)
  at Object.F._renderSubtreeIntoContainer (/Users/tychotatitscheff/.atom/packages/nuclide/node_modules/react/dist/react-with-addons.min.js:14:29735)
  at Object.F.render (/Users/tychotatitscheff/.atom/packages/nuclide/node_modules/react/dist/react-with-addons.min.js:14:29951)
  at createComponentItem (/Users/tychotatitscheff/.atom/packages/nuclide/pkg/nuclide-gadgets/lib/createComponentItem.js:33:71)
  at Commands.createPaneItem (/Users/tychotatitscheff/.atom/packages/nuclide/pkg/nuclide-gadgets/lib/Commands.js:161:80)
  at Commands.showGadget (/Users/tychotatitscheff/.atom/packages/nuclide/pkg/nuclide-gadgets/lib/Commands.js:346:28)
  at atom-workspace.<anonymous> (/Users/tychotatitscheff/.atom/packages/nuclide/pkg/nuclide-gadgets/lib/createAtomCommands.js:30:26)
  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 LogTailer._start (/Users/tychotatitscheff/.atom/packages/nuclide/pkg/nuclide-console/lib/LogTailer.js:70:21)
  at LogTailer.start (/Users/tychotatitscheff/.atom/packages/nuclide/pkg/nuclide-console/lib/LogTailer.js:49:12)
  at atom-workspace.nuclideIosSimulatorLogsStart (/Users/tychotatitscheff/.atom/packages/nuclide/pkg/nuclide-ios-simulator-logs/lib/Activation.js:87:33)
  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:327:25)
  at emitTwo (events.js:87:13)
  at EventEmitter.emit (events.js:172:7)

Commands

     -0:02.3.0 nuclide-ios-simulator-logs:start (atom-text-editor.editor.is-focused)
     -0:02.2.0 nuclide-console:show (atom-workspace.workspace.scrollbars-visible-always.seti-ui-no-icons.theme-solarized-light-syntax.theme-one-light-ui)

Config

{
  "core": {
    "customFileTypes": {
      "source.ini": [
        ".buckconfig",
        ".flowconfig"
      ],
      "source.json": [
        ".arcconfig",
        "BUCK.autodeps"
      ],
      "source.python": [
        "BUCK"
      ]
    },
    "disabledPackages": [
      "tree-view",
      "linter",
      "react",
      "atom-beautify"
    ],
    "themes": [
      "one-light-ui",
      "solarized-light-syntax"
    ]
  },
  "nuclide": {
    "installRecommendedPackages": true,
    "nuclide-blame-provider-hg": {},
    "nuclide-distraction-free-mode": {},
    "nuclide-file-tree": {
      "hideIgnoredNames": false
    },
    "nuclide-flow": {
      "enableStructuredTypeHints": true
    },
    "nuclide-home": {
      "showHome": false
    }
  }
}

Installed Packages

# User
Sublime-Style-Column-Selection, v1.5.1
atom-jade, v0.3.0
atom-jinja2, v0.5.0
autocomplete-python, v1.8.1
cucumber, v0.5.0
file-icons, v1.7.16
haskell-grammar, v0.4.0
highlight-selected, v0.11.2
language-babel, v2.31.0
language-gitignore, v0.2.0
language-gradle, v0.0.3
language-groovy, v0.6.0
language-ini, v1.16.0
language-ocaml, v1.1.2
language-thrift, v1.0.2
linter-eslint, v7.2.4
merge-conflicts, v1.4.4
minimap, v4.24.7
nuclide, v0.150.0
project-manager, v2.9.7
python-tools, v0.6.8
tool-bar, v1.0.0

# Dev
No dev packages
pavlelekic commented 8 years ago

Is there any way to temporarily disable these warnings? It's soo annoying to work when these popups are showing up all the time