idea修改内存参数后闪退并报OutOfMemoryError

错误重现

idea修改内存参数后闪退并报OutOfMemoryError_第1张图片

Internal error. Please refer to http://jb.gg/ide/critical-startup-errors

java.util.concurrent.CompletionException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Self-suppression not permitted
    at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
    at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1702)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Self-suppression not permitted
    at com.intellij.ide.plugins.PluginManagerCore.loadDescriptors(PluginManagerCore.java:1345)
    at com.intellij.ide.plugins.PluginManagerCore.lambda$getOrScheduleLoading$5(PluginManagerCore.java:1284)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
    ... 3 more
Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Self-suppression not permitted
    at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
    at com.intellij.ide.plugins.PluginManagerCore.loadDescriptorsFromDir(PluginManagerCore.java:1082)
    at com.intellij.ide.plugins.PluginManagerCore.loadDescriptors(PluginManagerCore.java:1333)
    ... 5 more
Caused by: java.lang.IllegalArgumentException: Self-suppression not permitted
    at java.base/java.lang.Throwable.addSuppressed(Throwable.java:1054)
    at com.intellij.ide.plugins.PluginManagerCore.loadDescriptor(PluginManagerCore.java:924)
    at com.intellij.ide.plugins.PluginManagerCore.lambda$loadDescriptorsFromDir$3(PluginManagerCore.java:1074)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:222)
    at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:29)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:201)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:193)
    ... 3 more
Caused by: java.lang.OutOfMemoryError: Java heap space

-----
JRE 11.0.6+8-b765.40 amd64 by JetBrains s.r.o
C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.1.1\jbr

排查

打开idea.log日志文件发现,由于自己设置的内存过小,导致idea打不开
idea修改内存参数后闪退并报OutOfMemoryError_第2张图片

修改自定义启动参数
打开idea64.exe.vmoptions(注意是用户文件下面的,不是软件安装目录的配置文件)
idea修改内存参数后闪退并报OutOfMemoryError_第3张图片

打开后发现自己之前配置的
idea修改内存参数后闪退并报OutOfMemoryError_第4张图片

解决

将用户目录(C:\Users\xxx\AppData\Roaming\JetBrains\IdeaIC2020.1)下的idea64.exe.vmoptions里面的前三行分别修改为:
-Xms130m
-Xmx750m
-XX:ReservedCodeCacheSize=250m

就可以正常启动了,网上说也可以直接删除。

https://blog.csdn.net/weixin_43578105/article/details/96147682

你可能感兴趣的:(错误)