我最初用的版本是:IntelliJ IDEA 2018.3 在编写scala 项目的时候 突然出现了闪退。打开等一会就退出。百度了好久,说的办法无非就两种:
1.更改 idea64.exe.vmoptions (具体过程略,其他日志有很多讲这个的。)
将-Xmx 的值,改小。尝试过,没有作用,而且我的电脑内存16G. 所以不是这个原因。
2.如果是升级过 将之前的残留文件 删除
比如我是从 2017 升级到2018 的。2017 在 C:\Users\用户名\.IntelliJIdea2019.1 下 有一个残留的文件
.IntelliJIdea2017.1 删掉重启,还没有解决。
3.开始冷静思考,拒绝百度。查看到 C:\Users\用户名\ 目录下有很多error log
类似 java_error_in_idea_5752.log
仔细查看日志
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ILLEGAL_INSTRUCTION (0xc000001d) at pc=0x00007ff804c746fa, pid=17536, tid=0x0000000000003758
#
# JRE version: OpenJDK Runtime Environment (8.0_202-b49) (build 1.8.0_202-release-1483-b49)
# Java VM: OpenJDK 64-Bit Server VM (25.202-b49 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C [mybatisplugin987656376254055272.tmp+0xa46fa]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
# http://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.
#
看到了其中的这句
Problematic frame:
C [mybatisplugin987656376254055272.tmp+0xa46fa]
猜想应该是mybatis plugin ,mybatis 插件的原因。
在插件目录 C:\Users\用户名\.IntelliJIdea2019.1\config\plugins 删掉 mybatis 相关插件的文件。重启。
终于好使了。总结一下,遇事还是要先动脑子的。盲目百度容易南辕北辙。