如何修复 java 上的 "An unrecoverable stack overflow has occurred... Java returned: -1073741819" 错误?

How to fix "An unrecoverable stack overflow has occurred... Java returned: -1073741819" error on java?

在处理 Java Swing 项目时,我遇到了以下运行时错误“发生了不可恢复的堆栈溢出... Java 返回:-1073741819”。 项目环境:Netbeans 12,jdk1.8.0_211,poi 4.1 on windows10
我无法重现此错误。

An unrecoverable stack overflow has occurred.
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_STACK_OVERFLOW (0xc00000fd) at pc=0x0000000050d34ef7, pid=218832, tid=0x000000000004488c
#
# JRE version: Java(TM) SE Runtime Environment (8.0_211-b12) (build 1.8.0_211-b12)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.211-b12 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# V  [jvm.dll+0x214ef7]C:\Users\<username>\AppData\Local\NetBeans\Cache.0\executor-snippets\run.xml:111: The following error occurred while executing this line:
C:\Users\<username>\AppData\Local\NetBeans\Cache.0\executor-snippets\run.xml:94: Java returned: -1073741819
BUILD FAILED (total time: 1 minute 15 seconds)

我重新启动了 Netbeans,一切正常。