# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffeb12b5114, pid=432, tid=9964
#
# JRE version: OpenJDK Runtime Environment (16.0.2+7) (build 16.0.2+7-67)
# Java VM: OpenJDK 64-Bit Server VM (16.0.2+7-67, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
# Problematic frame:
# C [nist.dll+0x5114]
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# 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.
#
错误原是c++中原先的函数参数类型是char*,但是java用的话只能用string来转,我一开始的时候想一比一还原,试图用c_str()函数将string转成char*。c++编译的时候没有问题,但是java调用的时候报错了。
具体原理可以看这里:
c++ string转char*
https://blog.csdn.net/weixin_46474546/article/details/119542321
最后还是开了个char数组,string转为char[]这样凑合用的(指针误我)。