steelbrain / linter-ui-default

Default UI for the Atom Linter package
MIT License
84 stars 47 forks source link

Uncaught TypeError: Cannot read property 'getBoundingClientRect' of undefined #355

Closed nibushibu closed 7 years ago

nibushibu commented 7 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.19.0-beta0 x64 Electron: 1.6.9 OS: Mac OS X 10.12.5 Thrown From: linter-ui-default package 1.6.1

Stack Trace

Uncaught TypeError: Cannot read property 'getBoundingClientRect' of undefined

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

TypeError: Cannot read property 'getBoundingClientRect' of undefined
    at TextEditorComponent.pixelPositionForMouseEvent (/Applications/Atom Beta.app/Contents/Resources/app/src/text-editor-component.js:1849:48)
    at getBufferPositionFromMouseEvent (/packages/linter-ui-default/lib/editor/helpers.js:8:49)
    at /packages/linter-ui-default/lib/editor/index.js:163:29)
    at later (/packages/linter/node_modules/sb-debounce/index.js:9:14)

Commands

 12x -2:25.5.0 core:confirm (input.hidden-input)
     -2:16.3.0 core:save (input.hidden-input)
     -2:10.9.0 editor:move-to-first-character-of-line (input.hidden-input)
     -2:10.8.0 core:delete (input.hidden-input)
     -0:45.7.0 window:toggle-dev-tools (input.hidden-input)
     -0:41.7.0 command-palette:toggle (input.hidden-input)
     -0:38.6.0 core:confirm (input.hidden-input)
     -0:38.6.0 editor:fold-at-indent-level-1 (input.hidden-input)
 12x -0:22.8.0 core:backspace (input.hidden-input)
     -0:20.9.0 core:save (input.hidden-input)
     -0:16.7.0 core:backspace (input.hidden-input)
  2x -0:15.9.0 core:save (input.hidden-input)
  7x -0:10.7.0 core:move-down (input.hidden-input)
 10x -0:09.9.0 core:move-up (input.hidden-input)
     -0:07.5.0 core:save (input.hidden-input)
     -0:07.1.0 core:close (input.hidden-input)

Non-Core Packages

ascii-codes 0.3.3 
atom-alignment 0.13.0 
atom-beautify 0.29.26 
atom-dark-ui-slim 0.47.1 
atom-fix-path 0.1.0 
atom-html-preview 0.1.22 
atom-light-ui-slim 0.25.1 
atomic-chrome 0.3.0 
auto-encoding 0.7.0 
autocomplete-paths 1.0.5 
autocomplete-wordpress-hooks 0.2.2 
autoprefixer 3.7.0 
bezier-curve-editor 0.7.2 
busy-signal 1.4.3 
calc 0.4.0 
clipboard-plus 0.5.1 
color-picker 2.2.5 
cursor-history 0.11.1 
docblockr 0.10.3 
double-tag 0.8.0 
duotone-dark-syntax 2.1.0 
editorconfig 2.2.2 
emmet 2.4.3 
file-icons 2.1.7 
git-control 0.9.0 
git-log 0.4.1 
git-plus 7.9.3 
git-time-machine 1.5.9 
grammar-token-limit 0.1.1 
highlight-column 0.5.2 
highlight-line 0.12.0 
html-entities 0.4.0 
intentions 1.1.2 
japan-util 0.2.0 
japanese-zen-han-convert 0.5.0 
json-converter 0.2.4 
language-actionscript 0.2.0 
language-ejs 0.4.0 
language-postcss 1.3.1 
language-pug 0.0.21 
last-tab 0.1.6 
linter 2.1.4 
linter-coffeelint 1.2.1 
linter-csslint 1.3.4 
linter-eslint 8.2.1 
linter-htmlhint 1.3.3 
linter-php 1.3.2 
linter-scss-lint 3.1.0 
linter-ui-default 1.6.1 
local-history 4.3.0 
merge-conflicts 1.4.5 
minimap 4.28.2 
minimap-autohider 1.5.1 
minimap-bookmarks 0.4.2 
minimap-cursorline 0.2.0 
minimap-find-and-replace 4.5.2 
minimap-git-diff 4.3.1 
minimap-pigments 0.2.2 
minimap-selection 4.4.0 
monokai 0.24.0 
pigments 0.39.1 
project-manager 3.3.5 
regex-railroad-diagram 0.17.0 
riot-tag 1.1.1 
set-syntax 0.3.2 
show-ideographic-space 1.0.2 
sort-lines 0.14.0 
space-tab 0.4.2 
split-diff 1.4.1 
Sublime-Style-Column-Selection 1.7.4 
svg-preview 0.11.0 
symbols-tree-view 0.14.0 
sync-settings 0.8.2 
tag 0.5.0 
todo 0.6.0 
todo-show 1.11.0 
toggle-quotes 1.0.1 
steelbrain commented 7 years ago

You're on an Atom beta, so blame it on the beta and not linter-ui-default :)

axelson commented 7 years ago

I'm getting this in Atom 1.19.0 on the latest linter-ui-default. Is that expected?

Arcanemagus commented 7 years ago

Nope, but I don't know if it was ever reported to Atom so I'm reopening this.

fdefalco commented 7 years ago

I noticed this error as well, however I've been able to isolate that it only occurs in my environment when I have atom-beautify enabled.

ajp-io commented 7 years ago

Similar to @fdefalco, when I save a shell script, atom-beautify runs and starts freaking out. And that's when I get this error.

axelson commented 7 years ago

Personally I don't have atom-beautify installed. I seem to get the error when managing tabs, especially when closing them. Doesn't happen all the time though.

akomarovsky commented 7 years ago

I've disabled atom-beautify and the error disappeared

jcurtis commented 7 years ago

Here's a stack trace from 1.19.0. I don't have atom-beautify installed.

  1. Close a tab (doesn't happen every time)

Atom: 1.19.0 x64 Electron: 1.6.9 OS: Mac OS X 10.12.6 Thrown From: linter-ui-default package 1.6.4

Stack Trace

Uncaught TypeError: Cannot read property 'getBoundingClientRect' of undefined

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

TypeError: Cannot read property 'getBoundingClientRect' of undefined
    at TextEditorComponent.pixelPositionForMouseEvent (/Applications/Atom.app/Contents/Resources/app/src/text-editor-component.js:1885:48)
    at getBufferPositionFromMouseEvent (/packages/linter-ui-default/lib/editor/helpers.js:8:49)
    at /packages/linter-ui-default/lib/editor/index.js:168:29)
    at later (/packages/linter/node_modules/sb-debounce/index.js:9:14)

Commands

     -2:07.1.0 core:copy (input.hidden-input)
     -2:05.0 pane:show-previous-item (input.hidden-input)
     -2:03.5.0 core:paste (input.hidden-input)
     -2:01.4.0 core:save (input.hidden-input)
  2x -2:01.0 pane:show-next-item (input.hidden-input)
  2x -1:38.7.0 vim-mode-plus:delete-right (input.hidden-input)
     -1:32.6.0 core:save (input.hidden-input)
  3x -1:29.4.0 vim-mode-plus:delete-right (input.hidden-input)
     -1:26.6.0 core:save (input.hidden-input)
     -1:20.1.0 core:close (input.hidden-input)
     -1:10.8.0 command-palette:toggle (input.hidden-input)
     -1:07.3.0 editor:consolidate-selections (input.hidden-input)
     -1:07.3.0 core:cancel (input.hidden-input)
  2x -0:19.6.0 core:close (input.hidden-input)
  2x -0:18.1.0 pane:reopen-closed-item (input.hidden-input)
  3x -0:17.3.0 core:close (input.hidden-input)

Non-Core Packages

apex-syntax-red 0.1.0 
busy-signal 1.4.3 
cursor-history 0.12.0 
file-icons 2.1.10 
git-projects 1.17.0 
hey-pane 1.0.0 
highlight-selected 0.13.1 
intentions 1.1.5 
language-babel 2.69.0 
language-docker 1.1.8 
language-groovy 0.7.0 
linter 2.2.0 
linter-clojure 1.1.3 
linter-csslint 1.3.4 
linter-docker 0.2.0 
linter-eslint 8.2.1 
linter-flow 5.6.0 
linter-javac 1.9.4 
linter-js-standard 3.9.3 
linter-js-yaml 1.2.7 
linter-jsonlint 1.3.0 
linter-less 2.6.0 
linter-ui-default 1.6.4 
open-this 0.4.0 
pigments 0.40.2 
pretty-json 1.6.4 
sort-lines 0.14.0 
vim-mode-plus 0.96.2 
vim-mode-plus-keymaps-for-surround 0.2.1 
sbrl commented 7 years ago

I've just updated atom-beautify to the next version and got this exception.

robjtede commented 7 years ago

I'm getting this same error notification when closing tabs wether atom-beautify is enabled or not.

steelbrain commented 7 years ago

Moved to https://github.com/atom/atom/issues/15341

steelbrain commented 7 years ago

I've also published a possible fix from our side in v1.6.6

steelbrain commented 7 years ago

Sorry for spamming you guys with updates but just got a comment on the Atom issue that this is still happening, so investigated and found another place we could safeguard. v1.6.7 is out

robjtede commented 7 years ago

Quick tests are looking better 👍 Give it a day thought. We shall see.

robjtede commented 7 years ago

Still no errors from me 👍