当前位置: 代码迷 >> J2SE >> # An unexpected error has been detected by HotSpot Virtual Machine:
  详细解决方案

# An unexpected error has been detected by HotSpot Virtual Machine:

热度:369   发布时间:2016-04-24 12:19:17.0
java 使用JNative 调用 dll 问题~ 在线等
我用java jnative调用dll, 前面几个接口都是使用正常的.
但是有个接口调用过之后,会抛个异常,如下:

An unrecoverable stack overflow has occurred.
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# EXCEPTION_STACK_OVERFLOW (0xc00000fd) at pc=0x0da1db27, pid=444, tid=580
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0-b64 mixed mode, sharing)
# Problematic frame:
# C [VodCltApi.dll+0x1db27]
#
# An error report file with more information is saved as hs_err_pid444.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp

========= 但是这个接口我用VC调用是正常的.不知道是哪里出了问题.

------解决方案--------------------
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# EXCEPTION_STACK_OVERFLOW (0xc00000fd) at pc=0x100042c7, pid=2324, tid=3496
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_12-b04 mixed mode, sharing)
# Problematic frame:
# C [sftp_p2p.dll+0x42c7]
#

--------------- T H R E A D ---------------

Current thread (0x003cb050): JavaThread "main" [_thread_in_native, id=3496]

siginfo: ExceptionCode=0xc00000fd, ExceptionInformation=0x00000000 0x00030464 

Registers:
EAX=0x0001c130, EBX=0x00000000, ECX=0x00030464, EDX=0x0005f538
ESP=0x0004645c, EBP=0x00046464, ESI=0x0005f5c8, EDI=0x0005f544
EIP=0x100042c7, EFLAGS=0x00010206

Top of Stack: (sp=0x0004645c)
0x0004645c: 0005f530 1000137d 0005f544 1000194c
0x0004646c: 0005f538 0005f530 00000000 000464cc
0x0004647c: 000030f0 0005f5b8 0005f5c8 00000000
0x0004648c: cccccccc cccccccc cccccccc cccccccc
0x0004649c: cccccccc cccccccc cccccccc cccccccc
0x000464ac: cccccccc cccccccc cccccccc cccccccc
0x000464bc: cccccccc cccccccc cccccccc cccccccc
0x000464cc: 00000000 00000000 00000000 00000000 

Instructions: (pc=0x100042c7)
0x100042b7: 4c 24 08 72 14 81 e9 00 10 00 00 2d 00 10 00 00
0x100042c7: 85 01 3d 00 10 00 00 73 ec 2b c8 8b c4 85 01 8b 


Stack: [0x00030000,0x00070000), sp=0x0004645c, free space=89k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [sftp_p2p.dll+0x42c7]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j org.xvolks.jnative.JNative.nInvoke(I)V+0
j org.xvolks.jnative.JNative.invoke()V+67
j com.telnet.eafs.modules.sftp.SftpUtil.invokeDll(Ljava/lang/String;Ljava/lang/String;[Lcom/main/dll/DllType;Lorg/xvolks/jnative/Type;)Ljava/lang/String;+171
j com.telnet.eafs.modules.sftp.SftpUtil.fasong(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List;+161
j com.telnet.eafs.modules.sftp.SftpUtil.main([Ljava/lang/String;)V+36
v ~StubRoutines::call_stub

--------------- P R O C E S S ---------------

Java Threads: ( => current thread )
0x00a86410 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=4060]
0x00a85118 JavaThread "CompilerThread0" daemon [_thread_blocked, id=1672]
0x00a960e0 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=1964]
0x00a7f248 JavaThread "Finalizer" daemon [_thread_blocked, id=3940]
0x00a7e7a8 JavaThread "Reference Handler" daemon [_thread_blocked, id=2140]
=>0x003cb050 JavaThread "main" [_thread_in_native, id=3496]

Other Threads:
0x00a5ca68 VMThread [id=3184]
0x00a84a90 WatcherThread [id=3832]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
 def new generation total 576K, used 169K [0x22ae0000, 0x22b80000, 0x22fc0000)
eden space 512K, 23% used [0x22ae0000, 0x22afd750, 0x22b60000)
  相关解决方案