java调用dll文件,调用失败# Problematic frame: # C [MSVCR100D.dll+0x7bbbc] 5C

java使用jna.Native的方式调用dll文件,报错:

# Problematic frame:
# C  [MSVCR100D.dll+0x7bbbc]

错误日志头:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6ba2bbbc, pid=14344, tid=0x0000312c
#
# JRE version: Java(TM) SE Runtime Environment (8.0_231-b11) (build 1.8.0_231-b11)
# Java VM: Java HotSpot(TM) Client VM (25.231-b11 mixed mode windows-x86 )
# Problematic frame:
# C  [MSVCR100D.dll+0x7bbbc]
#
# Core dump written. Default location: E:\sboot\hs_err_pid14344.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.

主要错误:

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  com.sun.jna.Native.invokePointer(JI[Ljava/lang/Object;)J+0
j  com.sun.jna.Function.invokePointer(I[Ljava/lang/Object;)Lcom/sun/jna/Pointer;+6
j  com.sun.jna.Function.invokeString(I[Ljava/lang/Object;Z)Ljava/lang/String;+3
j  com.sun.jna.Function.invoke([Ljava/lang/Object;Ljava/lang/Class;Z)Ljava/lang/Object;+544
j  com.sun.jna.Function.invoke(Ljava/lang/Class;[Ljava/lang/Object;Ljava/util/Map;)Ljava/lang/Object;+214
j  com.sun.jna.Library$Handler.invoke(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;+341
j  com.sun.proxy.$Proxy0.InterfaceFunc(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;+76
j  com.itliuyue.sboot.utils.CAlgorithmByTES.main([Ljava/lang/String;)V+41
v  ~StubRoutines::call_stub

weixin_43392070
三年级一班接班人 完整的错误log:
2 个月之前 回复

1个回答

这个是c++ dll那里丢出了错误。可能是这个程序本身有bug,或者是你调用的参数不正确导致dll丢出错误,还是要先调试好dll,特别是要dll的编写者参与一起排查。

weixin_43392070
三年级一班接班人 回复赈见早琥珀主: InterfaceFunc(pathQAdata, pathB4srdata, pathB5srdata, pathB10data, pathB11data, pathMTLdata, sLSTdata);
2 个月之前 回复
weixin_43392070
三年级一班接班人 感谢回复,调用方法 和 数据是这样的, 我想问我按照这个方式调用了,产生了上述问题 按照您的意思,是不是dll本身有bug的可能多一些呢SW算法的输入参数和接口为:(sLSTdata为输出结果) string pathQAdata = "J:\\SWtestdata\\LC08_L1TP_133031_20130416_20170505_01_T1_pixel_qa.tif"; string pathB4srdata = "J:\\SWtestdata\\LC08_L1TP_133031_20130416_20170505_01_T1_sr_band4.tif"; string pathB5srdata = "J:\\SWtestdata\\LC08_L1TP_133031_20130416_20170505_01_T1_sr_band5.tif"; string pathB10data = "J:\\SWtestdata\\LC08_L1TP_133031_20130416_20170505_01_T1_B10.TIF"; string pathB11data = "J:\\SWtestdata\\LC08_L1TP_133031_20130416_20170505_01_T1_B11.TIF"; string pathMTLdata = "J:\\SWtestdata\\LC08_L1TP_133031_20130416_20170505_01_T1_MTL.txt"; string sLSTdata = "J:\\SWtestdata\\LC08_L1TP_133031_20130416_20170505_01_T1_SW_LSTdll.TIF"; InterfaceFunc(pathQAdata, pathB4srdata, pathB5srdata, pathB10data, pathB11data, pathMTLdata, sLSTdata);
2 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问