1. 程式人生 > 程式設計 >解決mac最新版intellij idea崩潰閃退crash的問題

解決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前面的勾選如下圖:

解決mac最新版intellij idea崩潰閃退crash的問題

總結

到此這篇關於解決mac最新版intellij idea崩潰閃退crash的問題的文章就介紹到這了,更多相關idea崩潰閃退crash內容請搜尋我們以前的文章或繼續瀏覽下面的相關文章希望大家以後多多支援我們!