Hello Timothy and all,
JNA overall is working grealty for me, but a few times it does crashes VM,
like a frequent call of toArray, and maybe even just some random call to
user32 functions(frequent and rapid calls).
INPUT[] inputs = (INPUT[])new INPUT().toArray(2);
I am not sure if there's anythign wrong with this statement. Because this
sometimes works for me, sometimes crashes VM. By the way, before creating
new INPUT, this method also does VirtuaAlloc and VirtualFree to access other
process's window control, not sure if that might affect it.
Here's the VM log:
Current thread (0x003f5c00): JavaThread "main" [_thread_in_native, id=2524,
stack(0x008d0000,0x00920000)]
siginfo: ExceptionCode=0xc0000005, reading address 0xfffffff8
Stack: [0x008d0000,0x00920000], sp=0x0091f34c, free space=316k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native
code)
C [ntdll.dll+0x11404]
C [msvcrt.dll+0x1c3c9]
C [msvcrt.dll+0x1c3e7]
C [msvcrt.dll+0x1c42e]
C [jna27658.tmp+0x5e1d]
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::StubRoutines (1)
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::StubRoutines (1)
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::StubRoutines (1)