A fatal error has been detected by the Java Runtime Environment:

created at 11-16-2021 views: 3

1. Overview of error reporting

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000000, pid=2608, tid=0x00002504
#
# JRE version: Java(TM) SE Runtime Environment (8.0_131-b11) (build 1.8.0_131-b11)
# Java VM: Java HotSpot(TM) Client VM (25.131-b11 mixed mode windows-x86 )
# Problematic frame:
# C  0x00000000
#
# Core dump written. Default location: C:\Users\Administrator\Desktop\aerotop-led-project\hs_err_pid2608.mdmp
#
# 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.
#

Today, when I was running the java program, I reported an error as shown above, and then checked the log. By querying on Baidu, several solutions were given, but the error could not be solved completely, and the error would still be reported. When I look down the log Found the usage of jvm heap memory and meta space, as shown below:

Heap:
 def new generation   total 44672K, used 13804K [0x05000000, 0x08070000, 0x0a550000)
  eden space 39744K,  30% used [0x05000000, 0x05bab018, 0x076d0000)
  from space 4928K,  37% used [0x07ba0000, 0x07d70208, 0x08070000)
  to   space 4928K,   0% used [0x076d0000, 0x076d0000, 0x07ba0000)
 tenured generation   total 98972K, used 59381K [0x0a550000, 0x105f7000, 0x15000000)
   the space 98972K,  59% used [0x0a550000, 0x0df4d4f0, 0x0df4d600, 0x105f7000)
 Metaspace       used 63522K, capacity 65876K, committed 66048K, reserved 66944K

Although the error of OOM is not reported, there is still a fluke to change the size of heap memory and meta space, but an error is reported.

2. Solution

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000000, pid=2608, tid=0x00002504
#
# JRE version: Java(TM) SE Runtime Environment (8.0_131-b11) (build 1.8.0_131-b11)
# Java VM: Java HotSpot(TM) Client VM (25.131-b11 mixed mode windows-x86 )
# Problematic frame:
# C  0x00000000
#
# Core dump written. Default location: C:\Users\Administrator\Desktop\aerotop-led-project\hs_err_pid2608.mdmp
#
# 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.
#

In the first log message, I found a keyword Problematic frame:, the file name is displayed below, so I located the file, and found that it was used for multiple timing tasks to process this method at the same time, resulting in an error. , After modifying the program, solve the problem.

created at:11-16-2021
edited at: 11-16-2021: