mac最新版intellij idea崩溃闪退crash的解决方案

最近我的idea编辑器更新到了最新的版本(当前最新的版本是2020.2.2),使用过程中发现当选择文件夹的时候就会崩溃闪退,因为我记录了崩溃的日志,打开日志,主要信息如下:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGILL (0x4) at pc=0x00007fff204b6086, pid=38839, tid=775
#
# JRE version: OpenJDK Runtime Environment JBR-11.0.8.10-944.31-jcef (11.0.8+10) (build 11.0.8+10-b944.31)
# Java VM: OpenJDK 64-Bit Server VM JBR-11.0.8.10-944.31-jcef (11.0.8+10-b944.31, mixed mode, tiered, compressed oops, g1 gc, bsd-amd64)
# Problematic frame:
# C  [libsystem_kernel.dylib+0x7086]  __kill+0xa
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

 根据关键字,google搜索了一下,最终汇总了两个解决方案,如下:

1、更改idea运行使用的jdk。以前的版本是find action之后搜索switch boot jdk的,现在不行了,最终找到官方的这篇文章:https://www.jetbrains.com/help/idea/switching-boot-jdk.html

看得懂高中英文的应该都知道怎么做了,按照说明选择本地的jdk就可以了。

2、然后方案1还是有点问题,我在mac下还了jdk之后,idea的一些菜单跟以前有些变化(比如菜单栏找不到preference等了),这样可以用下面的方案2,经过google查明本次崩溃闪退的主要原因是一个在2020.2新上的JCEF的功能,详细的解释说明如下:

https://jetbrains.org/intellij/sdk/docs/reference_guide/jcef.html

摘录其中的一段:

Using JCEF requires using a dedicated JetBrains Runtime, please follow these installation instructions on how to obtain and activate it in your IDE. Enable ide.browser.jcef.enabled in Registry dialog (invoke Help | Find Action and type “Registry”) and restart the IDE for changes to take effect.

 

这也就能解释为什么换了jdk就不会出现闪退问题了,因为其using a dedicated JetBrains Runtime。

所以最终的解决方案就是关闭JCEF。我是使用Help->Edit Custom Properties,然后添加一行ide.browser.jcef.enabled=false来关闭,按照上面的链接来说,通过find Action,搜索Registry,然后取消ide.browser.jcef.enabled前面的勾选如下图:

 

  • 3
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 7
    评论
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值