Idea stuck and error reported: UI was frozen for xxxxx MS problem solving

Phenomenon

After idea starts and clicks a menu, there is no reaction at all. When you click close, you can’t close it. Check the log and report the following error:

➜  bin 2021-04-30 00:20:31,777 [ 317987]   WARN - .diagnostic.PerformanceWatcher - UI was frozen for 5750ms, details saved to /home/zeek/.cache/JetBrains/IntelliJIdea2020.3/log/threadDumps-freeze-20210430-002031-IU-203.7148.57-RandomAccessFile.readBytes-5sec 
2021-04-30 00:20:45,194 [ 331404]   WARN - s.ui.configuration.SdkDetector - No version is returned for detected SDK IDEA JDK at /home/zeek/software/idea-IU-203.7148.57 
2021-04-30 00:22:05,304 [ 411514]   WARN - ystem.impl.ActionPopupMenuImpl - 1174ms to fill popup menu ProjectViewPopup 
2021-04-30 00:22:33,250 [ 439460]   WARN - ConfigurableExtensionPointUtil - ignore deprecated groupId: language for id: preferences.language.Kotlin.scripting 
2021-04-30 00:22:33,426 [ 439636]   WARN - ConfigurableExtensionPointUtil - use other group instead of unexpected one: build.android 
2021-04-30 00:22:44,580 [ 450790]   WARN - .diagnostic.PerformanceWatcher - UI was frozen for 12256ms, details saved to /home/zeek/.cache/JetBrains/IntelliJIdea2020.3/log/threadDumps-freeze-20210430-002237-IU-203.7148.57-ShowSettingsAction.perform-12sec

It was serious at the beginning, and I don’t know the specific reason.

Processing steps

First of all, because I use Linux operating system, the default JDK is openjdk 11. Generally speaking, openjdk is not as stable as Oracle JDK, and openjdk 11 is too new, so the default JDK of Jiujiang operating system is Oracle JDK 9.

➜  bin java -version
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)

Secondly, because the default memory used by idea is about 700m, insufficient memory may also lead to the above situation. Therefore, the running memory of idea is adjusted to 2G, and the configuration file is idea installation directory/bin/idea64. Vmoptions . The configuration content is as follows (only the sizes of – XMS and – Xmx are modified)

-Xms512m
-Xmx2048m
-XX:ReservedCodeCacheSize=512m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-XX:CICompilerCount=2
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-ea
-Dsun.io.useCanonCaches=false
-Djdk.http.auth.tunneling.disabledSchemes=""
-Djdk.attach.allowAttachSelf=true
-Djdk.module.illegalAccess.silent=true
-Dkotlinx.coroutines.debug=off
-Dsun.tools.attach.tmp.only=true

Finally, disable some plug-ins that you can’t use at ordinary times.

After the above three steps, the idea Caton phenomenon is not so obvious (invisible to the naked eye).


Title: idea stuck and error: UI was frozen for xxxxx MS problem solving
Author: zeekling
tips: Please note that the article is reproduced from personal blog: Xiaoling children’s shoes

Read More: