2 bbmiaomiao77 bbmiaomiao77 于 2014.11.14 16:32 提问

用JNative方法调用dll

运行环境是JDK1.4
报异常信息:

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x4769AA6
Function=[Unknown.]
Library=C:\Windows\System32\BoostYccb.dll

NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.

Current Java thread:
at org.xvolks.jnative.JNative.nInvoke(Native Method)
at org.xvolks.jnative.JNative.invoke(JNative.java:807)
at onlyfun.dllcall.UserCall.main(UserCall.java:101)

Dynamic libraries:
0x00400000 - 0x00407000 D:\JDK1.4\bin\javaw.exe
0x77A50000 - 0x77BD0000 C:\Windows\SysWOW64\ntdll.dll
0x75700000 - 0x75810000 C:\Windows\syswow64\kernel32.dll
0x76E40000 - 0x76E87000 C:\Windows\syswow64\KERNELBASE.dll
0x75220000 - 0x752C0000 C:\Windows\syswow64\ADVAPI32.dll
0x752C0000 - 0x7536C000 C:\Windows\syswow64\msvcrt.dll
0x770B0000 - 0x770C9000 C:\Windows\SysWOW64\sechost.dll
0x76CB0000 - 0x76DA0000 C:\Windows\syswow64\RPCRT4.dll
0x75110000 - 0x75170000 C:\Windows\syswow64\SspiCli.dll
0x75100000 - 0x7510C000 C:\Windows\syswow64\CRYPTBASE.dll
0x76E90000 - 0x76F90000 C:\Windows\syswow64\USER32.dll
0x76C10000 - 0x76CA0000 C:\Windows\syswow64\GDI32.dll
0x75EC0000 - 0x75ECA000 C:\Windows\syswow64\LPK.dll
0x770D0000 - 0x7716D000 C:\Windows\syswow64\USP10.dll
0x76DA0000 - 0x76E00000 C:\Windows\system32\IMM32.DLL
0x75CF0000 - 0x75DBC000 C:\Windows\syswow64\MSCTF.dll
0x08000000 - 0x08136000 D:\JDK1.4\jre\bin\client\jvm.dll
0x74E00000 - 0x74E32000 C:\Windows\system32\WINMM.dll
0x724F0000 - 0x7253C000 C:\Windows\system32\apphelp.dll
0x10000000 - 0x10007000 D:\JDK1.4\jre\bin\hpi.dll
0x00340000 - 0x0034E000 D:\JDK1.4\jre\bin\verify.dll
0x00350000 - 0x00368000 D:\JDK1.4\jre\bin\java.dll
0x00370000 - 0x0037D000 D:\JDK1.4\jre\bin\zip.dll
0x04730000 - 0x047D3000 C:\Windows\System32\BoostYccb.dll
0x75370000 - 0x753FF000 C:\Windows\syswow64\oleaut32.dll
0x75400000 - 0x7555C000 C:\Windows\syswow64\ole32.dll
0x047E0000 - 0x047EB000 C:\Windows\system32\borlndmm.dll
0x75000000 - 0x75007000 C:\Windows\system32\wsock32.dll
0x76E00000 - 0x76E35000 C:\Windows\syswow64\WS2_32.dll
0x77A20000 - 0x77A26000 C:\Windows\syswow64\NSI.dll
0x74F20000 - 0x74FA4000 C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.18201_none_ec80f00e8593ece5\comctl32.dll
0x04BB0000 - 0x04C7D000 C:\Windows\System32\JNativeCpp.dll
0x6E700000 - 0x6E780000 C:\Windows\system32\uxtheme.dll
0x75AA0000 - 0x75ACB000 C:\Windows\syswow64\imagehlp.dll
0x743E0000 - 0x744CB000 C:\Windows\syswow64\dbghelp.dll
0x76CA0000 - 0x76CA5000 C:\Windows\syswow64\PSAPI.DLL

Heap at VM Abort:
Heap
def new generation total 576K, used 183K [0x10010000, 0x100b0000, 0x104f0000)
eden space 512K, 23% used [0x10010000, 0x1002dc60, 0x10090000)
from space 64K, 99% used [0x100a0000, 0x100afff8, 0x100b0000)
to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000)
tenured generation total 1408K, used 45K [0x104f0000, 0x10650000, 0x14010000)
the space 1408K, 3% used [0x104f0000, 0x104fb518, 0x104fb600, 0x10650000)
compacting perm gen total 4096K, used 1532K [0x14010000, 0x14410000, 0x18010000)
the space 4096K, 37% used [0x14010000, 0x1418f150, 0x1418f200, 0x14410000)

Local Time = Fri Nov 14 16:11:22 2014
Elapsed Time = 0
#

The exception above was detected in native code outside the VM

#

Java VM: Java HotSpot(TM) Client VM (1.4.2-b28 mixed mode)

#

An error report file has been saved as hs_err_pid13592.log.

Please refer to the file for further information.

#
求大师指导。

1个回答

eagleyan
eagleyan   Rxr 2014.12.01 08:49

这里的错误在你的dll里,返回的非法内存访问,可能性很多,比如访问了未初始化的变量,越界访问。最好贴上你的native code来看看

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!