EXCEPTION_ACCESS_VIOLATION
843829Mar 2 2005 — edited Sep 23 2006I'm having problems while using JNI with Visual C++ and interfacing with an existing DLL. The java application generates an EXCEPTION ACCESS VIOLATION error as soon as the dll function is called. Please, see log report below.
I have ran the same application (using only C++) and calling the same dll function with no errors. I've checked the forum for similar errors and it looks that many people have encountered the same problem with no specific resolution.
I suspect the problem is with the JNI. Can you please help? Thank you.
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x77c42a16, pid=2036, tid=2356
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_01-b08 mixed mode, sharing)
# Problematic frame:
# C [MSVCRT.dll+0x32a16]
#
--------------- T H R E A D ---------------
Current thread (0x00036010): JavaThread "main" [_thread_in_native, id=2356]
siginfo: ExceptionCode=0xc0000005, reading address 0x00000010
Registers:
EAX=0x00000010, EBX=0x00000073, ECX=0x7ffffffe, EDX=0x0007f902
ESP=0x0007f604, EBP=0x0007f870, ESI=0x0007f64c, EDI=0x10084761
EIP=0x77c42a16, EFLAGS=0x00010202
Top of Stack: (sp=0x0007f604)
0x0007f604: 10084853 0007f8fc 00000000 000327a0
0x0007f614: 10001832 000327a0 000360cc 00000007
0x0007f624: 00000000 00192808 00000000 00000000
0x0007f634: 00000000 00000000 0007f88c 10084761
0x0007f644: 00000000 0007f660 00000007 00000000
0x0007f654: 00000010 ffffffff 0007f8c0 00000000
0x0007f664: 00000000 00000000 00000000 00000000
0x0007f674: 6c616974 00000000 00000000 00000000
Instructions: (pc=0x77c42a16)
0x77c42a06: 77 89 85 e4 fd ff ff 8b 85 e4 fd ff ff eb 07 49
0x77c42a16: 80 38 00 74 05 40 85 c9 75 f5 2b 85 e4 fd ff ff
Stack: [0x00040000,0x00080000), sp=0x0007f604, free space=253k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [MSVCRT.dll+0x32a16]
C [MSVCRT.dll+0x2f962]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j EapiTest.initializeEapi()I+0
j EapiTest.main([Ljava/lang/String;)V+25
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x00a6c070 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=1348]
0x00a6ac48 JavaThread "CompilerThread0" daemon [_thread_blocked, id=2796]
0x00a69f90 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2784]
0x0003f3c0 JavaThread "Finalizer" daemon [_thread_blocked, id=2792]
0x0003e008 JavaThread "Reference Handler" daemon [_thread_blocked, id=2772]
=>0x00036010 JavaThread "main" [_thread_in_native, id=2356]
Other Threads:
0x00a66f28 VMThread [id=2776]
0x00a6d2b8 WatcherThread [id=1352]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 576K, used 149K [0x22a70000, 0x22b10000, 0x22f50000)
eden space 512K, 29% used [0x22a70000, 0x22a954d0, 0x22af0000)
from space 64K, 0% used [0x22af0000, 0x22af0000, 0x22b00000)
to space 64K, 0% used [0x22b00000, 0x22b00000, 0x22b10000)
tenured generation total 1408K, used 0K [0x22f50000, 0x230b0000, 0x26a70000)
the space 1408K, 0% used [0x22f50000, 0x22f50000, 0x22f50200, 0x230b0000)
compacting perm gen total 8192K, used 15K [0x26a70000, 0x27270000, 0x2aa70000)
the space 8192K, 0% used [0x26a70000, 0x26a73fd0, 0x26a74000, 0x27270000)
ro space 8192K, 66% used [0x2aa70000, 0x2afc8580, 0x2afc8600, 0x2b270000)
rw space 12288K, 46% used [0x2b270000, 0x2b804aa8, 0x2b804c00, 0x2be70000)
Dynamic libraries:
0x00400000 - 0x0040c000 C:\java\j2sdk\bin\java.exe
0x7c900000 - 0x7c9b0000 C:\WINDOWS\system32\ntdll.dll
0x7c800000 - 0x7c8f4000 C:\WINDOWS\system32\kernel32.dll
0x77dd0000 - 0x77e6b000 C:\WINDOWS\system32\ADVAPI32.dll
0x77e70000 - 0x77f01000 C:\WINDOWS\system32\RPCRT4.dll
0x77c10000 - 0x77c68000 C:\WINDOWS\system32\MSVCRT.dll
0x6d6b0000 - 0x6d835000 C:\java\j2sdk\jre\bin\client\jvm.dll
0x77d40000 - 0x77dd0000 C:\WINDOWS\system32\USER32.dll
0x77f10000 - 0x77f56000 C:\WINDOWS\system32\GDI32.dll
0x76b40000 - 0x76b6d000 C:\WINDOWS\system32\WINMM.dll
0x6d2f0000 - 0x6d2f8000 C:\java\j2sdk\jre\bin\hpi.dll
0x76bf0000 - 0x76bfb000 C:\WINDOWS\system32\PSAPI.DLL
0x6d680000 - 0x6d68c000 C:\java\j2sdk\jre\bin\verify.dll
0x6d370000 - 0x6d38d000 C:\java\j2sdk\jre\bin\java.dll
0x6d6a0000 - 0x6d6af000 C:\java\j2sdk\jre\bin\zip.dll
0x10000000 - 0x100e8000 C:\Maurice\eapi\apiWrapper\Eapi.dll
0x02c50000 - 0x02c92000 C:\Maurice\eapi\TipcoLib\tipc50.dll
0x02ca0000 - 0x02cea000 C:\Maurice\eapi\TipcoLib\tutil50.dll
0x774e0000 - 0x7761d000 C:\WINDOWS\system32\ole32.dll
0x71ab0000 - 0x71ac7000 C:\WINDOWS\system32\WS2_32.dll
0x71aa0000 - 0x71aa8000 C:\WINDOWS\system32\WS2HELP.dll
0x02cf0000 - 0x02cff000 C:\Maurice\eapi\TipcoLib\tipcl50.dll
0x02d00000 - 0x02d09000 C:\Maurice\eapi\TipcoLib\tmetal50.dll
0x71a50000 - 0x71a8f000 C:\WINDOWS\system32\MSWSOCK.dll
0x02d10000 - 0x02d1a000 C:\Maurice\eapi\TipcoLib\tedm50.dll
0x02d20000 - 0x02d28000 C:\Maurice\eapi\TipcoLib\tsubj50.dll
0x02d30000 - 0x02d60000 C:\Maurice\eapi\TipcoLib\tmsg50.dll
0x02d60000 - 0x02d77000 C:\Maurice\eapi\TipcoLib\tconn50.dll
0x02d80000 - 0x02d87000 C:\Maurice\eapi\TipcoLib\tsm50.dll
0x76080000 - 0x760e5000 C:\WINDOWS\system32\MSVCP60.dll
0x02d90000 - 0x02da1000 C:\WINDOWS\system32\MSVCIRT.dll
VM Arguments:
java_command: EapiTest
Environment Variables:
CLASSPATH=.;C:\java\j2sdk\lib;C:\sun\AppServer\lib\endorsed
PATH=C:\util;C:\java\j2sdk\bin;C:\WINDOWS\system32;C:\WINDOWS\;C:\Maurice\eapi\TipcoLib;C:\Maurice\eapi\lib;C:\PROGRA~1\MICROS~3\Common\msdev98\BIN;C:\PROGRA~1\MICROS~3\VC98\BIN;C:\PROGRA~1\MICROS~3\Common\TOOLS\WINNT;C:\PROGRA~1\MICROS~3\Common\TOOLS;
USERNAME=Maurice
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 7, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows XP Build 2600 Service Pack 2
CPU:total 1 family 15, cmov, cx8, fxsr, mmx, sse, sse2, ht
Memory: 4k page, physical 515568k(247184k free), swap 1258296k(1023456k free)
vm_info: Java HotSpot(TM) Client VM (1.5.0_01-b08) for windows-x86, built on Dec 6 2004 19:51:00 by "java_re" with MS VC++ 6.0