简体   繁体   English

当我打开intelij想法时,Java正在崩溃

[英]Java is Crashing When i open intelij idea

It often crashes when I open Intellij Idea. 当我打开Intellij Idea时,它经常崩溃。

I have tried different Intellij Idea versions (2019.1, 2018.3). 我尝试了不同的Intellij Idea版本(2019.1,2018.3)。

I installed Oracle JDK (Java SE Development Kit 8u201). 我安装了Oracle JDK(Java SE Development Kit 8u201)。

My Os : macOs Mojave. 我的Os:macOs Mojave。

This is the one part of the crash logs : (it is too long to share all logs here. to see all logs : here paste bin ) 这是崩溃日志的一部分:(这里共享所有日志太长了。查看所有日志:这里粘贴bin

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x000000011080b574, pid=4503, tid=0x000000000000a603
#
# JRE version: OpenJDK Runtime Environment (8.0_152-b28) (build 1.8.0_152-release-1343-b28)
# Java VM: OpenJDK 64-Bit Server VM (25.152-b28 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# V  [libjvm.dylib+0x406574]
#
# Failed to write core dump. 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:
#   http://bugreport.java.com/bugreport/crash.jsp
#

---------------  T H R E A D  ---------------

Current thread (0x00007ffd20821800):  JavaThread "C2 CompilerThread2" daemon [_thread_in_native, id=42499, stack(0x000070000522d000,0x000070000532d000)]

siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x000077fd22e98478

Registers:
RAX=0x00007ffd2932bcf0, RBX=0x00007ffd2932bcf0, RCX=0x000077fd22e98460, RDX=0x00007ffd21070c20
RSP=0x00007000053298c0, RBP=0x0000700005329930, RSI=0x00007ffd2932bcf0, RDI=0x000070000532a6d0
R8 =0x0000000000000000, R9 =0x0000000000000001, R10=0x0000000000000000, R11=0xffffffffff589ff0
R12=0x00007ffd223205b0, R13=0x00007ffd23dd12c8, R14=0x0000000000000000, R15=0x00007ffd2932bcf0
RIP=0x000000011080b574, EFLAGS=0x0000000000010246, ERR=0x0000000000000004
  TRAPNO=0x000000000000000e

Top of Stack: (sp=0x00007000053298c0)
0x00007000053298c0:   00007ffd2932bf48 00007ffd2932bcf0
0x00007000053298d0:   0000700005329930 000000011055a376
0x00007000053298e0:   0000000000000001 00007ffd2932bcf0
0x00007000053298f0:   0000700005329930 000070000532a6d0
0x0000700005329900:   000070000532a6d0 00007ffd2932bcf0
0x0000700005329910:   00007ffd223205b0 00007ffd23dd12c8
0x0000700005329920:   0000000000000000 00007ffd2932bcf0

I could not find what the reason is. 我找不到原因。 Can somebody help me? 有人能帮助我吗?

Intellij runs on OpenJDK by default, and the reason for your problem may be that the version of OpenJDK used by intellij has a conflict with the Oracle JDK. Intellij默认运行在OpenJDK上,问题的原因可能是intellij使用的OpenJDK版本与Oracle JDK发生冲突。 My idea is to change the intellij default JDK to Oracle JDK. 我的想法是将intellij默认JDK更改为Oracle JDK。 And I find the steps on intellij official website. 我在intellij官方网站上找到了相应的步骤。

  • Firstly, start your intellij and ignore the Java crash. 首先,启动你的intellij并忽略Java崩溃。
  • Secondly, press Ctrl + Shift + A and type Switch Boot JDK. 其次,按Ctrl + Shift + A并键入Switch Boot JDK。
  • Thirdly, double click the "Switch Boot JDK" item bar and choose your Oracle JDK installation directory. 再次,双击“Switch Boot JDK”项目栏并选择Oracle JDK安装目录。
  • Finally, restart your intellij. 最后,重启你的intellij。

search bar 搜索栏

Switch Boot JDK 切换启动JDK

It could be a memory issue if it sometimes crashes. 如果它有时崩溃,它可能是一个内存问题。 Have you tried to adjust the memory options in idea64.vmoptions? 您是否尝试调整idea64.vmoptions中的内存选项? https://intellij-support.jetbrains.com/hc/en-us/articles/206544869 https://intellij-support.jetbrains.com/hc/en-us/articles/206544869

Did you try ulimit -a and check core file size in result? 您是否尝试过ulimit -a并检查结果中的core file size If core file size is 0 mean that you can't create core dumps. 如果core file size为0意味着您无法创建核心转储。

then you can try ulimit -c unlimited to set that is unlimited 然后你可以尝试ulimit -c unlimited来设置unlimited

You can see more information about ulimit in this link Setting limits with ulimit 您可以在此链接中查看有关ulimit更多信息。 使用ulimit设置限制

Please try removing -Xmx750m from JVM Arguments. 请尝试从JVM参数中删除-Xmx750m。 I am guessing it might be due to heap size. 我猜它可能是由于堆大小。

Note: By default, -Xmx takes 25% of available memory. 注意:默认情况下,-Xmx占用可用内存的25%。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM