Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: range.intersectsWith is not a function #576

Closed
zzqDeco opened this issue Jun 5, 2020 · 14 comments · Fixed by #581 or #591
Closed

Uncaught TypeError: range.intersectsWith is not a function #576

zzqDeco opened this issue Jun 5, 2020 · 14 comments · Fixed by #581 or #591

Comments

@zzqDeco
Copy link

zzqDeco commented Jun 5, 2020

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.46.0 x64
Electron: 4.2.7
OS: Unknown Windows version
Thrown From: linter-ui-default package 1.8.1

Stack Trace

Uncaught TypeError: range.intersectsWith is not a function

At C:\Users\zzqDeco\.atom\packages\linter-ui-default\lib\helpers.js:102

TypeError: range.intersectsWith is not a function
    at /packages/linter-ui-default/lib/helpers.js:102:53
    at Set.forEach (<anonymous>)
    at filterMessagesByRangeOrPoint (/packages/linter-ui-default/lib/helpers.js:99:12)
    at Editor.updateTooltip (/packages/linter-ui-default/lib/editor/index.js:275:22)
    at /packages/linter-ui-default/lib/editor/index.js:235:14
    at later (/packages/linter-ui-default/node_modules/sb-debounce/index.js:9:14)

Commands

     -3:08.6.0 core:backspace (input.hidden-input)
  2x -3:08.5.0 core:move-right (input.hidden-input)
     -3:08.2.0 core:backspace (input.hidden-input)
     -1:58.3.0 intentions:highlight (input.hidden-input)
     -1:57.9.0 core:select-all (input.hidden-input)
     -1:57.1.0 core:copy (input.hidden-input)
  7x -1:51.6.0 core:move-left (input.hidden-input)
     -1:49.8.0 intentions:highlight (input.hidden-input)
     -1:49.5.0 core:save (input.hidden-input)
     -1:35.8.0 intentions:highlight (input.hidden-input)
     -1:35.5.0 core:select-all (input.hidden-input)
     -1:35.1.0 core:copy (input.hidden-input)
     -0:26.6.0 intentions:highlight (input.hidden-input)
     -0:26.3.0 core:save (input.hidden-input)
  3x -0:12.4.0 intentions:highlight (input.hidden-input)
     -0:11.8.0 core:save (input.hidden-input)

Non-Core Packages

busy-signal 2.0.1 
gcc-make-run 0.2.12 
highlight-selected 0.17.0 
intentions 1.1.5 
linter 2.3.1 
linter-gcc 0.9.0 
linter-ui-default 1.8.1 
minimap 4.29.9 
minimap-highlight-selected 4.6.1 
seti-syntax 1.2.0 
seti-ui 1.11.0 
simplified-chinese-menu 5.3.5 
wakatime 9.0.2 
@rejnok93
Copy link

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.46.0 x64
Electron: 4.2.7
OS: Mac OS X 10.11.6
Thrown From: linter-ui-default package 1.8.1

Stack Trace

Uncaught TypeError: range.intersectsWith is not a function

At /Users/rejnok/.atom/packages/linter-ui-default/lib/helpers.js:102

TypeError: range.intersectsWith is not a function
    at /packages/linter-ui-default/lib/helpers.js:102:53
    at Set.forEach (<anonymous>)
    at filterMessagesByRangeOrPoint (/packages/linter-ui-default/lib/helpers.js:99:12)
    at Editor.updateTooltip (/packages/linter-ui-default/lib/editor/index.js:275:22)
    at /packages/linter-ui-default/lib/editor/index.js:221:18)
    at later (/packages/linter-ui-default/node_modules/sb-debounce/index.js:9:14)

Commands

     -7:52.1.0 intentions:highlight (input.hidden-input)
     -7:51.9.0 autocomplete-clang:go-declaration (input.hidden-input)

Non-Core Packages

atom-over-and-back 0.4.0 
autocomplete-clang 0.13.1 
build 0.70.0 
busy-signal 2.0.1 
file-icons 2.1.41 
goto-definition 1.3.4 
hyperclick 0.1.5 
intentions 1.1.5 
language-ini 1.23.0 
linter 2.3.1 
linter-gcc2 0.8.8 
linter-ui-default 1.8.1 
platformio-ide 2.7.1 
platformio-ide-debugger 1.2.6 
platformio-ide-terminal 2.10.0 
tool-bar 1.3.0 

@rejnok93
Copy link

rejnok93 commented Jun 19, 2020

Even if I'm doing nothing (or only moving a mouse over some code, but not clicking), many red errors pop up, and even if I click "Goto declaration" hotkey, something similar pops up:

Stack Trace

Uncaught TypeError: range.intersectsWith is not a function

At /Users/rejnok/.atom/packages/linter-ui-default/lib/helpers.js:102

TypeError: range.intersectsWith is not a function
    at /packages/linter-ui-default/lib/helpers.js:102:53
    at Set.forEach (<anonymous>)
    at filterMessagesByRangeOrPoint (/packages/linter-ui-default/lib/helpers.js:99:12)
    at Editor.updateTooltip (/packages/linter-ui-default/lib/editor/index.js:275:22)
    at /packages/linter-ui-default/lib/editor/index.js:235:14
    at later (/packages/linter-ui-default/node_modules/sb-debounce/index.js:9:14)

Commands

     -9:59.9.0 intentions:highlight (input.hidden-input)
     -9:59.7.0 autocomplete-clang:go-declaration (input.hidden-input)
     -0:12.3.0 intentions:highlight (input.hidden-input)
     -0:11.9.0 autocomplete-clang:go-declaration (input.hidden-input)

@mirenradia
Copy link

Not really sure how to reproduce exactly but appears sporadically when a file with linter errors is open.

Atom: 1.48.0 x64
Electron: 5.0.13
OS: Ubuntu 20.04
Thrown From: linter-ui-default package 1.8.1

Stack Trace

Uncaught TypeError: range.intersectsWith is not a function

At /home/miren/.atom/packages/linter-ui-default/lib/helpers.js:102

TypeError: range.intersectsWith is not a function
    at /packages/linter-ui-default/lib/helpers.js:102:53
    at Set.forEach (<anonymous>)
    at filterMessagesByRangeOrPoint (/packages/linter-ui-default/lib/helpers.js:99:12)
    at Editor.updateTooltip (/packages/linter-ui-default/lib/editor/index.js:275:22)
    at /packages/linter-ui-default/lib/editor/index.js:221:18)
    at later (/packages/linter-ui-default/node_modules/sb-debounce/index.js:9:14)

Commands

     -6:34.5.0 core:cancel (input.hidden-input)
     -6:01.3.0 core:backspace (input.hidden-input)
  6x -6:00.6.0 core:delete (input.hidden-input)
  8x -5:55.7.0 core:move-up (input.hidden-input)
  2x -5:53.8.0 core:backspace (input.hidden-input)
     -5:52.2.0 core:move-up (input.hidden-input)
  7x -5:51.5.0 core:move-down (input.hidden-input)
 32x -5:35.9.0 core:move-left (input.hidden-input)
     -5:32.7.0 core:backspace (input.hidden-input)
     -5:31.7.0 core:move-down (input.hidden-input)
  4x -5:31.3.0 core:move-right (input.hidden-input)
     -5:30.3.0 core:move-left (input.hidden-input)
  3x -5:29.9.0 core:backspace (input.hidden-input)
     -5:19.2.0 intentions:highlight (input.hidden-input)
     -5:19 core:save (input.hidden-input)
     -2:54.6.0 intentions:highlight (input.hidden-input)

Non-Core Packages

atom-material-syntax 1.0.8 
atom-material-ui 2.1.3 
busy-signal 2.0.1 
city-lights-syntax 1.1.8 
city-lights-ui 1.5.3 
clang-format 2.0.8 
file-types 1.0.1 
goto-definition 1.3.4 
intentions 1.1.5 
keybinding-cheatsheet 0.1.1 
keymap-control 1.2.0 
language-cpp14 0.6.2 
language-fortran 2.1.12 
language-markdown 0.37.0 
linter 2.3.1 
linter-gcc 0.9.0 
linter-ui-default 1.8.1 
minimal-syntax-dark 0.12.4 
move-panes 0.2.0 
multi-theme-applicator 1.3.6 
pubster-syntax 3.1.1 
relative-numbers 0.9.1 
susave 0.4.0 
theme-switcher 1.1.0 
vim-mode-plus 1.36.4 

@Thomasguo666
Copy link

orz

@rejnok93
Copy link

rejnok93 commented Sep 2, 2020

I found the way to reproduce:

  1. I use PlatformIO IDE installed inside Atom for developing ESP8266 and ESP32 projects (on top of their Arduino core).
    I have open many tabs (3 projects). The active PIO project connected with this issue is "scuremote" containing scuremote.cpp+skfsculib.cpp (in src directory) and skfsculib.h (in include directory). Only the scuremote.cpp file is opened in editor (as tab), it is main file with Arduino's setup() and loop() main functions, and included many Arduino libraries and my own "skfsculib.h" library header file (corresponding cpp file is skfsculib.cpp).
    The "scuremote.cpp" file has unsaved changes now and have some red linter errors (I think this information is related to the issue).
  2. I open skfsculib.cpp file from project tree, shows up in editor as tab after scuremote.cpp tab and see some code lines (but not type anything, maybe even not click anything, only scroll and hover over some code with mouse).
  3. Close this tab (skfsculib.cpp) by cross button on tab
  4. Right when I move mouse (not click yet) over some functions in scuremote.cpp file (it showed automatically when I closed skfsculib.cpp tab) - 1st error message pops up and this issue started and not terminate until I save the file. But the errors are thrown only on scuremote.cpp tab (still unsaved changes), not on other files of other projects. New error message every time I move mouse on text (not on empty space), even when move from a function to a comment.

See the installed plugins and version on my previous post (from 19 Jun)...

Edit: (Additional fact)
I tried the same proccess for another project (ESP32, not ESP8266 as previous), with main file kscupw_security.cpp (containig loop() fn) - I left it unsaved right-click on function "digitalWrite()" then "Goto Declaration" opens esp32-hal-gpio.h, then close this file. No errors if I hover any code of kscupw_security.cpp! I tried leaving the file with red error even tried again without leaving errors.
--> so the bug is connected only with the certain file (can't be reproduced by steps above within another project or another file)
...if someone wants to see the file scuremote.cpp I don't want to share online, but I can send it by email to the developer of the linter-ui-default...

Edit2: unsaved file -> unsaved file with red linter errors

@aminya
Copy link
Collaborator

aminya commented Sep 29, 2020

@rejnok93 Does this happen in the latest version (2.1.2) ? I added a patch for it in #591

@rejnok93
Copy link

Atom can update linter-ui-default only to 2.1.2 version today...

@aminya
Copy link
Collaborator

aminya commented Sep 30, 2020

Yes. That was a typo 😅

@rejnok93
Copy link

So in version 2.1.2, I'm not able to pop the error message again - it is solved. Thanks

@aminya
Copy link
Collaborator

aminya commented Sep 30, 2020

Sounds great! Thanks for testing this.

@mirenradia
Copy link

This issue seems to have come back for me in the latest update:

Atom: 1.53.0 x64
Electron: 6.1.12
OS: Ubuntu 20.04.1
Thrown From: linter-ui-default package 2.1.4

Stack Trace

Uncaught TypeError: range.intersectsWith is not a function

At /home/miren/.atom/packages/linter-ui-default/lib/helpers.js:105

TypeError: range.intersectsWith is not a function
    at /packages/linter-ui-default/lib/helpers.js:105:53
    at Map.forEach (<anonymous>)
    at filterMessagesByRangeOrPoint (/packages/linter-ui-default/lib/helpers.js:102:12)
    at Editor.updateTooltip (/packages/linter-ui-default/lib/editor/index.js:291:22)
    at /packages/linter-ui-default/lib/editor/index.js:232:18)
    at invokeFunc (/packages/linter-ui-default/node_modules/lodash/lodash.js:10359:23)
    at trailingEdge (/packages/linter-ui-default/node_modules/lodash/lodash.js:10408:18)
    at timerExpired (/packages/linter-ui-default/node_modules/lodash/lodash.js:10396:18)

Commands

     -8:58.7.0 core:move-right (input.hidden-input)
     -8:51.9.0 core:move-left (input.hidden-input)
  3x -8:31.5.0 core:backspace (input.hidden-input)
  2x -8:26.8.0 autocomplete-plus:confirm (input.hidden-input)
     -8:15.8.0 core:move-right (input.hidden-input)
     -1:52 intentions:highlight (input.hidden-input)
     -1:51.4.0 command-palette:toggle (input.hidden-input)
     -1:48.5.0 core:move-down (input.hidden-input)
     -1:48.3.0 core:confirm (input.hidden-input)
     -1:48.3.0 settings-view:view-installed-packages (input.hidden-input)

Non-Core Packages

atom-material-syntax 1.0.8 
atom-material-ui 2.1.3 
busy-signal 2.0.1 
city-lights-syntax 1.1.8 
city-lights-ui 1.5.3 
clang-format 2.0.8 
file-types 1.0.1 
goto-definition 1.3.4 
intentions 1.1.5 
keybinding-cheatsheet 0.1.1 
keymap-control 1.2.0 
language-cpp14 0.6.2 
language-fortran 2.1.12 
language-markdown 0.37.0 
linter 3.1.1 
linter-gcc 0.9.0 
linter-ui-default 2.1.4 
minimal-syntax-dark 0.12.4 
move-panes 0.2.0 
multi-theme-applicator 1.3.6 
pubster-syntax 3.1.1 
relative-numbers 0.9.1 
susave 0.4.0 
theme-switcher 1.1.0 
vim-mode-plus 1.36.4 

@aminya aminya reopened this Nov 17, 2020
@aminya
Copy link
Collaborator

aminya commented Nov 17, 2020

The last two versions were just updating dependencies. The code has not changed. I will check if there is still a possibility of this error message.

@aminya
Copy link
Collaborator

aminya commented Nov 22, 2020

@mirenradia Please check if this is resolved in the latest version

@mirenradia
Copy link

I have updated to the latest version and haven't yet seen this error. If I do, I'll update this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants