Results 1 to 2 of 2
  1. #1
    xihad is offline Member
    Join Date
    Apr 2009
    Location
    Bangladesh
    Posts
    2
    Rep Power
    0

    Default EXCEPTION_ACCESS_VIOLATION on Windows 7 32 bit

    Using the code provided here: Generic HID Host Applications in JAVA i am trying to transfer data via USB port using Java. It works fine in Windows XP 32bit OS. But when i try to invoke the same interrupt method for sending output report under windows 7 32bit OS environment, JNI crashes Outsite JVM. here is the crash report:

    Java Code:
    #
    # A fatal error has been detected by the Java Runtime Environment:
    #
    #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x76f02d37, pid=4368, tid=5296
    #
    # JRE version: 7.0_02-b13
    # Java VM: Java HotSpot(TM) Client VM (22.0-b10 mixed mode, sharing windows-x86 )
    # Problematic frame:
    # C  [ntdll.dll+0x52d37]
    #
    # 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.sun.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 (0x03da9c00):  JavaThread "AWT-EventQueue-0" [_thread_in_native, id=5296, stack(0x04ff0000,0x05040000)]
    
    siginfo: ExceptionCode=0xc0000005, reading address 0x07f050a4
    
    Registers:
    EAX=0x3ce70e7c, EBX=0x03d64610, ECX=0x04080000, EDX=0x03d64610
    ESP=0x0503e7d4, EBP=0x0503e808, ESI=0x07f050a0, EDI=0x03d64608
    EIP=0x76f02d37, EFLAGS=0x00010206
    
    Top of Stack: (sp=0x0503e7d4)
    0x0503e7d4:   00000000 04080000 03d64610 00000000
    0x0503e7e4:   00000438 0503e7d8 01391990 0503e844
    0x0503e7f4:   76ece0ed 030aee99 fffffffe 0503e810
    0x0503e804:   03d64608 0503e820 76f02ce8 03d64610
    0x0503e814:   03da9c00 00000000 03d64608 0503e834
    0x0503e824:   754cbbe4 04080000 00000000 03d64610
    0x0503e834:   0503e880 5bf54c39 04080000 00000000
    0x0503e844:   03d64610 f3a57af1 03da9c00 03d64610 
    
    Instructions: (pc=0x76f02d37)
    0x76f02d17:   7a f8 80 7f 07 05 0f 84 fe f1 03 00 8b 07 8b f7
    0x76f02d27:   c1 ee 03 33 f0 33 35 dc 71 f8 76 89 7d fc 33 f1
    0x76f02d37:   8b 46 04 89 45 f4 c6 47 07 80 c6 47 06 00 8b 5e
    0x76f02d47:   08 8b 4e 0c 89 5d e0 83 c3 01 89 4d e4 83 d1 01 
    
    
    Register to memory mapping:
    
    EAX=0x3ce70e7c is an unknown value
    EBX=0x03d64610 is an unknown value
    ECX=0x04080000 is an unknown value
    EDX=0x03d64610 is an unknown value
    ESP=0x0503e7d4 is pointing into the stack for thread: 0x03da9c00
    EBP=0x0503e808 is pointing into the stack for thread: 0x03da9c00
    ESI=0x07f050a0 is an unknown value
    EDI=0x03d64608 is an unknown value
    
    
    Stack: [0x04ff0000,0x05040000],  sp=0x0503e7d4,  free space=313k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C  [ntdll.dll+0x52d37]  RtlFreeHeap+0xcd
    C  [ntdll.dll+0x52ce8]  RtlFreeHeap+0x7e
    C  [kernel32.dll+0x4bbe4]  HeapFree+0x14
    C  [MSVCR80.dll+0x4c39]  free+0xcd
    C  [Wrapper.dll+0x1383]  Java_MyHID_IntSendOutputReport+0x63
    j  Test.doIntSet()V+11
    j  Test$7.actionPerformed(Ljava/awt/event/ActionEvent;)V+4
    j  javax.swing.AbstractButton.fireActionPerformed(Ljava/awt/event/ActionEvent;)V+84
    j  javax.swing.AbstractButton$Handler.actionPerformed(Ljava/awt/event/ActionEvent;)V+5
    j  javax.swing.DefaultButtonModel.fireActionPerformed(Ljava/awt/event/ActionEvent;)V+35
    j  javax.swing.DefaultButtonModel.setPressed(Z)V+117
    j  javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Ljava/awt/event/MouseEvent;)V+35
    j  java.awt.Component.processMouseEvent(Ljava/awt/event/MouseEvent;)V+64
    j  javax.swing.JComponent.processMouseEvent(Ljava/awt/event/MouseEvent;)V+23
    j  java.awt.Component.processEvent(Ljava/awt/AWTEvent;)V+81
    j  java.awt.Container.processEvent(Ljava/awt/AWTEvent;)V+18
    j  java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V+581
    J  java.awt.Container.dispatchEventImpl(Ljava/awt/AWTEvent;)V
    j  java.awt.LightweightDispatcher.dispatchEvent(Ljava/awt/AWTEvent;)Z+50
    J  java.awt.Container.dispatchEventImpl(Ljava/awt/AWTEvent;)V
    J  java.awt.EventQueue.dispatchEventImpl(Ljava/awt/AWTEvent;Ljava/lang/Object;)V
    V  [jvm.dll+0x123c0a]
    V  [jvm.dll+0x1c9e8e]
    V  [jvm.dll+0x123c8d]
    V  [jvm.dll+0xd404a]
    C  [java.dll+0x102f]  Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2+0x17
    J  java.security.ProtectionDomain$1.doIntersectionPrivilege(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;Ljava/security/AccessControlContext;)Ljava/lang/Object;
    j  java.awt.EventQueue$4.run()Ljava/lang/Void;+11
    j  java.awt.EventQueue$4.run()Ljava/lang/Object;+1
    v  ~StubRoutines::call_stub
    V  [jvm.dll+0x123c0a]
    V  [jvm.dll+0x1c9e8e]
    V  [jvm.dll+0x123c8d]
    V  [jvm.dll+0xd404a]
    C  [java.dll+0x102f]  Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2+0x17
    J  java.awt.EventQueue.dispatchEvent(Ljava/awt/AWTEvent;)V
    j  java.awt.EventDispatchThread.pumpEventsForHierarchy(ILjava/awt/Conditional;Ljava/awt/Component;)V+11
    j  java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V+4
    j  java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V+3
    j  java.awt.EventDispatchThread.run()V+9
    v  ~StubRoutines::call_stub
    V  [jvm.dll+0x123c0a]
    V  [jvm.dll+0x1c9e8e]
    V  [jvm.dll+0x123df3]
    V  [jvm.dll+0x123e57]
    V  [jvm.dll+0xcd90f]
    V  [jvm.dll+0x14394f]
    V  [jvm.dll+0x1720b9]
    C  [msvcr100.dll+0x5c6de]  endthreadex+0x3a
    C  [msvcr100.dll+0x5c788]  endthreadex+0xe4
    C  [kernel32.dll+0x53c45]  BaseThreadInitThunk+0x12
    C  [ntdll.dll+0x637f5]  RtlInitializeExceptionChain+0xef
    C  [ntdll.dll+0x637c8]  RtlInitializeExceptionChain+0xc2
    
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j  MyHID.IntSendOutputReport([B)Z+0
    j  Test.doIntSet()V+11
    j  Test$7.actionPerformed(Ljava/awt/event/ActionEvent;)V+4
    j  javax.swing.AbstractButton.fireActionPerformed(Ljava/awt/event/ActionEvent;)V+84
    j  javax.swing.AbstractButton$Handler.actionPerformed(Ljava/awt/event/ActionEvent;)V+5
    j  javax.swing.DefaultButtonModel.fireActionPerformed(Ljava/awt/event/ActionEvent;)V+35
    j  javax.swing.DefaultButtonModel.setPressed(Z)V+117
    j  javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Ljava/awt/event/MouseEvent;)V+35
    j  java.awt.Component.processMouseEvent(Ljava/awt/event/MouseEvent;)V+64
    j  javax.swing.JComponent.processMouseEvent(Ljava/awt/event/MouseEvent;)V+23
    j  java.awt.Component.processEvent(Ljava/awt/AWTEvent;)V+81
    j  java.awt.Container.processEvent(Ljava/awt/AWTEvent;)V+18
    j  java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V+581
    J  java.awt.Container.dispatchEventImpl(Ljava/awt/AWTEvent;)V
    J  java.awt.LightweightDispatcher.retargetMouseEvent(Ljava/awt/Component;ILjava/awt/event/MouseEvent;)V
    j  java.awt.LightweightDispatcher.processMouseEvent(Ljava/awt/event/MouseEvent;)Z+139
    j  java.awt.LightweightDispatcher.dispatchEvent(Ljava/awt/AWTEvent;)Z+50
    J  java.awt.Container.dispatchEventImpl(Ljava/awt/AWTEvent;)V
    j  java.awt.Window.dispatchEventImpl(Ljava/awt/AWTEvent;)V+19
    J  java.awt.EventQueue.dispatchEventImpl(Ljava/awt/AWTEvent;Ljava/lang/Object;)V
    J  java.awt.EventQueue$3.run()Ljava/lang/Object;
    v  ~StubRoutines::call_stub
    J  java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;
    J  java.security.ProtectionDomain$1.doIntersectionPrivilege(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;Ljava/security/AccessControlContext;)Ljava/lang/Object;
    j  java.security.ProtectionDomain$1.doIntersectionPrivilege(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;+6
    j  java.awt.EventQueue$4.run()Ljava/lang/Void;+11
    j  java.awt.EventQueue$4.run()Ljava/lang/Object;+1
    v  ~StubRoutines::call_stub
    J  java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;
    J  java.awt.EventQueue.dispatchEvent(Ljava/awt/AWTEvent;)V
    J  java.awt.EventDispatchThread.pumpOneEventForFilters(I)Z
    j  java.awt.EventDispatchThread.pumpEventsForFilter(ILjava/awt/Conditional;Ljava/awt/EventFilter;)V+35
    j  java.awt.EventDispatchThread.pumpEventsForHierarchy(ILjava/awt/Conditional;Ljava/awt/Component;)V+11
    j  java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V+4
    j  java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V+3
    j  java.awt.EventDispatchThread.run()V+9
    v  ~StubRoutines::call_stub
    
    ---------------  P R O C E S S  ---------------
    
    Java Threads: ( => current thread )
      0x001a9c00 JavaThread "DestroyJavaVM" [_thread_blocked, id=912, stack(0x01790000,0x017e0000)]
      0x03de3000 JavaThread "TimerQueue" daemon [_thread_blocked, id=336, stack(0x050a0000,0x050f0000)]
    =>0x03da9c00 JavaThread "AWT-EventQueue-0" [_thread_in_native, id=5296, stack(0x04ff0000,0x05040000)]
      0x03d7c400 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5596, stack(0x03b00000,0x03b50000)]
      0x03d7bc00 JavaThread "AWT-Shutdown" [_thread_blocked, id=5712, stack(0x041c0000,0x04210000)]
      0x03d79800 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5536, stack(0x039d0000,0x03a20000)]
      0x01397000 JavaThread "Service Thread" daemon [_thread_blocked, id=5668, stack(0x03d10000,0x03d60000)]
      0x0138d000 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=5656, stack(0x03a20000,0x03a70000)]
      0x01385400 JavaThread "Attach Listener" daemon [_thread_blocked, id=1872, stack(0x03cc0000,0x03d10000)]
      0x01382400 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=3304, stack(0x03b70000,0x03bc0000)]
      0x01372800 JavaThread "Finalizer" daemon [_thread_blocked, id=5592, stack(0x03bf0000,0x03c40000)]
      0x0136d000 JavaThread "Reference Handler" daemon [_thread_blocked, id=1832, stack(0x03ab0000,0x03b00000)]
    
    Other Threads:
      0x0136bc00 VMThread [stack: 0x03980000,0x039d0000] [id=6136]
      0x013b1000 WatcherThread [stack: 0x03900000,0x03950000] [id=5936]
    
    VM state:not at safepoint (normal execution)
    
    VM Mutex/Monitor currently owned by a thread: None
    
    Heap
     def new generation   total 4928K, used 4312K [0x23830000, 0x23d80000, 0x28d80000)
      eden space 4416K,  97% used [0x23830000, 0x23c66068, 0x23c80000)
      from space 512K,   0% used [0x23c80000, 0x23c80000, 0x23d00000)
      to   space 512K,   0% used [0x23d00000, 0x23d00000, 0x23d80000)
     tenured generation   total 10944K, used 0K [0x28d80000, 0x29830000, 0x33830000)
       the space 10944K,   0% used [0x28d80000, 0x28d80000, 0x28d80200, 0x29830000)
     compacting perm gen  total 12288K, used 926K [0x33830000, 0x34430000, 0x37830000)
       the space 12288K,   7% used [0x33830000, 0x33917a00, 0x33917a00, 0x34430000)
        ro space 10240K,  42% used [0x37830000, 0x37c6d448, 0x37c6d600, 0x38230000)
        rw space 12288K,  54% used [0x38230000, 0x388ae0c0, 0x388ae200, 0x38e30000)
    
    Code Cache  [0x01900000, 0x019f8000, 0x03900000)
     total_blobs=543 nmethods=329 adapters=150 free_code_cache=31800Kb largest_free_block=32563264
    
    Dynamic libraries:
    0x013e0000 - 0x0140f000 	C:\Program Files\Java\jre7\bin\javaw.exe
    0x76eb0000 - 0x76fec000 	C:\Windows\SYSTEM32\ntdll.dll
    0x75480000 - 0x75554000 	C:\Windows\system32\kernel32.dll
    0x75220000 - 0x7526a000 	C:\Windows\system32\KERNELBASE.dll
    0x77040000 - 0x770e0000 	C:\Windows\system32\ADVAPI32.dll
    0x75ab0000 - 0x75b5c000 	C:\Windows\system32\msvcrt.dll
    0x75a00000 - 0x75a19000 	C:\Windows\SYSTEM32\sechost.dll
    0x756c0000 - 0x75761000 	C:\Windows\system32\RPCRT4.dll
    0x75e60000 - 0x75f29000 	C:\Windows\system32\USER32.dll
    0x76ff0000 - 0x7703e000 	C:\Windows\system32\GDI32.dll
    0x75cb0000 - 0x75cba000 	C:\Windows\system32\LPK.dll
    0x75b90000 - 0x75c2d000 	C:\Windows\system32\USP10.dll
    0x73c90000 - 0x73e2e000 	C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2\COMCTL32.dll
    0x75770000 - 0x757c7000 	C:\Windows\system32\SHLWAPI.dll
    0x759e0000 - 0x759ff000 	C:\Windows\system32\IMM32.DLL
    0x76090000 - 0x7615c000 	C:\Windows\system32\MSCTF.dll
    0x5f6b0000 - 0x5f76e000 	C:\Program Files\Java\jre7\bin\msvcr100.dll
    0x56f70000 - 0x57298000 	C:\Program Files\Java\jre7\bin\client\jvm.dll
    0x71170000 - 0x71177000 	C:\Windows\system32\WSOCK32.dll
    0x75440000 - 0x75475000 	C:\Windows\system32\WS2_32.dll
    0x76160000 - 0x76166000 	C:\Windows\system32\NSI.dll
    0x70bb0000 - 0x70be2000 	C:\Windows\system32\WINMM.dll
    0x76250000 - 0x76255000 	C:\Windows\system32\PSAPI.DLL
    0x73ed0000 - 0x73edc000 	C:\Program Files\Java\jre7\bin\verify.dll
    0x6d300000 - 0x6d320000 	C:\Program Files\Java\jre7\bin\java.dll
    0x6d3d0000 - 0x6d3e3000 	C:\Program Files\Java\jre7\bin\zip.dll
    0x10000000 - 0x10006000 	C:\Users\Brute Force\Downloads\HIDApplication\Wrapper.dll
    0x73730000 - 0x73739000 	C:\Windows\system32\HID.DLL
    0x75cc0000 - 0x75e5d000 	C:\Windows\system32\SETUPAPI.dll
    0x751f0000 - 0x75217000 	C:\Windows\system32\CFGMGR32.dll
    0x76170000 - 0x761ff000 	C:\Windows\system32\OLEAUT32.dll
    0x75f30000 - 0x7608c000 	C:\Windows\system32\ole32.dll
    0x75080000 - 0x75092000 	C:\Windows\system32\DEVOBJ.dll
    0x5bf50000 - 0x5bfeb000 	C:\Windows\WinSxS\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4940_none_d08cc06a442b34fc\MSVCR80.dll
    0x58490000 - 0x585d2000 	C:\Program Files\Java\jre7\bin\awt.dll
    0x73e60000 - 0x73ea0000 	C:\Windows\system32\uxtheme.dll
    0x72a00000 - 0x72a20000 	C:\PROGRA~1\Raptr\ltc_help32-57991.dll
    0x76260000 - 0x76eaa000 	C:\Windows\system32\SHELL32.dll
    0x751c0000 - 0x751ed000 	C:\Windows\system32\WINTRUST.dll
    0x750a0000 - 0x751bd000 	C:\Windows\system32\CRYPT32.dll
    0x75070000 - 0x7507c000 	C:\Windows\system32\MSASN1.dll
    0x73710000 - 0x73723000 	C:\Windows\system32\dwmapi.dll
    0x74f80000 - 0x74f8c000 	C:\Windows\system32\CRYPTBASE.dll
    0x686d0000 - 0x686fa000 	C:\Program Files\Java\jre7\bin\fontmanager.dll
    0x68740000 - 0x68754000 	C:\Program Files\Java\jre7\bin\net.dll
    0x74a70000 - 0x74aac000 	C:\Windows\system32\mswsock.dll
    0x74a60000 - 0x74a66000 	C:\Windows\System32\wship6.dll
    0x73f20000 - 0x73f2f000 	C:\Program Files\Java\jre7\bin\nio.dll
    0x62600000 - 0x62631000 	C:\Program Files\Java\jre7\bin\t2k.dll
    0x05570000 - 0x05649000 	C:\Program Files\QuestBasic\questbasic.dll
    0x755c0000 - 0x756b5000 	C:\Windows\system32\WININET.dll
    0x75300000 - 0x75436000 	C:\Windows\system32\urlmon.dll
    0x757d0000 - 0x759cb000 	C:\Windows\system32\iertutil.dll
    0x71740000 - 0x71752000 	C:\Windows\system32\MPR.dll
    0x734b0000 - 0x734c1000 	C:\Windows\system32\NETAPI32.dll
    0x734a0000 - 0x734a9000 	C:\Windows\system32\netutils.dll
    0x74cc0000 - 0x74cd9000 	C:\Windows\system32\srvcli.dll
    0x73490000 - 0x7349f000 	C:\Windows\system32\wkscli.dll
    0x73480000 - 0x7348f000 	C:\Windows\system32\SAMCLI.DLL
    0x75a20000 - 0x75aa3000 	C:\Windows\system32\CLBCatQ.DLL
    0x735e0000 - 0x736db000 	C:\Windows\system32\WindowsCodecs.dll
    0x74f30000 - 0x74f7c000 	C:\Windows\system32\apphelp.dll
    0x70ae0000 - 0x70af2000 	C:\Program Files\Common Files\TortoiseOverlays\TortoiseOverlays.dll
    0x70ad0000 - 0x70add000 	C:\Program Files\TortoiseSVN\bin\TortoiseStub32.dll
    0x70650000 - 0x706bc000 	C:\Program Files\TortoiseSVN\bin\TortoiseSVN32.dll
    0x74500000 - 0x74509000 	C:\Windows\system32\VERSION.dll
    0x70330000 - 0x70610000 	C:\Program Files\TortoiseSVN\bin\libsvn_tsvn32.dll
    0x6fe30000 - 0x6fe54000 	C:\Program Files\TortoiseSVN\bin\libapr_tsvn32.dll
    0x6fbf0000 - 0x6fc26000 	C:\Program Files\TortoiseSVN\bin\libaprutil_tsvn32.dll
    0x76200000 - 0x76245000 	C:\Windows\system32\WLDAP32.dll
    0x6fbe0000 - 0x6fbed000 	C:\Program Files\TortoiseSVN\bin\intl3_tsvn32.dll
    0x6fbc0000 - 0x6fbd3000 	C:\Program Files\TortoiseSVN\bin\libsasl32.dll
    0x74dd0000 - 0x74dd8000 	C:\Windows\system32\Secur32.dll
    0x74f10000 - 0x74f2b000 	C:\Windows\system32\SSPICLI.DLL
    0x6fb50000 - 0x6fbb9000 	C:\Windows\system32\MSVCP100.dll
    0x04090000 - 0x040a7000 	C:\Users\Brute Force\AppData\Roaming\Dropbox\bin\DropboxExt.14.dll
    0x6fa00000 - 0x6faeb000 	C:\Windows\system32\dbghelp.dll
    0x7c3a0000 - 0x7c41b000 	C:\Users\Brute Force\AppData\Roaming\Dropbox\bin\MSVCP71.dll
    0x7c340000 - 0x7c396000 	C:\Users\Brute Force\AppData\Roaming\Dropbox\bin\MSVCR71.dll
    0x6f9b0000 - 0x6f9e1000 	C:\Windows\system32\EhStorShell.dll
    0x73f40000 - 0x74035000 	C:\Windows\system32\PROPSYS.dll
    0x6f190000 - 0x6f59b000 	C:\PROGRA~1\MICROS~2\Office14\GROOVEEX.DLL
    0x6f900000 - 0x6f9a3000 	C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4940_none_50916076bcb9a742\MSVCR90.dll
    0x6f870000 - 0x6f8fe000 	C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4940_none_50916076bcb9a742\MSVCP90.dll
    0x6f840000 - 0x6f86b000 	C:\Windows\WinSxS\x86_microsoft.vc90.atl_1fc8b3b9a1e18e3b_9.0.30729.4148_none_51ca66a2bbe76806\ATL90.DLL
    0x6ed80000 - 0x6f18f000 	C:\PROGRA~1\COMMON~1\MICROS~1\OFFICE14\Cultures\office.odf
    0x6e510000 - 0x6ed74000 	C:\PROGRA~1\MICROS~2\Office14\1033\GrooveIntlResource.dll
    0x6f600000 - 0x6f607000 	C:\Windows\system32\msiltcfg.dll
    0x6dfb0000 - 0x6e1f0000 	C:\Windows\system32\msi.dll
    0x6fb40000 - 0x6fb43000 	C:\Windows\system32\SFC.DLL
    0x6fb30000 - 0x6fb3d000 	C:\Windows\system32\sfc_os.DLL
    
    VM Arguments:
    java_command: C:\Users\Brute Force\Downloads\HIDApplication\Test.jar
    Launcher Type: SUN_STANDARD
    
    Environment Variables:
    PATH=C:\WinAVR-20100110\bin;C:\WinAVR-20100110\utils\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\DMIX;C:\Program Files\Calibre2\;C:\Program Files\TortoiseSVN\bin
    USERNAME=Brute Force
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 6 Model 37 Stepping 5, GenuineIntel
    
    
    
    ---------------  S Y S T E M  ---------------
    
    OS: Windows 7 Build 7601 Service Pack 1
    
    CPU:total 4 (2 cores per cpu, 2 threads per core) family 6 model 37 stepping 5, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, ht
    
    Memory: 4k page, physical 3331408k(941780k free), swap 6661060k(3823908k free)
    
    vm_info: Java HotSpot(TM) Client VM (22.0-b10) for windows-x86 JRE (1.7.0_02-b13), built on Nov 17 2011 17:17:32 by "java_re" with unknown MS VC++:1600
    
    time: Sun Apr 01 14:03:03 2012
    elapsed time: 46 seconds
    This is the native function which causes the JNI crash outside JVM:


    Java Code:
     JNIEXPORT jboolean JNICALL Java_MyHID_IntSendOutputReport(JNIEnv *jEnv, jobject     jObj, jbyteArray outputReport)
           {
        boolean Result = false;
        byte *buffer = new byte[Capabilities.OutputReportByteLength];
        jboolean isCopy = JNI_TRUE;
        buffer = (byte*)jEnv->GetByteArrayElements(outputReport, &isCopy);
    
        /*
        API Function: WriteFile
        Sends a report to the device.
        Returns: success or failure.
        Requires:
        A device handle returned by CreateFile.
        A buffer that holds the report.
        The Output Report length returned by HidP_GetCaps,
        A variable to hold the number of bytes written.
        */
    
        DWORD BytesWritten = 0;
        if (WriteHandle != INVALID_HANDLE_VALUE) Result = WriteFile
                                                            (WriteHandle, 
                                                            buffer, 
                                                            Capabilities.OutputReportByteLength, 
                                                            &BytesWritten, 
                                                            NULL);
    
        delete buffer;
        return Result;
    }
    any help would be greatly appreciated . thanks

  2. #2
    xihad is offline Member
    Join Date
    Apr 2009
    Location
    Bangladesh
    Posts
    2
    Rep Power
    0

    Default Re: EXCEPTION_ACCESS_VIOLATION on Windows 7 32 bit

    Never mind. found the solution. the problem was with the poorly written native function. the modified function is given below:

    Java Code:
    JNIEXPORT jboolean JNICALL Java_MyHID_IntSendOutputReport(JNIEnv *jEnv, jobject jObj, jbyteArray outputReport)
    {
    	boolean Result = false;
    	jbyte *buffer;
    	jboolean isCopy = JNI_TRUE;
    	buffer = (jbyte*)jEnv->GetByteArrayElements(outputReport, &isCopy);
    
    	/*
    	API Function: WriteFile
    	Sends a report to the device.
    	Returns: success or failure.
    	Requires:
    	A device handle returned by CreateFile.
    	A buffer that holds the report.
    	The Output Report length returned by HidP_GetCaps,
    	A variable to hold the number of bytes written.
    	*/
    
    	DWORD BytesWritten = 0;
    	if (WriteHandle != INVALID_HANDLE_VALUE) Result = WriteFile
    														(WriteHandle, 
    														buffer, 
    														Capabilities.OutputReportByteLength, 
    														&BytesWritten, 
    														NULL);
    	if(isCopy){
    	jEnv->ReleaseByteArrayElements(outputReport,buffer, JNI_ABORT);
    	}
    	return Result;
    }

Similar Threads

  1. EXCEPTION_ACCESS_VIOLATION in "AWT-Windows"
    By rremedios in forum AWT / Swing
    Replies: 0
    Last Post: 02-01-2012, 02:47 PM
  2. Exception_access_violation
    By midlandmonkey in forum Java Servlet
    Replies: 1
    Last Post: 06-21-2011, 10:48 AM
  3. Exception_access_violation
    By Solarsonic in forum New To Java
    Replies: 5
    Last Post: 05-12-2011, 11:33 PM
  4. EXCEPTION_ACCESS_VIOLATION on Windows 7 64 bit OS
    By itsraghu in forum Advanced Java
    Replies: 6
    Last Post: 06-04-2010, 05:09 PM
  5. Exception_access_violation
    By naveen.panc in forum JavaServer Pages (JSP) and JSTL
    Replies: 3
    Last Post: 11-15-2008, 01:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •