解决mac最新版intellij idea崩溃闪退crash的问题

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

解决mac最新版intellij idea崩溃闪退crash的问题

kobe_byrant   2020-09-19 我要评论

本文着重讲解了解决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前面的勾选如下图:

总结

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们