minuoli
minuoli
采纳率0%
2017-05-27 06:04

java调用C++的dll时报错C [KERNELBASE.dll+0xc41f]

java在调用C++编写的dll时报错:请大侠们帮忙分析一下(C++主要实现对C#dll的调用)

#

A fatal error has been detected by the Java Runtime Environment:

#

Internal Error (0xe0434352), pid=3264, tid=15672

#

JRE version: Java(TM) SE Runtime Environment (7.0_80-b15) (build 1.7.0_80-b15)

Java VM: Java HotSpot(TM) Client VM (24.80-b11 mixed mode, sharing windows-x86 )

Problematic frame:

C [KERNELBASE.dll+0xc41f]

#

Failed to write core dump. Minidumps are not enabled by default on client versions of Windows

#

An error report file with more information is saved as:

D:\workspace\CallDll\hs_err_pid3264.log

#

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.

#

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

4条回答

  • Mr_yangzc Mr丶YangZCH 4年前

    原因是c++里面数组长度写死了

    点赞 评论 复制链接分享
  • Mr_yangzc Mr丶YangZCH 4年前

    老铁 怎么解决的??

    点赞 评论 复制链接分享
  • bana0001 爱笑的阳光 4年前

    我也碰到一模一样的问题了,你是怎么解决的呢

    点赞 评论 复制链接分享
  • minuoli minuoli 4年前

    hs_err_pid3264.log中内容如下:

    #

    A fatal error has been detected by the Java Runtime Environment:

    #

    Internal Error (0xe0434352), pid=3264, tid=15672

    #

    JRE version: Java(TM) SE Runtime Environment (7.0_80-b15) (build 1.7.0_80-b15)

    Java VM: Java HotSpot(TM) Client VM (24.80-b11 mixed mode, sharing windows-x86 )

    Problematic frame:

    C [KERNELBASE.dll+0xc41f]

    #

    Failed to write core dump. Minidumps are not enabled by default on client versions of Windows

    #

    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.

    #

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

    Current thread (0x0020c400): JavaThread "main" [_thread_in_native, id=15672, stack(0x026f0000,0x02740000)]

    siginfo: ExceptionCode=0xe0434352, ExceptionInformation=0x80070002 0x00000000 0x00000000 0x00000000 0x679b0000

    Registers:
    EAX=0x0273e154, EBX=0x00000005, ECX=0x00000005, EDX=0x00000000
    ESP=0x0273e154, EBP=0x0273e1a4, ESI=0x0273e214, EDI=0x00000001
    EIP=0x7669c41f, EFLAGS=0x00000212

    Top of Stack: (sp=0x0273e154)
    0x0273e154: e0434352 00000001 00000000 7669c41f
    0x0273e164: 00000005 80070002 00000000 00000000
    0x0273e174: 00000000 679b0000 00000001 00000000
    0x0273e184: 00000000 00480000 005313b0 00000000
    0x0273e194: 00000000 00524af0 0050f668 0273e15c
    0x0273e1a4: 0273e248 67ad48c7 e0434352 00000001
    0x0273e1b4: 00000005 0273e214 4a13a4b2 05742590
    0x0273e1c4: 00524af0 0273e300 0050f668 00000001

    Instructions: (pc=0x7669c41f)
    0x7669c3ff: 02 50 ff 75 14 8d 45 c4 50 e8 15 ad 02 00 83 c4
    0x7669c40f: 0c eb 03 89 45 c0 8d 45 b0 50 ff 15 5c 11 69 76
    0x7669c41f: c9 c2 10 00 cc cc cc cc cc 8b ff 55 8b ec 56 8b
    0x7669c42f: 75 08 83 fe f4 72 18 83 fe f6 77 13 8d 45 08 50

    Register to memory mapping:

    EAX=0x0273e154 is pointing into the stack for thread: 0x0020c400
    EBX=0x00000005 is an unknown value
    ECX=0x00000005 is an unknown value
    EDX=0x00000000 is an unknown value
    ESP=0x0273e154 is pointing into the stack for thread: 0x0020c400
    EBP=0x0273e1a4 is pointing into the stack for thread: 0x0020c400
    ESI=0x0273e214 is pointing into the stack for thread: 0x0020c400
    EDI=0x00000001 is an unknown value

    Stack: [0x026f0000,0x02740000], sp=0x0273e154, free space=312k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C [KERNELBASE.dll+0xc41f]
    C [clr.dll+0x1248c7]
    C [clr.dll+0x223abf]
    C [clr.dll+0x22c222]
    C [clrjit.dll+0x10cf]
    C [clrjit.dll+0x1f0b0]
    C [clrjit.dll+0x1a60]
    C [clrjit.dll+0x1c42]
    C [clrjit.dll+0x244d]
    C [clrjit.dll+0x401c]
    C [clrjit.dll+0x4132]
    C [clrjit.dll+0x4282]
    C [clrjit.dll+0x4595]
    C [clr.dll+0x33669]
    C [clr.dll+0x33701]
    C [clr.dll+0x33743]
    C [clr.dll+0x3399c]
    C [clr.dll+0x33496]
    C [clr.dll+0x340db]
    C [clr.dll+0x1bcd5]
    C [clr.dll+0x2ae9]
    C 0x025d0970
    C [jna3813887800273882531.dll+0xcb77]
    C [jna3813887800273882531.dll+0xc7c2]
    C [jna3813887800273882531.dll+0x4561]
    C [jna3813887800273882531.dll+0x4cae]
    j com.sun.jna.Function.invokeVoid(I[Ljava/lang/Object;)V+0
    j com.sun.jna.Function.invoke([Ljava/lang/Object;Ljava/lang/Class;Z)Ljava/lang/Object;+45
    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.start()V+9
    j Platform.apptest.main([Ljava/lang/String;)V+28
    v ~StubRoutines::call_stub
    V [jvm.dll+0x1429aa]
    V [jvm.dll+0x20743e]
    V [jvm.dll+0x142a2d]
    V [jvm.dll+0xcb535]
    V [jvm.dll+0xd61d7]
    C [javaw.exe+0x2070]
    C [javaw.exe+0xa6d1]
    C [javaw.exe+0xa75b]
    C [kernel32.dll+0x13677]
    C [ntdll.dll+0x39f42]
    C [ntdll.dll+0x39f15]

    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j com.sun.jna.Function.invokeVoid(I[Ljava/lang/Object;)V+0
    j com.sun.jna.Function.invoke([Ljava/lang/Object;Ljava/lang/Class;Z)Ljava/lang/Object;+45
    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.start()V+9
    j Platform.apptest.main([Ljava/lang/String;)V+28
    v ~StubRoutines::call_stub

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

    Java Threads: ( => current thread )
    0x0065f800 JavaThread "Service Thread" daemon [_thread_blocked, id=12516, stack(0x04d40000,0x04d90000)]
    0x00650400 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=14588, stack(0x04c70000,0x04cc0000)]
    0x0064f400 JavaThread "Attach Listener" daemon [_thread_blocked, id=9484, stack(0x04b20000,0x04b70000)]
    0x00676400 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=7624, stack(0x026a0000,0x026f0000)]
    0x005d9c00 JavaThread "Finalizer" daemon [_thread_blocked, id=9532, stack(0x04a20000,0x04a70000)]
    0x005d8000 JavaThread "Reference Handler" daemon [_thread_blocked, id=9524, stack(0x025e0000,0x02630000)]
    =>0x0020c400 JavaThread "main" [_thread_in_native, id=15672, stack(0x026f0000,0x02740000)]

    Other Threads:
    0x005d6800 VMThread [stack: 0x049a0000,0x049f0000] [id=9764]
    0x0067fc00 WatcherThread [stack: 0x04fa0000,0x04ff0000] [id=14248]

    VM state:not at safepoint (normal execution)

    VM Mutex/Monitor currently owned by a thread: None

    Heap
    def new generation total 4928K, used 2447K [0x24800000, 0x24d50000, 0x29d50000)
    eden space 4416K, 55% used [0x24800000, 0x24a63e20, 0x24c50000)
    from space 512K, 0% used [0x24c50000, 0x24c50000, 0x24cd0000)
    to space 512K, 0% used [0x24cd0000, 0x24cd0000, 0x24d50000)
    tenured generation total 10944K, used 0K [0x29d50000, 0x2a800000, 0x34800000)
    the space 10944K, 0% used [0x29d50000, 0x29d50000, 0x29d50200, 0x2a800000)
    compacting perm gen total 12288K, used 689K [0x34800000, 0x35400000, 0x38800000)
    the space 12288K, 5% used [0x34800000, 0x348ac4d8, 0x348ac600, 0x35400000)
    ro space 10240K, 42% used [0x38800000, 0x38c37108, 0x38c37200, 0x39200000)
    rw space 12288K, 52% used [0x39200000, 0x39841738, 0x39841800, 0x39e00000)

    Card table byte_map: [0x04740000,0x047f0000] byte_map_base: 0x0461c000

    Polling page: 0x000c0000

    Code Cache [0x02740000, 0x027f0000, 0x04740000)
    total_blobs=203 nmethods=49 adapters=92 free_code_cache=32077Kb largest_free_block=32847360

    Compilation events (10 events):
    Event: 0.339 Thread 0x00650400 44 java.util.HashMap::indexFor (6 bytes)
    Event: 0.339 Thread 0x00650400 nmethod 44 0x027ea408 code [0x027ea500, 0x027ea570]
    Event: 0.339 Thread 0x00650400 45 java.io.DataOutputStream::writeUTF (435 bytes)
    Event: 0.340 Thread 0x00650400 nmethod 45 0x027ea5c8 code [0x027ea7b0, 0x027eb27c]
    Event: 0.340 Thread 0x00650400 46 java.lang.ref.Reference::get (5 bytes)
    Event: 0.340 Thread 0x00650400 nmethod 46 0x027ebf08 code [0x027ec000, 0x027ec080]
    Event: 0.340 Thread 0x00650400 47 java.lang.String::startsWith (7 bytes)
    Event: 0.340 Thread 0x00650400 nmethod 47 0x027ec0c8 code [0x027ec1c0, 0x027ec25c]
    Event: 0.342 Thread 0x00650400 48 sun.misc.MetaIndex::mayContain (51 bytes)
    Event: 0.342 Thread 0x00650400 nmethod 48 0x027ec2c8 code [0x027ec3f0, 0x027ec578]

    GC Heap History (0 events):
    No events

    Deoptimization events (0 events):
    No events

    Internal exceptions (10 events):
    Event: 0.328 Thread 0x0020c400 Threw 0x24a1eda8 at C:\re\jdk7u80\2329\hotspot\src\share\vm\prims\jvm.cpp:1319
    Event: 0.337 Thread 0x0020c400 Threw 0x24a2b2d0 at C:\re\jdk7u80\2329\hotspot\src\share\vm\prims\jvm.cpp:1319
    Event: 0.340 Thread 0x0020c400 Threw 0x24a38640 at C:\re\jdk7u80\2329\hotspot\src\share\vm\prims\jvm.cpp:1319
    Event: 0.340 Thread 0x0020c400 Threw 0x24a3a930 at C:\re\jdk7u80\2329\hotspot\src\share\vm\prims\jvm.cpp:1319
    Event: 0.341 Thread 0x0020c400 Threw 0x24a43fa8 at C:\re\jdk7u80\2329\hotspot\src\share\vm\prims\jvm.cpp:1319
    Event: 0.341 Thread 0x0020c400 Threw 0x24a50db0 at C:\re\jdk7u80\2329\hotspot\src\share\vm\prims\jvm.cpp:1319
    Event: 0.341 Thread 0x0020c400 Threw 0x24a52a38 at C:\re\jdk7u80\2329\hotspot\src\share\vm\prims\jvm.cpp:1319
    Event: 0.342 Thread 0x0020c400 Threw 0x24a54c60 at C:\re\jdk7u80\2329\hotspot\src\share\vm\prims\jvm.cpp:1319
    Event: 0.342 Thread 0x0020c400 Threw 0x24a56f10 at C:\re\jdk7u80\2329\hotspot\src\share\vm\prims\jvm.cpp:1319
    Event: 0.342 Thread 0x0020c400 Threw 0x24a59230 at C:\re\jdk7u80\2329\hotspot\src\share\vm\prims\jvm.cpp:1319

    Events (10 events):
    Event: 0.341 loading class 0x04e61a78
    Event: 0.341 loading class 0x04e61a78 done
    Event: 0.342 loading class 0x04e61ab0
    Event: 0.342 loading class 0x04e61ab0 done
    Event: 0.342 loading class 0x04e61b90
    Event: 0.342 loading class 0x04e61b90 done
    Event: 0.342 loading class 0x04e61bc8
    Event: 0.342 loading class 0x04e61bc8 done
    Event: 0.343 loading class 0x39e075f0
    Event: 0.343 loading class 0x39e075f0 done

    Dynamic libraries:
    0x01110000 - 0x0113f000 C:\Program Files (x86)\Java\jre7\bin\javaw.exe
    0x77cd0000 - 0x77e50000 C:\windows\SysWOW64\ntdll.dll
    0x775a0000 - 0x776b0000 C:\windows\syswow64\kernel32.dll
    0x76690000 - 0x766d7000 C:\windows\syswow64\KERNELBASE.dll
    0x76eb0000 - 0x76f50000 C:\windows\syswow64\ADVAPI32.dll
    0x769e0000 - 0x76a8c000 C:\windows\syswow64\msvcrt.dll
    0x77000000 - 0x77019000 C:\windows\SysWOW64\sechost.dll
    0x77440000 - 0x77530000 C:\windows\syswow64\RPCRT4.dll
    0x753a0000 - 0x75400000 C:\windows\syswow64\SspiCli.dll
    0x75390000 - 0x7539c000 C:\windows\syswow64\CRYPTBASE.dll
    0x772b0000 - 0x773b0000 C:\windows\syswow64\USER32.dll
    0x77700000 - 0x77790000 C:\windows\syswow64\GDI32.dll
    0x76b30000 - 0x76b3a000 C:\windows\syswow64\LPK.dll
    0x76400000 - 0x7649d000 C:\windows\syswow64\USP10.dll
    0x71bf0000 - 0x71d8e000 C:\windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7600.16661_none_420fe3fa2b8113bd\COMCTL32.dll
    0x76d70000 - 0x76dc7000 C:\windows\syswow64\SHLWAPI.dll
    0x76dd0000 - 0x76e30000 C:\windows\system32\IMM32.DLL
    0x761d0000 - 0x7629c000 C:\windows\syswow64\MSCTF.dll
    0x73690000 - 0x736b9000 C:\windows\SysWOW64\nvinit.dll
    0x73d10000 - 0x73d19000 C:\windows\system32\VERSION.dll
    0x6cdb0000 - 0x6cdb6000 C:\Program Files (x86)\NVIDIA Corporation\CoProcManager\detoured.dll
    0x6c530000 - 0x6c561000 C:\Program Files (x86)\NVIDIA Corporation\CoProcManager\nvd3d9wrap.dll
    0x764a0000 - 0x7663d000 C:\windows\syswow64\SETUPAPI.dll
    0x77570000 - 0x77597000 C:\windows\syswow64\CFGMGR32.dll
    0x75400000 - 0x7548f000 C:\windows\syswow64\OLEAUT32.dll
    0x762a0000 - 0x763fc000 C:\windows\syswow64\ole32.dll
    0x769c0000 - 0x769d2000 C:\windows\syswow64\DEVOBJ.dll
    0x6c510000 - 0x6c530000 C:\Program Files (x86)\NVIDIA Corporation\CoProcManager\nvdxgiwrap.dll
    0x00280000 - 0x0033f000 C:\Program Files (x86)\Java\jre7\bin\msvcr100.dll
    0x6db80000 - 0x6df0b000 C:\Program Files (x86)\Java\jre7\bin\client\jvm.dll
    0x73790000 - 0x73797000 C:\windows\system32\WSOCK32.dll
    0x77530000 - 0x77565000 C:\windows\syswow64\WS2_32.dll
    0x77ca0000 - 0x77ca6000 C:\windows\syswow64\NSI.dll
    0x76fb0000 - 0x76fe2000 C:\windows\syswow64\WINMM.dll
    0x76b20000 - 0x76b25000 C:\windows\syswow64\PSAPI.DLL
    0x53710000 - 0x5371c000 C:\Program Files (x86)\Java\jre7\bin\verify.dll
    0x6c870000 - 0x6c891000 C:\Program Files (x86)\Java\jre7\bin\java.dll
    0x6e170000 - 0x6e183000 C:\Program Files (x86)\Java\jre7\bin\zip.dll
    0x6f390000 - 0x6f3a6000 C:\windows\system32\CRYPTSP.dll
    0x6f350000 - 0x6f38b000 C:\windows\system32\rsaenh.dll
    0x73ce0000 - 0x73cf7000 C:\windows\system32\USERENV.dll
    0x73cd0000 - 0x73cdb000 C:\windows\system32\profapi.dll
    0x6da70000 - 0x6da84000 C:\Program Files (x86)\Java\jre7\bin\net.dll
    0x6f740000 - 0x6f77c000 C:\windows\system32\mswsock.dll
    0x6f5f0000 - 0x6f5f6000 C:\windows\System32\wship6.dll
    0x73b60000 - 0x73b7c000 C:\windows\system32\IPHLPAPI.DLL
    0x73b50000 - 0x73b57000 C:\windows\system32\WINNSI.DLL
    0x73880000 - 0x73892000 C:\windows\system32\dhcpcsvc.DLL
    0x737a0000 - 0x737ad000 C:\windows\system32\dhcpcsvc6.DLL
    0x53800000 - 0x5380f000 C:\Program Files (x86)\Java\jre7\bin\nio.dll
    0x10000000 - 0x10055000 C:\Users\lxl\AppData\Local\Temp\jna3813887800273882531.dll
    0x0f830000 - 0x0f849000 D:\workspace\CallDll\dllCgen.dll
    0x71a30000 - 0x71a7a000 C:\windows\SYSTEM32\MSCOREE.DLL
    0x0f2e0000 - 0x0f452000 C:\windows\system32\MSVCR100D.dll
    0x0fd60000 - 0x0fe17000 C:\windows\system32\MSVCP100D.dll
    0x719b0000 - 0x71a2a000 C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscoreei.dll
    0x679b0000 - 0x68042000 C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
    0x678d0000 - 0x679a3000 C:\windows\system32\MSVCR110_CLR0400.dll
    0x66910000 - 0x678cf000 C:\windows\assembly\NativeImages_v4.0.30319_32\mscorlib\51e2934144ba15628ba5a31be2dae7dc\mscorlib.ni.dll
    0x63a00000 - 0x63a6e000 C:\Windows\Microsoft.NET\Framework\v4.0.30319\clrjit.dll
    0x5d2c0000 - 0x5d394000 C:\Windows\Microsoft.NET\Framework\v4.0.30319\diasymreader.dll
    0x65f90000 - 0x66909000 C:\windows\assembly\NativeImages_v4.0.30319_32\System\e40da7a49f8c3f0108e7c835b342f382\System.ni.dll
    0x6e460000 - 0x6e54b000 C:\windows\system32\dbghelp.dll

    VM Arguments:
    jvm_args: -Djava.library.path=D:\workspace\CallDll -Dfile.encoding=GBK
    java_command: Platform.apptest
    Launcher Type: SUN_STANDARD

    Environment Variables:
    JAVA_HOME=C:\Program Files\Java\jdk1.7.0_80
    CLASSPATH=.;C:\Program Files\Java\jdk1.7.0_80\lib; ;C:\Program Files\Java\jdk1.7.0_80\lib\dt.jar;JAVA_HOME\lib\tools.jar;
    PATH=C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\IVI Foundation\IVI\bin;C:\Program Files\IVI Foundation\IVI\bin;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin\;C:\Program Files\IVI Foundation\VISA\Win64\Bin\;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\IVI Foundation\IVI\bin;C:\Program Files\IVI Foundation\IVI\bin;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin\;C:\Program Files\IVI Foundation\VISA\Win64\Bin\;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Java\jdk1.7.0_80\bin;C:\Program Files (x86)\MySQL\MySQL Server 5.5\bin;
    USERNAME=lxl
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 94 Stepping 3, GenuineIntel

    --------------- S Y S T E M ---------------

    OS: Windows 7 , 64 bit Build 7600

    CPU:total 8 (4 cores per cpu, 2 threads per core) family 6 model 94 stepping 3, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, erms, ht, tsc, tscinvbit

    Memory: 4k page, physical 7793964k(2118040k free), swap 15586024k(8278552k free)

    vm_info: Java HotSpot(TM) Client VM (24.80-b11) for windows-x86 JRE (1.7.0_80-b15), built on Apr 10 2015 13:33:35 by "java_re" with unknown MS VC++:1600

    time: Sat May 27 13:57:48 2017
    elapsed time: 0 seconds

    点赞 评论 复制链接分享

为你推荐