尝试更新我的Intellij时出现OutOfMemory错误 [英] Getting a OutOfMemory error when attempting to update my Intellij
问题描述
我正在尝试将IntelliJ IDEA从build 141.177更新为141.178。
当更新下载所需的所有文件并开始更新时,我收到此错误:
I am trying to update IntelliJ IDEA from build 141.177 to 141.178. When the updated downloads all the files needed, and starts the update, I get this error:
Temp. directory: /tmp
java.lang.OutOfMemoryError: Java heap space
at ie.wombat.jbdiff.JBPatch.bspatch(JBPatch.java:91)
at com.intellij.updater.BaseUpdateAction.applyDiff(BaseUpdateAction.java:112)
at com.intellij.updater.UpdateAction.doApply(UpdateAction.java:44)
at com.intellij.updater.PatchAction.apply(PatchAction.java:184)
at com.intellij.updater.Patch$3.forEach(Patch.java:308)
at com.intellij.updater.Patch.forEach(Patch.java:360)
at com.intellij.updater.Patch.apply(Patch.java:303)
at com.intellij.updater.PatchFileCreator.apply(PatchFileCreator.java:84)
at com.intellij.updater.PatchFileCreator.apply(PatchFileCreator.java:75)
at com.intellij.updater.Runner.doInstall(Runner.java:295)
at com.intellij.updater.Runner.access$000(Runner.java:18)
at com.intellij.updater.Runner$2.execute(Runner.java:261)
at com.intellij.updater.SwingUpdaterUI$5.run(SwingUpdaterUI.java:191)
at java.lang.Thread.run(Thread.java:745)
/ tmp
文件夹应位于我的根分区上,其大小为20GiB,目前仍然剩下大约8GiB。所以我真的不明白现在的问题是什么。另外我不确定RAM部分,我的系统在更新时使用了40%的RAM。
The /tmp
folder should be on my root partition which has 20GiB of size, and currently it still has about 8GiB left. So I don't really understand what the problem could be here right now. Plus I am not sure about the RAM part, my system is using 40% of my RAM when I do the update.
推荐答案
阅读JetBrains 文档&有关如何增加IntelliJ的最大堆大小的此答案。
Read the JetBrains documentation & this answer about how to increase the maximum heap size for IntelliJ.
在 idea.vmoptions
(32位版本)或 idea64中设置
(64位版本),并根据我上面提到的文档将其复制到适当的位置。 -Xmx2048m
。 vmoptions
Set -Xmx2048m
in idea.vmoptions
(32-bit edition) or idea64.vmoptions
(64-bit edition), and copy it to the appropriate location, according to the documentation I referred to above.
我也会执行文件>无效缓存/重新启动>无效并重新启动
,只是为了确保所做的更改(可能没有必要,但以防万一)。
I would also do File > Invalidate Caches / Restart > Invalidate and Restart
, just to be sure that the changes took (probably not necessary, but just in case).
我收到的完全相同在尝试通过自动更新程序从14.1.1升级到14.1.2时,今天堆栈跟踪。在OS X上,我通过将〜/ Library / Preferences / IdeaIC14 / idea.vmoptions
重命名为 idea64.vmoptions
来解决此问题。 。我已经在该文件中设置了 -Xmx2048m
,但显然在我正确重命名之前它没有被读取。
I received the exact same stack trace today while attempting to upgrade from 14.1.1 to 14.1.2 via the automatic updater. On OS X, I solved it by renaming ~/Library/Preferences/IdeaIC14/idea.vmoptions
to idea64.vmoptions
. I already had -Xmx2048m
set in that file, but apparently it wasn't being read until I renamed it correctly.
另请参阅YouTrack问题 IDEA-139036 (感谢@Meo)。
Also see YouTrack issue IDEA-139036 (thanks to @Meo).
这篇关于尝试更新我的Intellij时出现OutOfMemory错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!