IntelliJ 2019.1.3 freezes when copying JavaScript code

I updated IntelliJ to 2019.1.3 on two different computers today and started having freezes while copying javascript code linees, mostly redux-sagas (aka tons of JavaScript generator functions). I executed Invalidate Cache, but it did not help.

I did a lot of copy+paste refactoring today. Three freezes were within minutes after starting the editor, two freezes occured after over an hour of working intensely.

At least three freezes occured when I tried to copy a line similar to this:

yield takeLatest(actions.myBookCreateClicked.type, create.clickedOnNewMyBook);
  • takeLatest is from npm package 'redux-saga/effects'
  • actions and create are project reladed files
  • create.clickedOnNewMyBook is a generator function

I uploaded some thread dumps that were generated, named "threadDumps-freeze-20190603-215504-IU-191.7479.19.zip". It's basically an endless repetition of the following excerpt:

at java.util.HashMap.resize(HashMap.java:735)
at java.util.HashMap.computeIfAbsent(HashMap.java:1106)
at com.intellij.lang.javascript.psi.types.JSTypeBaseImpl.getEqualityMap(JSTypeBaseImpl.java:457)
at com.intellij.lang.javascript.psi.types.JSTypeBaseImpl.isEquivalentTo(JSTypeBaseImpl.java:429)
at com.intellij.lang.javascript.psi.types.JSIterableComponentTypeImpl.isEquivalentToWithSameClass(JSIterableComponentTypeImpl.java:80)
at com.intellij.lang.javascript.psi.types.JSTypeBaseImpl.isEquivalentTo(JSTypeBaseImpl.java:436)
at com.intellij.lang.javascript.psi.types.JSFunctionTypeImpl.isEquivalentToSafe(JSFunctionTypeImpl.java:300)
at com.intellij.lang.javascript.psi.types.JSFunctionTypeImpl.isEquivalentToWithSameClass(JSFunctionTypeImpl.java:289)
at com.intellij.lang.javascript.psi.types.JSTypeBaseImpl.isEquivalentTo(JSTypeBaseImpl.java:436)
at com.intellij.lang.javascript.psi.types.TypeScriptConditionalTypeJSTypeImpl.isEquivalentToWithSameClass(TypeScriptConditionalTypeJSTypeImpl.java:233)
at com.intellij.lang.javascript.psi.types.JSTypeBaseImpl.isEquivalentTo(JSTypeBaseImpl.java:436)
at com.intellij.lang.javascript.psi.types.JSIterableComponentTypeImpl.isEquivalentToWithSameClass(JSIterableComponentTypeImpl.java:80)
at com.intellij.lang.javascript.psi.types.JSTypeBaseImpl.isEquivalentTo(JSTypeBaseImpl.java:436)
at com.intellij.lang.javascript.psi.types.JSFunctionTypeImpl.isEquivalentToSafe(JSFunctionTypeImpl.java:300)
at com.intellij.lang.javascript.psi.types.JSFunctionTypeImpl.isEquivalentToWithSameClass(JSFunctionTypeImpl.java:289)
at com.intellij.lang.javascript.psi.types.JSTypeBaseImpl.isEquivalentTo(JSTypeBaseImpl.java:436)
at com.intellij.lang.javascript.psi.types.TypeScriptConditionalTypeJSTypeImpl.isEquivalentToWithSameClass(TypeScriptConditionalTypeJSTypeImpl.java:233)
at com.intellij.lang.javascript.psi.types.JSTypeBaseImpl.isEquivalentTo(JSTypeBaseImpl.java:436)

 

IntelliJ IDEA 2019.1.3 (Ultimate Edition)
Build #IU-191.7479.19, built on May 28, 2019
Licensed to ti&m AG / Beat Durrer
You have a perpetual fallback license for this version
Subscription is active until September 8, 2020
JRE: 1.8.0_202-release-1483-b58 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

 

I only have official JetBrains plugins enabled.

1
8 comments

can't recreate using similar code snippets... Can you share files/sample project that can be used to reproduce the issue?

0

Oh the irony! Of course it crashed when I tried to copy code snippets into a new project. Even more annoying: It did not crash anymore after that, not in the sample project or the original one ¯\_(ツ)_/¯

I'll share code if I can pinpoint the cause, but I can't just dump the project here, it is proprietary code owned by an customer (and freaking big).

Nonetheless, the stacktrace is obviously recursive. May I suggest to add count the interations and log/abort when it becomes too deep?

0

Can you check if it's still the issue in 2019.2 EAP (https://www.jetbrains.com/webstorm/eap/)? As far as we can judge from stack traces, it must be fixed there

0

Sorry for the late response! It was not fixed by 2019.2 EAP immediately, but dissapeared somewhen later, maybe with one of the bugfix patches.

Thanks for your time.

1

I still have this problem, working on a javascript file, it does it constantly.

0

It must be https://youtrack.jetbrains.com/issue/WEB-65787. The bug has already been resolved and the fix is included in the 2024.1.1 release. Please could you check if upgrading makes the things any better?

0

Yes totally fixed it - thank you!  (sorry I didn't upgrade before I posted)

0
Great, glad to hear it helped!
0

Please sign in to leave a comment.