Exception Access Violation

1.7k Views Asked by At

I followed the tutorial located here. https://www3.ntu.edu.sg/home/ehchua/programming/java/JavaNativeInterface.html (The 2.1 step) I used Cygwin with GCC v4 btw.

After having completed the tutorial, I received an error. I already tried reinstalling Java. I lowered the level in UAC.

Any thoughts?

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

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000001801238e7, pid=2232, tid=5880

 JRE version: 6.0_45-b06
 Java VM: Java HotSpot(TM) 64-Bit Server VM (20.45-b01 mixed mode windows-amd64 compressed oops)
Problematic frame:
C  [cygwin1.dll+0xe38e7]

If you would like to submit a bug report, please visit:
http://java.sun.com/webapps/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 (0x00000000008db800):  JavaThread "main" [_thread_in_native, id=5880, stack(0x00000000024b0000,0x00000000025b0000)]

siginfo: ExceptionCode=0xc0000005, writing address 0x0000000000000000

Registers:
RAX=0x0000000000000000, RBX=0x000000077fc77920, RCX=0x0000000491123030, RDX=0x00000000025afa28
RSP=0x00000000025af960, RBP=0x00000000025af990, RSI=0x000000077fc77628, RDI=0x0000000020000021
R8 =0x0000000000000001, R9 =0x0000000000000002, R10=0x00000000025b0000, R11=0x00000004911210ac
R12=0x0000000000000000, R13=0x000000077fc77920, R14=0x00000000025afa28, R15=0x00000000008db800
RIP=0x00000001801238e7, EFLAGS=0x0000000000010202

Top of Stack: (sp=0x00000000025af960)
0x00000000025af960:   000000018018e680 00000001801238fb
0x00000000025af970:   000000077fc77920 00000000025afa08
0x00000000025af980:   000000077fc77628 0000000020000021
0x00000000025af990:   00000000025afa08 00000000029c1386
0x00000000025af9a0:   00000000008db9d0 00000000025afa28
0x00000000025af9b0:   00000000025af900 00000000008db800
0x00000000025af9c0:   00000000029b5b22 00000000025af9c8
0x00000000025af9d0:   000000077fc77920 00000000025afa28
0x00000000025af9e0:   000000077fc77e40 0000000000000000
0x00000000025af9f0:   000000077fc77920 0000000000000000
0x00000000025afa00:   00000000025afa28 00000000025afa70
0x00000000025afa10:   00000000029b5b22 0000000000000000
0x00000000025afa20:   00000000029be358 00000007d6ee2228
0x00000000025afa30:   00000000025afa30 000000077fc77a07
0x00000000025afa40:   00000000025afa80 000000077fc77e40
0x00000000025afa50:   0000000000000000 000000077fc77a10 

Instructions: (pc=0x00000001801238e7)
0x00000001801238c7:   04 f3 90 eb e3 48 c7 c0 08 00 00 00 49 0f c1 82
0x00000001801238d7:   f0 e3 ff ff 4c 8d 1d 19 00 00 00 4c 87 5c 24 08
0x00000001801238e7:   4c 89 18 41 ff 82 e4 e3 ff ff 41 ff 8a ec e3 ff
0x00000001801238f7:   ff 58 ff e0 65 4c 8b 14 25 08 00 00 00 41 bb 01 


Register to memory mapping:

RAX=0x0000000000000000 is an unknown value
RBX=0x000000077fc77920 is an oop
{method} 
- klass: {other class}
RCX=0x0000000491123030 is an unknown value
RDX=0x00000000025afa28 is pointing into the stack for thread: 0x00000000008db800
RSP=0x00000000025af960 is pointing into the stack for thread: 0x00000000008db800
RBP=0x00000000025af990 is pointing into the stack for thread: 0x00000000008db800
RSI=0x000000077fc77628 is an oop
{constant pool} 
- klass: {other class}
- cache: 0x000000077fc77e40
-   1 :  : klass_index=7 name_and_type_index=18
-   2 :  : 'HelloJNI' {0x7fc77b78}
-   3 :  : klass_index=2 name_and_type_index=18
-   4 :  : klass_index=2 name_and_type_index=20
-   5 :  : "hello" {0x7fc77ee8}
-   6 :  : klass_index=22 name_and_type_index=23
-   7 :  : 'java/lang/Object' {0x7fa08e58}
-   8 :  : '<init>'
-   9 :  : '()V'
-  10 :  : 'Code'
-  11 :  : 'LineNumberTable'
-  12 :  : 'sayHello'
-  13 :  : 'main'
-  14 :  : '([Ljava/lang/String;)V'
-  15 :  : '<clinit>'
-  16 :  : 'SourceFile'
-  17 :  : 'HelloJNI.java'
-  18 :  : name_index=8 signature_index=9
-  19 :  : 'HelloJNI'
-  20 :  : name_index=12 signature_index=9
-  21 :  : 'hello'
-  22 :  : 'java/lang/System' {0x7fa2fac8}
-  23 :  : name_index=26 signature_index=27
-  24 :  : 'java/lang/Object'
-  25 :  : 'java/lang/System'
-  26 :  : 'loadLibrary'
-  27 :  : '(Ljava/lang/String;)V'

RDI=0x0000000020000021 is an unknown value
R8 =0x0000000000000001 is an unknown value
R9 =0x0000000000000002 is an unknown value
R10=0x00000000025b0000 is pointing into the stack for thread: 0x00000000008db800
R11=0x00000004911210ac is an unknown value
R12=0x0000000000000000 is an unknown value
R13=0x000000077fc77920 is an oop
{method} 
- klass: {other class}
R14=0x00000000025afa28 is pointing into the stack for thread: 0x00000000008db800
R15=0x00000000008db800 is a thread


Stack: [0x00000000024b0000,0x00000000025b0000],  sp=0x00000000025af960,  free space=1022k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [cygwin1.dll+0xe38e7]  issetugid+0xff47
j  HelloJNI.sayHello()V+0
j  HelloJNI.main([Ljava/lang/String;)V+7
v  ~StubRoutines::call_stub
V  [jvm.dll+0x1eac57]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  HelloJNI.sayHello()V+0
j  HelloJNI.main([Ljava/lang/String;)V+7
v  ~StubRoutines::call_stub

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

Java Threads: ( => current thread )
0x0000000006d1f000 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=7104, stack(0x00000000072b0000,0x00000000073b0000)]
0x0000000006d1c800 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=7144, stack(0x00000000071b0000,0x00000000072b0000)]
0x0000000006d0a000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=7116, stack(0x00000000070b0000,0x00000000071b0000)]
0x0000000006d07000 JavaThread "Attach Listener" daemon [_thread_blocked, id=4148, stack(0x0000000006fb0000,0x00000000070b0000)]
0x0000000006cb1000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=6576, stack(0x0000000006eb0000,0x0000000006fb0000)]
0x00000000007dc000 JavaThread "Finalizer" daemon [_thread_blocked, id=7088, stack(0x0000000006bb0000,0x0000000006cb0000)]
0x00000000007d4000 JavaThread "Reference Handler" daemon [_thread_blocked, id=5632, stack(0x0000000006ab0000,0x0000000006bb0000)]
=>0x00000000008db800 JavaThread "main" [_thread_in_native, id=5880, stack(0x00000000024b0000,0x00000000025b0000)]

Other Threads:
 0x00000000007cc000 VMThread [stack: 0x00000000069b0000,0x0000000006ab0000] [id=6764]
 0x0000000006d31000 WatcherThread [stack: 0x00000000073b0000,0x00000000074b0000] [id=2844]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
PSYoungGen      total 36800K, used 631K [0x00000007d6eb0000, 0x00000007d97c0000, 0x0000000800000000)
eden space 31552K, 2% used [0x00000007d6eb0000,0x00000007d6f4dc38,0x00000007d8d80000)
from space 5248K, 0% used [0x00000007d92a0000,0x00000007d92a0000,0x00000007d97c0000)
to   space 5248K, 0% used [0x00000007d8d80000,0x00000007d8d80000,0x00000007d92a0000)
PSOldGen        total 84160K, used 0K [0x0000000784c00000, 0x0000000789e30000, 0x00000007d6eb0000)
object space 84160K, 0% used [0x0000000784c00000,0x0000000784c00000,0x0000000789e30000)
PSPermGen       total 21248K, used 2527K [0x000000077fa00000, 0x0000000780ec0000, 0x0000000784c00000)
object space 21248K, 11% used [0x000000077fa00000,0x000000077fc77f60,0x0000000780ec0000)

Code Cache  [0x00000000029b0000, 0x0000000002c20000, 0x00000000059b0000)
total_blobs=153 nmethods=0 adapters=120 free_code_cache=49951360 largest_free_block=0

Dynamic libraries:
0x0000000000400000 - 0x000000000042f000     C:\windows\system32\java.exe
0x0000000077920000 - 0x0000000077ac9000     C:\windows\SYSTEM32\ntdll.dll
0x0000000077800000 - 0x000000007791f000     C:\windows\system32\kernel32.dll
0x000007fefd800000 - 0x000007fefd86c000     C:\windows\system32\KERNELBASE.dll
0x0000000075480000 - 0x0000000075507000     C:\windows\System32\SYSFER.DLL
0x000007fefe380000 - 0x000007fefe45b000     C:\windows\system32\ADVAPI32.dll
0x000007fefe4f0000 - 0x000007fefe58f000     C:\windows\system32\msvcrt.dll
0x000007fefdb20000 - 0x000007fefdb3f000     C:\windows\SYSTEM32\sechost.dll
0x000007feff6a0000 - 0x000007feff7cd000     C:\windows\system32\RPCRT4.dll
0x000000006d830000 - 0x000000006dfec000     C:\Program Files\Java\jre6\bin\server\jvm.dll
0x0000000077700000 - 0x00000000777fa000     C:\windows\system32\USER32.dll
0x000007feff320000 - 0x000007feff387000     C:\windows\system32\GDI32.dll
0x000007feff820000 - 0x000007feff82e000     C:\windows\system32\LPK.dll
0x000007fefdc20000 - 0x000007fefdce9000     C:\windows\system32\USP10.dll
0x000007fefb2a0000 - 0x000007fefb2db000     C:\windows\system32\WINMM.dll
0x000007feff670000 - 0x000007feff69e000     C:\windows\system32\IMM32.DLL
0x000007fefdfe0000 - 0x000007fefe0e9000     C:\windows\system32\MSCTF.dll
0x000000006d7a0000 - 0x000000006d7ae000     C:\Program Files\Java\jre6\bin\verify.dll
0x000000006d3c0000 - 0x000000006d3e7000     C:\Program Files\Java\jre6\bin\java.dll
0x000000006d7f0000 - 0x000000006d802000     C:\Program Files\Java\jre6\bin\zip.dll
0x0000000491120000 - 0x0000000491138000     C:\MHBK\JNI3\hello.dll
0x0000000180040000 - 0x0000000180610000     C:\cygwin64\bin\cygwin1.dll
0x0000000077af0000 - 0x0000000077af7000     C:\windows\system32\PSAPI.DLL

VM Arguments:
java_command: HelloJNI
Launcher Type: SUN_STANDARD

Environment Variables:
JAVA_HOME=C:\Program Files\Java\jdk1.6.0_45\bin
JRE_HOME=C:\Program Files\Java\jre6
PATH=C:\cygwin64\usr\local\bin;C:\cygwin64\bin;C:\windows\system32 C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0;C:\Program Files\IBM\Infoprint Select;C:\Program Files\ThinkPad\Bluetooth Software;C:\Program Files\ThinkPad\Bluetooth Software\syswow64;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files (x86)\Lenovo\Access Connections;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Java\jdk1.6.0_45\bin;C:\cygwin64\bin;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files\Java\jdk1.6.0_45\bin;C:\Program Files\Java\jre6\bin
USERNAME= *________*
SHELL=/bin/bash
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 58 Stepping 9, GenuineIntel



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

OS: Windows 7 , 64 bit Build 7601 Service Pack 1

CPU:total 4 (2 cores per cpu, 2 threads per core) family 6 model 58     stepping 9, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, ht

Memory: 4k page, physical 8077104k(5526276k free), swap 16152344k(13452236k free)

vm_info: Java HotSpot(TM) 64-Bit Server VM (20.45-b01) for windows-amd64 JRE (1.6.0_45-b06), built on Apr  1 2013 12:31:37 by "java_re" with MS VC++ 8.0 (VS2005)

time: Wed Jun 10 03:25:35 2015
elapsed time: 0 seconds
1

There are 1 best solutions below

0
On

It appears to be a bug in Java

This issue could be seen due to User Account Control (UAC) feature enabled on Windows Vista or Windows 7 operating system.

UAC is enabled by default in Windows Vista and Windows 7, as a result, you might encounter some compatibility problems with different applications that have not yet been updated for the Windows UAC component

Temporarily disabling UAC may resolve the exception access issue, however, >turning off UAC reduces the security of your system. We do not recommend leaving UAC disabled.