dcsimg
JNI - EXCEPTION_ACCESS_VIOLATION (0xc0000005)
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   sam_kan
Posted On:   Thursday, March 30, 2006 08:30 AM

Hi I am trying to access a COM dll through JNI from my java file. when i run the java file it gives an EXCEPTION_ACCESS_VIOLATION (0xc0000005),the contents of log file is An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x2C6BE4F Function=_output+0x60F Library=C:Program FilesMicrosoft Visual StudioMyProjectsCppJNIDebugCppJNI.dll Source file = output.c : 707 Current Java thread: at TestJNI.AddDefect(Native Method) at TestJNI.main(TestJNI.java:14) Dynamic libraries: 0x00400000 - 0x00406000 C:WINDOWSsystem32java.exe 0x7C900000 - 0x7C9B0000 C:WINDO   More>>

Hi
I am trying to access a COM dll through JNI from my java file. when i run the java file it gives an EXCEPTION_ACCESS_VIOLATION (0xc0000005),the contents of log file is

			
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x2C6BE4F
Function=_output+0x60F
Library=C:Program FilesMicrosoft Visual StudioMyProjectsCppJNIDebugCppJNI.dll
Source file = output.c : 707


Current Java thread:
at TestJNI.AddDefect(Native Method)
at TestJNI.main(TestJNI.java:14)

Dynamic libraries:
0x00400000 - 0x00406000 C:WINDOWSsystem32java.exe
0x7C900000 - 0x7C9B0000 C:WINDOWSsystem32
tdll.dll
0x7C800000 - 0x7C8F4000 C:WINDOWSsystem32kernel32.dll
0x77DD0000 - 0x77E6B000 C:WINDOWSsystem32ADVAPI32.dll
0x77E70000 - 0x77F01000 C:WINDOWSsystem32RPCRT4.dll
0x77C10000 - 0x77C68000 C:WINDOWSsystem32MSVCRT.dll
0x08000000 - 0x08138000 C:Program FilesJavaj2re1.4.2_04 inclientjvm.dll
0x77D40000 - 0x77DD0000 C:WINDOWSsystem32USER32.dll
0x77F10000 - 0x77F57000 C:WINDOWSsystem32GDI32.dll
0x76B40000 - 0x76B6D000 C:WINDOWSsystem32WINMM.dll
0x10000000 - 0x10007000 C:Program FilesJavaj2re1.4.2_04 inhpi.dll
0x00390000 - 0x0039E000 C:Program FilesJavaj2re1.4.2_04 inverify.dll
0x003B0000 - 0x003C9000 C:Program FilesJavaj2re1.4.2_04 injava.dll
0x003D0000 - 0x003DD000 C:Program FilesJavaj2re1.4.2_04 inzip.dll
0x02C60000 - 0x02C9D000 C:Program FilesMicrosoft Visual StudioMyProjectsCppJNIDebugCppJNI.dll
0x774E0000 - 0x7761D000 C:WINDOWSsystem32ole32.dll
0x77120000 - 0x771AC000 C:WINDOWSsystem32OLEAUT32.dll
0x76C90000 - 0x76CB8000 C:WINDOWSsystem32imagehlp.dll
0x59A60000 - 0x59B01000 C:WINDOWSsystem32DBGHELP.dll
0x77C00000 - 0x77C08000 C:WINDOWSsystem32VERSION.dll
0x76BF0000 - 0x76BFB000 C:WINDOWSsystem32PSAPI.DLL

Heap at VM Abort:
Heap
def new generation total 576K, used 117K [0x10010000, 0x100b0000, 0x104f0000)
eden space 512K, 22% used [0x10010000, 0x1002d4e8, 0x10090000)
from space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000)
to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000)
tenured generation total 1408K, used 0K [0x104f0000, 0x10650000, 0x14010000)
the space 1408K, 0% used [0x104f0000, 0x104f0000, 0x104f0200, 0x10650000)
compacting perm gen total 4096K, used 938K [0x14010000, 0x14410000, 0x18010000)
the space 4096K, 22% used [0x14010000, 0x140fa8c0, 0x140faa00, 0x14410000)

Local Time = Thu Mar 30 17:34:58 2006
Elapsed Time = 0
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode)
#

Any help will be much appreciated.

Thanks
S.K    <<Less

Re: JNI - EXCEPTION_ACCESS_VIOLATION (0xc0000005)

Posted By:   surender_singh  
Posted On:   Friday, June 16, 2006 12:21 AM

it looks to me that your native opengl codes caused an error in terms of memory access.

if you've coded this in JNI, you may want to check your C/C++ codes. Access violations are due to programs accessing memory addresses that the operating system did not assign the program to. You may want to check your pointers and make sure you did not do mistakes like deleting the pointer twice.

If you did not anything related to JNI, it's possible that the fault lies in the java's architecture.

i'm not 100% sure about this problem, but i'm trying to help as much as i can. i hope someone else with experience might come to your aid.

Re: JNI - EXCEPTION_ACCESS_VIOLATION (0xc0000005)

Posted By:   neeta_joseph  
Posted On:   Tuesday, April 11, 2006 12:11 AM

I too have gone through this problem while working on JNI..i dnt exactly remember the solution.it can be becoz of the api's you use in the other language which you call from java.Are you using some registry api's?if so if the acess privileges are not properly set it will give you this error.

plz do let me know if you get the solution in some other way
regs
neeta
About | Sitemap | Contact