JVM JNI dll crashed - java

I have a JNI dll built, if I use debug VC++ 2010 Express, it worked fine. If I use Release build, it crashed JVM.
This cmd: java -Djava.library.path=D:\charlie\tmp\SendKeys\x64\Debug SendKeys
worked.
This cmd:>java -Djava.library.path=D:\charlie\tmp\SendKeys\x64\Release -Dsun.java2d.d3d=false SendKeys
and cmd: >java -Djava.library.path=D:\charlie\tmp\SendKeys\x64\Release SendKeys failed. Please help.
C++ native code(MS VC++ 2010 express), & in 64bits OS:
BOOL __stdcall InitializeWinIo()
{
BOOL bResult = false;
DWORD dwBytesReturned;
g_Is64BitOS = Is64BitOS();
hDriver = CreateFile(L"\\\\.\\WINIO",GENERIC_READ | GENERIC_WRITE,
0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,NULL);
// If the driver is not running, install it
if (hDriver == INVALID_HANDLE_VALUE)
{
printf("WINIO driver is not running!\n");
GetDriverPath();
bResult = InstallWinIoDriver(szWinIoDriverPath, true);
if (!bResult)
return FALSE;
bResult = StartWinIoDriver();
if (!bResult)
{
printf("ERROR: WINIO driver can not be started!\n");
return FALSE;
}
else
{
printf("OK: WINIO driver has been started!\n");
}
hDriver = CreateFile(L"\\\\.\\WINIO",
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL,OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL);
if (hDriver == INVALID_HANDLE_VALUE)
{
printf("ERROR: WINIO driver running status can not be confirmed!\n");
return FALSE;
}
else
{
printf("ERROR: WINIO driver running status has been confirmed!\n");
}
}
else
{
printf("WINIO driver is happily running!\n");
}
// Enable I/O port access for this process if running on a 32 bit OS
if (!g_Is64BitOS)
{
printf("CRITICAL not a 64 bits system\n");
if (!DeviceIoControl(hDriver, IOCTL_WINIO_ENABLEDIRECTIO, NULL,
0, NULL, 0, &dwBytesReturned, NULL))
{
printf("ERROR: can not enable I/O access in 32 bits system\n");
return FALSE;
}
}
else
{
printf("OK a perfect 64 bits system\n");
}
IsWinIoInitialized = TRUE;
return TRUE;
}
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000000000055b6, pid=4396, tid=9552
#
# JRE version: Java(TM) SE Runtime Environment (7.0_80-b15) (build 1.7.0_80-b15)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.80-b11 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C 0x00000000000055b6
#
# 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.java.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 (0x00000000034c0800): JavaThread "main" [_thread_in_native, id=9552, stack(0x00000000033a0000,0x00000000034a0000)]
siginfo: ExceptionCode=0xc0000005, ExceptionInformation=0x0000000000000008 0x00000000000055b6
Registers:
RAX=0x00007ff6457b1780, RBX=0x000000077c8686e8, RCX=0x00007ff6457b43e0, RDX=0x000000000349f760
RSP=0x000000000349f6b8, RBP=0x000000000349f750, RSI=0x00000000ef8eccd3, RDI=0x00000000035c60f8
R8 =0x0000000000000000, R9 =0x0000000003508ec0, R10=0x00000000035d3124, R11=0x0000000072ba4b50
R12=0x0000000000000000, R13=0x000000077c8686e8, R14=0x000000000349f768, R15=0x00000000034c0800
RIP=0x00000000000055b6, EFLAGS=0x0000000000010206
Top of Stack: (sp=0x000000000349f6b8)
0x000000000349f6b8: 00007ff6457b1791 00000000ffffff00
0x000000000349f6c8: 00000000034c0800 000000077c8686e8
0x000000000349f6d8: 0000000000000000 00000007d5d598a8
0x000000000349f6e8: 00000000035d3150 0000000000000001
0x000000000349f6f8: 0000000000000000 00000000034c0800
0x000000000349f708: 000000000349f7c0 000000000349f710
0x000000000349f718: 000000077c8686e8 000000000349f768
0x000000000349f728: 000000077c869518 0000000000000000
0x000000000349f738: 000000077c8686e8 0000000000000000
0x000000000349f748: 000000000349f770 000000000349f7b0
0x000000000349f758: 00000000035c63f0 00000007d5d962b8
0x000000000349f768: 00000000035cf0c0 000000000349f770
0x000000000349f778: 000000077c8688b3 000000000349f7c0
0x000000000349f788: 000000077c869518 0000000000000000
0x000000000349f798: 000000077c868978 000000000349f770
0x000000000349f7a8: 000000000349f7c8 000000000349f808
Instructions: (pc=0x00000000000055b6)
0x0000000000005596:
[error occurred during error reporting (printing registers, top of stack, instructions near pc), id 0xc0000005]
Register to memory mapping:
RAX=0x00007ff6457b1780 is an unknown value
RBX=0x000000077c8686e8 is an oop
{method}
- klass: {other class}
RCX=0x00007ff6457b43e0 is an unknown value
RDX=0x000000000349f760 is pointing into the stack for thread: 0x00000000034c0800
RSP=0x000000000349f6b8 is pointing into the stack for thread: 0x00000000034c0800
RBP=0x000000000349f750 is pointing into the stack for thread: 0x00000000034c0800
RSI=0x00000000ef8eccd3 is an unknown value
RDI=0x00000000035c60f8 is at code_begin+2520 in an Interpreter codelet
return entry points [0x00000000035c5720, 0x00000000035c7520] 7680 bytes
R8 =0x0000000000000000 is an unknown value
R9 =0x0000000003508ec0 is an unknown value
R10=0x00000000035d3124 is at code_begin+644 in an Interpreter codelet
method entry point (kind = native) [0x00000000035d2ea0, 0x00000000035d3740] 2208 bytes
R11=0x0000000072ba4b50 is an unknown value
R12=0x0000000000000000 is an unknown value
R13=0x000000077c8686e8 is an oop
{method}
- klass: {other class}
R14=0x000000000349f768 is pointing into the stack for thread: 0x00000000034c0800
R15=0x00000000034c0800 is a thread
Stack: [0x00000000033a0000,0x00000000034a0000], sp=0x000000000349f6b8, free space=1021k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C 0x00000000000055b6
j SendKeys.init()Z+19
j SendKeys.main([Ljava/lang/String;)V+27
v ~StubRoutines::call_stub
V [jvm.dll+0x1d03d3]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j SendKeys.initializeWinIO()Z+0
j SendKeys.init()Z+19
j SendKeys.main([Ljava/lang/String;)V+27
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x000000000b94b800 JavaThread "Service Thread" daemon [_thread_blocked, id=5812, stack(0x000000000d0a0000,0x000000000d1a0000)]
0x000000000b941800 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=7764, stack(0x000000000cfa0000,0x000000000d0a0000)]
0x000000000b93f000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=9736, stack(0x000000000cea0000,0x000000000cfa0000)]
0x000000000b93e000 JavaThread "Attach Listener" daemon [_thread_blocked, id=6772, stack(0x000000000cda0000,0x000000000cea0000)]
0x000000000b93b000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=10512, stack(0x000000000cca0000,0x000000000cda0000)]
0x000000000b8ee000 JavaThread "Finalizer" daemon [_thread_blocked, id=9768, stack(0x000000000cba0000,0x000000000cca0000)]
0x000000000b8e5000 JavaThread "Reference Handler" daemon [_thread_blocked, id=7876, stack(0x000000000caa0000,0x000000000cba0000)]
=>0x00000000034c0800 JavaThread "main" [_thread_in_native, id=9552, stack(0x00000000033a0000,0x00000000034a0000)]
Other Threads:
0x000000000b8e0000 VMThread [stack: 0x000000000c9a0000,0x000000000caa0000] [id=11044]
0x000000000b964800 WatcherThread [stack: 0x000000000d1a0000,0x000000000d2a0000] [id=8160]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
PSYoungGen total 38400K, used 1331K [0x00000007d5d00000, 0x00000007d8780000, 0x0000000800000000)
eden space 33280K, 4% used [0x00000007d5d00000,0x00000007d5e4cdb8,0x00000007d7d80000)
from space 5120K, 0% used [0x00000007d8280000,0x00000007d8280000,0x00000007d8780000)
to space 5120K, 0% used [0x00000007d7d80000,0x00000007d7d80000,0x00000007d8280000)
ParOldGen total 86016K, used 0K [0x0000000781800000, 0x0000000786c00000, 0x00000007d5d00000)
object space 86016K, 0% used [0x0000000781800000,0x0000000781800000,0x0000000786c00000)
PSPermGen total 21504K, used 2473K [0x000000077c600000, 0x000000077db00000, 0x0000000781800000)
object space 21504K, 11% used [0x000000077c600000,0x000000077c86a618,0x000000077db00000)
Card table byte_map: [0x0000000006680000,0x0000000006aa0000] byte_map_base: 0x0000000002a9d000
Polling page: 0x0000000001aa0000
Code Cache [0x00000000035c0000, 0x0000000003830000, 0x00000000065c0000)
total_blobs=169 nmethods=0 adapters=137 free_code_cache=48771Kb largest_free_block=49942400
Compilation events (0 events):
No events
GC Heap History (0 events):
No events
Deoptimization events (0 events):
No events
Internal exceptions (2 events):
Event: 0.085 Thread 0x00000000034c0800 Threw 0x00000007d5d0f620 at C:\re\jdk7u80\2329\hotspot\src\share\vm\prims\jni.cpp:3991
Event: 0.365 Thread 0x00000000034c0800 Threw 0x00000007d5d91630 at C:\re\jdk7u80\2329\hotspot\src\share\vm\prims\jvm.cpp:1319
Events (10 events):
Event: 0.369 loading class 0x00000000034c9380
Event: 0.369 loading class 0x00000000034c9380 done
Event: 0.369 loading class 0x000000000352a970
Event: 0.369 loading class 0x000000000352a970 done
Event: 0.369 loading class 0x0000000003506550
Event: 0.369 loading class 0x0000000003506550 done
Event: 0.370 loading class 0x00000000035121b0
Event: 0.370 loading class 0x00000000035121b0 done
Event: 0.370 loading class 0x0000000003512150
Event: 0.370 loading class 0x0000000003512150 done
Dynamic libraries:
0x00007ff6fef00000 - 0x00007ff6fef33000 C:\WINDOWS\system32\java.exe
0x00007ff9ef7d0000 - 0x00007ff9ef9a1000 C:\WINDOWS\SYSTEM32\ntdll.dll
0x00007ff9ef640000 - 0x00007ff9ef6eb000 C:\WINDOWS\System32\KERNEL32.DLL
0x00007ff9ec0c0000 - 0x00007ff9ec2dd000 C:\WINDOWS\System32\KERNELBASE.dll
0x00007ff9eee60000 - 0x00007ff9eef02000 C:\WINDOWS\System32\ADVAPI32.dll
0x00007ff9ecd60000 - 0x00007ff9ecdfe000 C:\WINDOWS\System32\msvcrt.dll
0x00007ff9ee3d0000 - 0x00007ff9ee429000 C:\WINDOWS\System32\sechost.dll
0x00007ff9eeb60000 - 0x00007ff9eec81000 C:\WINDOWS\System32\RPCRT4.dll
0x00007ff9ee8b0000 - 0x00007ff9eea15000 C:\WINDOWS\System32\USER32.dll
0x00007ff9ec030000 - 0x00007ff9ec04e000 C:\WINDOWS\System32\win32u.dll
0x00007ff9ece10000 - 0x00007ff9ece44000 C:\WINDOWS\System32\GDI32.dll
0x00007ff9ecbd0000 - 0x00007ff9ecd52000 C:\WINDOWS\System32\gdi32full.dll
0x00007ff9dcc70000 - 0x00007ff9dceea000 C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.14393.953_none_42151e83c686086b\COMCTL32.dll
0x00007ff9ee550000 - 0x00007ff9ee818000 C:\WINDOWS\System32\combase.dll
0x00007ff9ecad0000 - 0x00007ff9ecbc5000 C:\WINDOWS\System32\ucrtbase.dll
0x00007ff9ec050000 - 0x00007ff9ec0ba000 C:\WINDOWS\System32\bcryptPrimitives.dll
0x00007ff9ef7a0000 - 0x00007ff9ef7ce000 C:\WINDOWS\System32\IMM32.DLL
0x0000000073670000 - 0x0000000073742000 C:\charlie\Java\jre7\bin\msvcr100.dll
0x00000000729c0000 - 0x0000000073199000 C:\charlie\Java\jre7\bin\server\jvm.dll
0x00007ff9eec90000 - 0x00007ff9eec98000 C:\WINDOWS\System32\PSAPI.DLL
0x00007ff9e8590000 - 0x00007ff9e8599000 C:\WINDOWS\system32\WSOCK32.dll
0x00007ff9ee360000 - 0x00007ff9ee3ca000 C:\WINDOWS\System32\WS2_32.dll
0x00007ff9e9eb0000 - 0x00007ff9e9ed3000 C:\WINDOWS\system32\WINMM.dll
0x00007ff9e9e70000 - 0x00007ff9e9e9b000 C:\WINDOWS\system32\WINMMBASE.dll
0x00007ff9ebcc0000 - 0x00007ff9ebd02000 C:\WINDOWS\System32\cfgmgr32.dll
0x0000000073660000 - 0x000000007366f000 C:\charlie\Java\jre7\bin\verify.dll
0x0000000073630000 - 0x0000000073658000 C:\charlie\Java\jre7\bin\java.dll
0x0000000073610000 - 0x0000000073626000 C:\charlie\Java\jre7\bin\zip.dll
0x00007ff6457b0000 - 0x00007ff6457ca000 D:\charlie\tmp\SendKeys\x64\Release\SendKeys.dll
0x00007ff9e7150000 - 0x00007ff9e72e2000 C:\WINDOWS\system32\dbghelp.dll
VM Arguments:
jvm_args: -Djava.library.path=D:\charlie\tmp\SendKeys\x64\Release
java_command: SendKeys
Launcher Type: SUN_STANDARD
Environment Variables:
JAVA_HOME=C:\charlie\Java\jdk1.7.0_80
PATH=C:\Python27\;C:\Python27\Scripts;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files\TortoiseGit\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\MATLAB\MATLAB Runtime\v85\runtime\win64;C:\Program Files (x86)\PuTTY\;C:\Program Files\OpenVPN\bin;C:\Program Files (x86)\WinMerge;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;D:\charlie\tmp\SendKeys\x64\Debug\;C:\charlie\Java\jdk1.7.0_80\bin;C:\charlie\eclipse4.5.1\plugins\org.apache.ant_1.9.4.v201504302020\bin;C:\Program Files (x86)\MySQL\MySQL Server 5.5\bin;;C:\Users\charlie\AppData\Local\Microsoft\WindowsApps;C:\charlie\apache-maven-3.3.3\bin
USERNAME=charlie
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 61 Stepping 4, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows 8.1 , 64 bit Build 9600
CPU:total 4 (2 cores per cpu, 2 threads per core) family 6 model 61 stepping 4, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, erms, ht, tsc, tscinvbit
Memory: 4k page, physical 8289204k(3876444k free), swap 9599924k(3279704k free)
vm_info: Java HotSpot(TM) 64-Bit Server VM (24.80-b11) for windows-amd64 JRE (1.7.0_80-b15), built on Apr 10 2015 11:26:34 by "java_re" with unknown MS VC++:1600
time: Tue Apr 18 18:01:32 2017
elapsed time: 0 seconds

Related

EXCEPTION_ACCESS_VIOLATION at printing ticket

Im having this hs_err_pid when I try to print a ticket from Openbravo POS:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x77036018, pid=3436, tid=1096
#
# JRE version: 6.0_20-b02
# Java VM: Java HotSpot(TM) Client VM (16.3-b01 mixed mode, sharing windows-x86 )
# Problematic frame:
# C [ntdll.dll+0x56018]
#
# 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 (0x04a13c00): JavaThread "pool-1-thread-1" [_thread_in_native, id=1096, stack(0x04470000,0x044c0000)]
siginfo: ExceptionCode=0xc0000005, reading address 0x00000004
Registers:
EAX=0x002f1488, EBX=0x002c8200, ECX=0x00000000, EDX=0x0000a202
ESP=0x044bf874, EBP=0x044bf89c, ESI=0x002f1480, EDI=0x00270000
EIP=0x77036018, EFLAGS=0x00010246
Top of Stack: (sp=0x044bf874)
0x044bf874: 00270000 002c8200 00000000 53944b40
0x044bf884: 0000000a 044bf868 00000000 044bf984
0x044bf894: 76ffe115 00149a2e 044bf994 77036287
0x044bf8a4: 00270000 002f1480 044bf964 00000000
0x044bf8b4: 735c7ef2 00000000 00270000 002c8208
0x044bf8c4: 77032fe7 735c7e2a 00000008 00270194
0x044bf8d4: 00270000 00360024 00000050 fffffffe
0x044bf8e4: 77032fe7 00270000 00275908 00340025
Instructions: (pc=0x77036018)
0x77036008: 85 56 3b 03 00 8b 56 0c 8d 46 08 8b 08 89 4d f0
0x77036018: 8b 49 04 89 55 f4 8b 12 3b d1 0f 85 b7 55 fd ff
Stack: [0x04470000,0x044c0000], sp=0x044bf874, free space=13e044bf390k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [ntdll.dll+0x56018]
C [ntdll.dll+0x56287]
C [ntdll.dll+0x565a6]
C [kernel32.dll+0x4c484]
C [crtdll.dll+0xc4d7]
j gnu.io.LPRPort.writeArray([BII)V+0
j gnu.io.LPRPort$ParallelOutputStream.write([B)V+26
j com.openbravo.pos.printer.escpos.PrinterWritterRXTX.internalWrite([B)V+78
j com.openbravo.pos.printer.escpos.PrinterWritter$1.run()V+8
j java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Ljava/lang/Runnable;)V+59
j java.util.concurrent.ThreadPoolExecutor$Worker.run()V+28
j java.lang.Thread.run()V+11
v ~StubRoutines::call_stub
V [jvm.dll+0xf049c]
V [jvm.dll+0x17fcf1]
V [jvm.dll+0xf0667]
V [jvm.dll+0xf06dd]
V [jvm.dll+0x11a2a0]
V [jvm.dll+0x1ddb14]
V [jvm.dll+0x17f96c]
C [msvcr71.dll+0x9565]
C [kernel32.dll+0x4ee1c]
C [ntdll.dll+0x637eb]
C [ntdll.dll+0x637be]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j gnu.io.LPRPort.writeArray([BII)V+0
j gnu.io.LPRPort$ParallelOutputStream.write([B)V+26
j com.openbravo.pos.printer.escpos.PrinterWritterRXTX.internalWrite([B)V+78
j com.openbravo.pos.printer.escpos.PrinterWritter$1.run()V+8
j java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Ljava/lang/Runnable;)V+59
j java.util.concurrent.ThreadPoolExecutor$Worker.run()V+28
j java.lang.Thread.run()V+11
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x04acb000 JavaThread "Trident pulse source thread" daemon [_thread_blocked, id=3124, stack(0x04620000,0x04670000)]
0x04aca800 JavaThread "Trident callback thread" daemon [_thread_blocked, id=3412, stack(0x045d0000,0x04620000)]
0x04a16000 JavaThread "TimerQueue" daemon [_thread_blocked, id=2432, stack(0x044c0000,0x04510000)]
=>0x04a13c00 JavaThread "pool-1-thread-1" [_thread_in_native, id=1096, stack(0x04470000,0x044c0000)]
0x0129b000 JavaThread "DestroyJavaVM" [_thread_blocked, id=4004, stack(0x00370000,0x003c0000)]
0x01b8a000 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=2116, stack(0x04140000,0x04190000)]
0x01b89400 JavaThread "AWT-Windows" daemon [_thread_in_native, id=2840, stack(0x040f0000,0x04140000)]
0x01b88c00 JavaThread "AWT-Shutdown" [_thread_blocked, id=3044, stack(0x040a0000,0x040f0000)]
0x01b86800 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=3160, stack(0x04050000,0x040a0000)]
0x01ae7800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=2608, stack(0x03de0000,0x03e30000)]
0x01ae2800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=2476, stack(0x03d90000,0x03de0000)]
0x01ae1800 JavaThread "Attach Listener" daemon [_thread_blocked, id=2468, stack(0x03d40000,0x03d90000)]
0x01ade800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2204, stack(0x03cf0000,0x03d40000)]
0x01ad6800 JavaThread "Finalizer" daemon [_thread_blocked, id=4008, stack(0x03ca0000,0x03cf0000)]
0x01ad2000 JavaThread "Reference Handler" daemon [_thread_blocked, id=2976, stack(0x03c50000,0x03ca0000)]
Other Threads:
0x01ad0c00 VMThread [stack: 0x01240000,0x01290000] [id=2728]
0x01af1c00 WatcherThread [stack: 0x03e30000,0x03e80000] [id=3768]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 8320K, used 1394K [0x23ac0000, 0x243c0000, 0x29010000)
eden space 7424K, 10% used [0x23ac0000, 0x23b8ac98, 0x24200000)
from space 896K, 65% used [0x24200000, 0x24291f48, 0x242e0000)
to space 896K, 0% used [0x242e0000, 0x242e0000, 0x243c0000)
tenured generation total 18344K, used 16823K [0x29010000, 0x2a1fa000, 0x33ac0000)
the space 18344K, 91% used [0x29010000, 0x2a07dc38, 0x2a07de00, 0x2a1fa000)
compacting perm gen total 12288K, used 10625K [0x33ac0000, 0x346c0000, 0x37ac0000)
the space 12288K, 86% used [0x33ac0000, 0x345207e8, 0x34520800, 0x346c0000)
ro space 10240K, 51% used [0x37ac0000, 0x37feae00, 0x37feae00, 0x384c0000)
rw space 12288K, 54% used [0x384c0000, 0x38b572d8, 0x38b57400, 0x390c0000)
Dynamic libraries:
0x00400000 - 0x00424000 C:\Windows\system32\javaw.exe
0x76fe0000 - 0x7711c000 C:\Windows\SYSTEM32\ntdll.dll
0x75810000 - 0x758e4000 C:\Windows\system32\kernel32.dll
0x75140000 - 0x7518b000 C:\Windows\system32\KERNELBASE.dll
0x77130000 - 0x771d0000 C:\Windows\system32\ADVAPI32.dll
0x76b00000 - 0x76bac000 C:\Windows\system32\msvcrt.dll
0x767c0000 - 0x767d9000 C:\Windows\SYSTEM32\sechost.dll
0x769f0000 - 0x76a92000 C:\Windows\system32\RPCRT4.dll
0x75710000 - 0x757d9000 C:\Windows\system32\USER32.dll
0x767e0000 - 0x7682e000 C:\Windows\system32\GDI32.dll
0x75410000 - 0x7541a000 C:\Windows\system32\LPK.dll
0x76880000 - 0x7691d000 C:\Windows\system32\USP10.dll
0x756f0000 - 0x7570f000 C:\Windows\system32\IMM32.DLL
0x76920000 - 0x769ec000 C:\Windows\system32\MSCTF.dll
0x7c340000 - 0x7c396000 C:\Program Files\Java\jre6\bin\msvcr71.dll
0x6d800000 - 0x6da97000 C:\Program Files\Java\jre6\bin\client\jvm.dll
0x72780000 - 0x727b2000 C:\Windows\system32\WINMM.dll
0x74f30000 - 0x74f7c000 C:\Windows\system32\apphelp.dll
0x6d7b0000 - 0x6d7bc000 C:\Program Files\Java\jre6\bin\verify.dll
0x6d330000 - 0x6d34f000 C:\Program Files\Java\jre6\bin\java.dll
0x6d290000 - 0x6d298000 C:\Program Files\Java\jre6\bin\hpi.dll
0x75360000 - 0x75365000 C:\Windows\system32\PSAPI.DLL
0x6d7f0000 - 0x6d7ff000 C:\Program Files\Java\jre6\bin\zip.dll
0x6d000000 - 0x6d14a000 C:\Program Files\Java\jre6\bin\awt.dll
0x70320000 - 0x70371000 C:\Windows\system32\WINSPOOL.DRV
0x76e80000 - 0x76fdc000 C:\Windows\system32\ole32.dll
0x73e60000 - 0x73ffe000 C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2\COMCTL32.dll
0x76aa0000 - 0x76af7000 C:\Windows\system32\SHLWAPI.dll
0x739b0000 - 0x739c3000 C:\Windows\system32\DWMAPI.DLL
0x73ce0000 - 0x73d20000 C:\Windows\system32\uxtheme.dll
0x74f80000 - 0x74f8c000 C:\Windows\system32\CRYPTBASE.dll
0x6d610000 - 0x6d623000 C:\Program Files\Java\jre6\bin\net.dll
0x771d0000 - 0x77205000 C:\Windows\system32\WS2_32.dll
0x75370000 - 0x75376000 C:\Windows\system32\NSI.dll
0x74a30000 - 0x74a6c000 C:\Windows\system32\mswsock.dll
0x74a20000 - 0x74a26000 C:\Windows\System32\wship6.dll
0x72520000 - 0x72530000 C:\Windows\system32\NLAapi.dll
0x6f420000 - 0x6f430000 C:\Windows\system32\napinsp.dll
0x6f400000 - 0x6f412000 C:\Windows\system32\pnrpnsp.dll
0x748f0000 - 0x74934000 C:\Windows\system32\DNSAPI.dll
0x6f3f0000 - 0x6f3f8000 C:\Windows\System32\winrnr.dll
0x74580000 - 0x74585000 C:\Windows\System32\wshtcpip.dll
0x72320000 - 0x7233c000 C:\Windows\system32\IPHLPAPI.DLL
0x72310000 - 0x72317000 C:\Windows\system32\WINNSI.DLL
0x6fbb0000 - 0x6fbb6000 C:\Windows\system32\rasadhlp.dll
0x72230000 - 0x72268000 C:\Windows\System32\fwpuclnt.dll
0x74a70000 - 0x74a86000 C:\Windows\system32\CRYPTSP.dll
0x74810000 - 0x7484b000 C:\Windows\system32\rsaenh.dll
0x74650000 - 0x74667000 C:\Windows\system32\USERENV.dll
0x75000000 - 0x7500b000 C:\Windows\system32\profapi.dll
0x75b70000 - 0x767ba000 C:\Windows\system32\shell32.dll
0x6d230000 - 0x6d284000 C:\Program Files\Java\jre6\bin\fontmanager.dll
0x6d630000 - 0x6d639000 C:\Program Files\Java\jre6\bin\nio.dll
0x6d1a0000 - 0x6d1c3000 C:\Program Files\Java\jre6\bin\dcpr.dll
0x10000000 - 0x10012000 C:\Sistematpv\app\OpenbravoPOS\OpenbravoPOS\lib\Windows\i368-mingw32\rxtxSerial.dll
0x6c240000 - 0x6c267000 C:\Windows\system32\crtdll.dll
0x75380000 - 0x7540f000 C:\Windows\system32\OLEAUT32.DLL
0x012c0000 - 0x012cd000 C:\Sistematpv\app\OpenbravoPOS\OpenbravoPOS\lib\Windows\i368-mingw32\rxtxParallel.dll
VM Arguments:
jvm_args: -Djava.library.path=C:\Sistematpv\app\OpenbravoPOS\OpenbravoPOS\lib/Windows/i368-mingw32;C:\Sistematpv\app\OpenbravoPOS\OpenbravoPOS\lib/Windows/jacob -Ddirname.path=C:\Sistematpv\app\OpenbravoPOS\OpenbravoPOS\./
java_command: com.openbravo.pos.forms.StartPOS C:\Sistematpv\app\OpenbravoPOS\openbravopos.properties
Launcher Type: SUN_STANDARD
Environment Variables:
JAVA_HOME=C:\Program Files\Java\jdk1.6.0_33
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\; C:\Program Files\Java\jre6\bin
USERNAME=Utilisateur
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 6 Model 23 Stepping 10, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows 7 Build 7601 Service Pack 1
CPU:total 2 (2 cores per cpu, 1 threads per core) family 6 model 23 stepping 10, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1
Memory: 4k page, physical 2027120k(1262220k free), swap 4054240k(3091592k free)
vm_info: Java HotSpot(TM) Client VM (16.3-b01) for windows-x86 JRE (1.6.0_20-b02), built on Apr 12 2010 13:52:23 by "java_re" with MS VC++ 7.1 (VS2003)
time: Wed Apr 23 12:41:52 2014
elapsed time: 16 seconds
I tried a all I know and all I searched.
Changing the ntdll.dll , kerne32.dll and ctrdll.dll from mine (Cause this problem is only running in a PC that's not mine, and the proyect is running well in others 86 pc's)
I updated java, and followed all this points to help:
http://pcsupport.about.com/od/fixtheproblem/a/ntdlldll.htm
For more information:
Windows 7 32 bits
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)
and the printer is an EPSON TM88T IV using LPT port.
It's a virtual port that epson creates itself
This is a problem than jvm send when executes any functionality of the native code.
Maybe your problem comes caused by the use of the rxtx libraries, so i reccomend you to change the 'serial' into 'file' of the printer mode.

JNI exception access violation

at the moment i´m trying to play around with JNI.
My Java-Code :
public class test{
static{
System.loadLibrary("wakeup64");
}
public static native boolean setWakeupTime(Date date);
public static void set(){
Date d = new Date();
setWakeupTime(d);
}
}
C-Code:
#include <jni.h>
#include "cpp_interface.h"
#include <stdio.h>
JNIEXPORT void JNICALL Java_test_setWakeupTime
(JNIEnv *env, jclass cl, jobject date){
printf("test");
}
int main(){
}
The code compiles fine but if I run my java Class i´m getting an exception_access_violation:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000000000c038, pid=7456, tid=4640
#
# JRE version: 7.0_03-b05
# Java VM: Java HotSpot(TM) 64-Bit Server VM (22.1-b02 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C 0x000000000000c038
#
# 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 (0x000000000211b000): JavaThread "main" [_thread_in_native, id=4640, stack(0x0000000002290000,0x0000000002390000)]
siginfo: ExceptionCode=0xc0000005, ExceptionInformation=0x0000000000000008 0x000000000000c038
Registers:
RAX=0x0000000000000000, RBX=0x0000000000000015, RCX=0x00000000fffffff4, RDX=0x000000014000d040
RSP=0x000000000238f668, RBP=0x000000000238f858, RSI=0x0000000000000001, RDI=0x00000000000000fc
R8 =0x000000000238f878, R9 =0x00000000065cc490, R10=0x00000000023a21bc, R11=0x000000005b958940
R12=0x0000000000000000, R13=0x000000073b0739e0, R14=0x000000014000d570, R15=0x000000000211b000
RIP=0x000000000000c038, EFLAGS=0x0000000000010246
Top of Stack: (sp=0x000000000238f668)
0x000000000238f668: 0000000140002cd9 000000000238f7c0
0x000000000238f678: 000000005b922181 000000000211bd88
0x000000000238f688: 000000000211b000 0000000000000003
0x000000000238f698: 000000000211ba90 000000000238f878
0x000000000238f6a8: 0000000140002d60 0000000000000011
0x000000000238f6b8: 000000000211b000 000000014000d750
0x000000000238f6c8: 000000073b0739e0 000000000211b990
0x000000000238f6d8: 0000000140004374 000000000211bd88
0x000000000238f6e8: 0000000000000004 000000000238f7c0
0x000000000238f6f8: 00000000023ad623 000000073b0739e0
0x000000000238f708: 0000000140004453 0000000000000022
0x000000000238f718: 000000073b073730 000000014000d750
0x000000000238f728: 000000000211b000 000000000238f7c8
0x000000000238f738: 00000001400015e2 000000014000d040
0x000000000238f748: 0000000140001000 000000000238f858
0x000000000238f758: 0000000000000000 000000073b0739e0
Instructions: (pc=0x000000000000c038)
0x000000000000c018:
[error occurred during error reporting (printing registers, top of stack, instructions near pc), id 0xc0000005]
Register to memory mapping:
RAX=0x0000000000000000 is an unknown value
RBX=0x0000000000000015 is an unknown value
RCX=0x00000000fffffff4 is an unknown value
RDX=0x000000014000d040 is an unknown value
RSP=0x000000000238f668 is pointing into the stack for thread: 0x000000000211b000
RBP=0x000000000238f858 is pointing into the stack for thread: 0x000000000211b000
RSI=0x0000000000000001 is an unknown value
RDI=0x00000000000000fc is an unknown value
R8 =0x000000000238f878 is pointing into the stack for thread: 0x000000000211b000
R9 =0x00000000065cc490 is an unknown value
R10=0x00000000023a21bc is an Interpreter codelet
method entry point (kind = native) [0x00000000023a1f40, 0x00000000023a27c0] 2176 bytes
R11=0x000000005b958940 is an unknown value
R12=0x0000000000000000 is an unknown value
R13=0x000000073b0739e0 is an oop
{method}
- klass: {other class}
R14=0x000000014000d570 is an unknown value
R15=0x000000000211b000 is a thread
Stack: [0x0000000002290000,0x0000000002390000], sp=0x000000000238f668, free space=1021k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C 0x000000000000c038
j test.print()V+9
j Main.main([Ljava/lang/String;)V+10
v ~StubRoutines::call_stub
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j wecker.setWakeupTime(Ljava/util/Date;)Z+0
j wecker.print()V+9
j Main.main([Ljava/lang/String;)V+10
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x00000000065a9000 JavaThread "Service Thread" daemon [_thread_blocked, id=5300, stack(0x0000000007840000,0x0000000007940000)]
0x00000000065a7800 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=7416, stack(0x0000000007690000,0x0000000007790000)]
0x0000000006594000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=4656, stack(0x00000000074d0000,0x00000000075d0000)]
0x0000000006591000 JavaThread "Attach Listener" daemon [_thread_blocked, id=5864, stack(0x00000000073b0000,0x00000000074b0000)]
0x000000000658c000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=7252, stack(0x0000000007260000,0x0000000007360000)]
0x0000000002067000 JavaThread "Finalizer" daemon [_thread_blocked, id=2840, stack(0x0000000007060000,0x0000000007160000)]
0x000000000205e800 JavaThread "Reference Handler" daemon [_thread_blocked, id=8056, stack(0x0000000006e30000,0x0000000006f30000)]
=>0x000000000211b000 JavaThread "main" [_thread_in_native, id=4640, stack(0x0000000002290000,0x0000000002390000)]
Other Threads:
0x0000000002055000 VMThread [stack: 0x0000000006c00000,0x0000000006d00000] [id=8016]
0x00000000065c2000 WatcherThread [stack: 0x0000000007a70000,0x0000000007b70000] [id=6884]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
PSYoungGen total 57344K, used 983K [0x00000007c0000000, 0x00000007c4000000, 0x0000000800000000)
eden space 49152K, 2% used [0x00000007c0000000,0x00000007c00f5c98,0x00000007c3000000)
from space 8192K, 0% used [0x00000007c3800000,0x00000007c3800000,0x00000007c4000000)
to space 8192K, 0% used [0x00000007c3000000,0x00000007c3000000,0x00000007c3800000)
PSOldGen total 131072K, used 0K [0x0000000740000000, 0x0000000748000000, 0x00000007c0000000)
object space 131072K, 0% used [0x0000000740000000,0x0000000740000000,0x0000000748000000)
PSPermGen total 21248K, used 2569K [0x000000073ae00000, 0x000000073c2c0000, 0x0000000740000000)
object space 21248K, 12% used [0x000000073ae00000,0x000000073b0827c8,0x000000073c2c0000)
Code Cache [0x0000000002390000, 0x0000000002600000, 0x0000000005390000)
total_blobs=169 nmethods=0 adapters=136 free_code_cache=48773Kb largest_free_block=49943680
Dynamic libraries:
0x000000013f530000 - 0x000000013f563000 C:\Windows\system32\java.exe
0x0000000077730000 - 0x00000000778d9000 C:\Windows\SYSTEM32\ntdll.dll
0x0000000077610000 - 0x000000007772f000 C:\Windows\system32\kernel32.dll
0x000007fefde10000 - 0x000007fefde7c000 C:\Windows\system32\KERNELBASE.dll
0x00000000707d0000 - 0x000000007081a000 D:\Program Files\AVAST Software\Avast\snxhk64.dll
0x000007feff7f0000 - 0x000007feff8cb000 C:\Windows\system32\ADVAPI32.dll
0x000007fefe7b0000 - 0x000007fefe84f000 C:\Windows\system32\msvcrt.dll
0x000007feff970000 - 0x000007feff98f000 C:\Windows\SYSTEM32\sechost.dll
0x000007fefe3e0000 - 0x000007fefe50d000 C:\Windows\system32\RPCRT4.dll
0x0000000077510000 - 0x000000007760a000 C:\Windows\system32\USER32.dll
0x000007fefe360000 - 0x000007fefe3c7000 C:\Windows\system32\GDI32.dll
0x000007fefe3d0000 - 0x000007fefe3de000 C:\Windows\system32\LPK.dll
0x000007fefe900000 - 0x000007fefe9c9000 C:\Windows\system32\USP10.dll
0x000007fefc360000 - 0x000007fefc554000 C:\Windows\WinSxS\amd64_microsoft.windows.common- controls_6595b64144ccf1df_6.0.7601.17514_none_fa396087175ac9ac\COMCTL32.dll
0x000007fefe9d0000 - 0x000007fefea41000 C:\Windows\system32\SHLWAPI.dll
0x000007feffa10000 - 0x000007feffa3e000 C:\Windows\system32\IMM32.DLL
0x000007fefe250000 - 0x000007fefe359000 C:\Windows\system32\MSCTF.dll
0x0000000062860000 - 0x0000000062931000 D:\Program Files\Java\jre7\bin\msvcr100.dll
0x000000005b7a0000 - 0x000000005be7a000 D:\Program Files\Java\jre7\bin\server\jvm.dll
0x000007fefabf0000 - 0x000007fefabf9000 C:\Windows\system32\WSOCK32.dll
0x000007fefe850000 - 0x000007fefe89d000 C:\Windows\system32\WS2_32.dll
0x000007feff7e0000 - 0x000007feff7e8000 C:\Windows\system32\NSI.dll
0x000007fefbc40000 - 0x000007fefbc7b000 C:\Windows\system32\WINMM.dll
0x0000000077900000 - 0x0000000077907000 C:\Windows\system32\PSAPI.DLL
0x0000000062a10000 - 0x0000000062a1f000 D:\Program Files\Java\jre7\bin\verify.dll
0x00000000629e0000 - 0x0000000062a08000 D:\Program Files\Java\jre7\bin\java.dll
0x00000000629c0000 - 0x00000000629d5000 D:\Program Files\Java\jre7\bin\zip.dll
0x0000000140000000 - 0x0000000140012000 C:\Users\xx\workspace\test\src\wakeup64.dll
VM Arguments:
java_command: Main
Launcher Type: SUN_STANDARD
Environment Variables:
PATH=C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;D:\Program Files\Common Files\Microsoft Shared\Windows Live;D:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPow erShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Windows Live\Shared;D:\Program Files(x86)\Android\android-sdk\platform- tools\;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;D:\Program Files\Java\jdk1.7.0_02\bin;D:\MinGW\bin;D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin
USERNAME=xx
OS=Windows_NT
PROCESSOR_IDENTIFIER=AMD64 Family 16 Model 5 Stepping 2, AuthenticAMD
--------------- S Y S T E M ---------------
OS: Windows 7 , 64 bit Build 7601 Service Pack 1
CPU:total 4 (4 cores per cpu, 1 threads per core) family 16 model 5 stepping 2, cmov, cx8, fxsr, mmx, sse, sse2, sse3, popcnt, mmxext, 3dnowpref, lzcnt, sse4a
Memory: 4k page, physical 12581048k(7862816k free), swap 25160244k(19112368k free)
vm_info: Java HotSpot(TM) 64-Bit Server VM (22.1-b02) for windows-amd64 JRE (1.7.0_03-b05), built on Feb 3 2012 20:43:56 by "java_re" with unknown MS VC++:1600
time: Sun Jul 29 01:02:23 2012
elapsed time: 0 seconds
Anyone allready encountered this?
Regenerate your header file with javah, and fix the .c file accordingly. You have changed the return type from void to boolean in the Java native method declaration without adjusting the native code.
And get rid of the main().
#technomage:
i compiled it as a .dll not as an exe
semi-solved my problem by using the preconfigured shell from visual studio 2012 instead of normal cmd. seems to be an error in my env config
thanks everyone

JVM Fatal Error in native code, Not sure what to do

I'm developing a game in Java using LWJGL. Along with the main game, I'm developing a few Swing-based applications (a launcher, a configuration editor, and a map editor).
When I run the launcher, I sometimes (about 10% of the time) get a fatal JVM crash. It's very strange - I can run the program a few seconds later and everything works. I have zero compilation errors or warnings, and when the program does work, it's completely functional.
I haven't gotten the error when I run my LWJGL game, it's only when I run the launcher first. The process I use to initialize the launcher is:
Tell swing to use a Substance Look and Feel for window decoration.
Setup a directory on the user's computer in which to store files (save games, configurations, etc).
Check if extracting the LWJGL required libraries to the previously mentioned directory is necessary; if so, extract them. Then, set the LWJGL path property of the JVM (this allows LWJGL methods to function). (This has been extensively tested by itself; I don't know if it would somehow interfere with the Substance LaF. I wouldn't expect it to.)
Initialize the launcher window. It has a central image and a series of JButtons.
Begin looping a background soundtrack for ambiance using JLayer. This error would occur before I implemented this feature, and adding it did not change anything.
The error I get is as follows:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000007fefd800c7b, pid=6128, tid=4364
#
# JRE version: 6.0_27-b07
# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.2-b06 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C [ole32.dll+0x10c7b]
#
# An error report file with more information is saved as:
# J:\Development\workspace\Crypt Utils\hs_err_pid6128.log
#
# 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.
#
Then, the error log file:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000007fefd800c7b, pid=6128, tid=4364
#
# JRE version: 6.0_27-b07
# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.2-b06 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C [ole32.dll+0x10c7b]
#
# 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 (0x000000000713d000): JavaThread "AWT-EventQueue-0" [_thread_in_native, id=4364, stack(0x0000000007e30000,0x0000000007f30000)]
siginfo: ExceptionCode=0xc0000005, writing address 0x0000000000000038
Registers:
RAX=0x0000000000000000, RBX=0x000000000b933c70, RCX=0x000000000000110c, RDX=0x000007fefd996620
RSP=0x0000000007f2dfa0, RBP=0x000000000026dc90, RSI=0x0000000000000000, RDI=0x000000000b933c70
R8 =0x00000000000003d4, R9 =0x000007fefd977f18, R10=0x0000000000000000, R11=0x0000000007f2dec0
R12=0x0000000000000000, R13=0x000000000b90a3c0, R14=0x0000000000000000, R15=0x0000000000000000
RIP=0x000007fefd800c7b, EFLAGS=0x0000000000010246
Top of Stack: (sp=0x0000000007f2dfa0)
0x0000000007f2dfa0: 000000000b933c70 0000000000000000
0x0000000007f2dfb0: 0000000000000000 000007fefd81311b
0x0000000007f2dfc0: 0000000000000000 0000000007f2e050
0x0000000007f2dfd0: 000017f000001000 d0b221343c39b318
0x0000000007f2dfe0: 000081de6b223eb8 000007fefd813032
0x0000000007f2dff0: 0000000000000001 00000000070e9c18
0x0000000007f2e000: 0000000000000000 000000000026dc90
0x0000000007f2e010: 000000000713d1d0 000007fefd801225
0x0000000007f2e020: 0000000007f2e080 000000000026dc90
0x0000000007f2e030: 0000000000000000 000000000000008c
0x0000000007f2e040: 000000000c797be0 000007fefd963135
0x0000000007f2e050: 000000000026dc90 000000000713ca28
0x0000000007f2e060: 0000000006697d00 000007fefd0f8c12
0x0000000007f2e070: 000000000c797be0 000007fefd91de9d
0x0000000007f2e080: 000000000026dc90 00000000070e9c18
0x0000000007f2e090: 0000000000000018 0000000000000514
Instructions: (pc=0x000007fefd800c7b)
0x000007fefd800c5b: 60 1c 00 41 b8 d4 03 00 00 e8 47 82 01 00 85 f6
0x000007fefd800c6b: 78 2b f3 0f 6f 44 24 30 48 8b 45 18 4c 89 6d 20
0x000007fefd800c7b: f3 0f 7f 40 30 f6 45 0c 01 75 12 48 8b cd e8 be
0x000007fefd800c8b: fa ff ff 8b f0 85 c0 78 04 83 4d 0c 01 48 8b cd
Register to memory mapping:
RAX=0x0000000000000000 is an unknown value
RBX=0x000000000b933c70 is an unknown value
RCX=0x000000000000110c is an unknown value
RDX=0x000007fefd996620 is an unknown value
RSP=0x0000000007f2dfa0 is pointing into the stack for thread: 0x000000000713d000
RBP=0x000000000026dc90 is an unknown value
RSI=0x0000000000000000 is an unknown value
RDI=0x000000000b933c70 is an unknown value
R8 =0x00000000000003d4 is an unknown value
R9 =0x000007fefd977f18 is an unknown value
R10=0x0000000000000000 is an unknown value
R11=0x0000000007f2dec0 is pointing into the stack for thread: 0x000000000713d000
R12=0x0000000000000000 is an unknown value
R13=0x000000000b90a3c0 is an unknown value
R14=0x0000000000000000 is an unknown value
R15=0x0000000000000000 is an unknown value
Stack: [0x0000000007e30000,0x0000000007f30000], sp=0x0000000007f2dfa0, free space=1015k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [ole32.dll+0x10c7b] CLSIDFromString+0x5fb
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
sun.awt.windows.WComponentPeer.addNativeDropTarget()J+0
sun.awt.windows.WComponentPeer.addDropTarget(Ljava/awt/dnd/DropTarget;)V+9
java.awt.dnd.DropTarget.addNotify(Ljava/awt/peer/ComponentPeer;)V+60
java.awt.Component.addNotify()V+297
java.awt.Container.addNotify()V+8
javax.swing.JComponent.addNotify()V+1
java.awt.Container.addNotify()V+61
javax.swing.JComponent.addNotify()V+1
java.awt.Container.addNotify()V+61
javax.swing.JComponent.addNotify()V+1
javax.swing.JMenuBar.addNotify()V+1
java.awt.Container.addNotify()V+61
javax.swing.JComponent.addNotify()V+1
org.pushingpixels.substance.internal.utils.SubstanceTitlePane.addNotify()V+1
java.awt.Container.addNotify()V+61
javax.swing.JComponent.addNotify()V+1
java.awt.Container.addNotify()V+61
javax.swing.JComponent.addNotify()V+1
javax.swing.JRootPane.addNotify()V+5
java.awt.Container.addNotify()V+61
java.awt.Window.addNotify()V+73
java.awt.Frame.addNotify()V+70
java.awt.Window.pack()V+28
gui.launcher.LauncherWindow.()V+156
main.Crypt.runLauncher()V+28
main.Crypt$1.run()V+0
java.awt.event.InvocationEvent.dispatch()V+47
java.awt.EventQueue.dispatchEventImpl(Ljava/awt/AWTEvent;Ljava/lang/Object;)V+21
java.awt.EventQueue.access$000(Ljava/awt/EventQueue;Ljava/awt/AWTEvent;Ljava/lang/Object;)V+3
java.awt.EventQueue$1.run()Ljava/lang/Void;+12
java.awt.EventQueue$1.run()Ljava/lang/Object;+1
v ~StubRoutines::call_stub
java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;+0
java.security.AccessControlContext$1.doIntersectionPrivilege(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;Ljava/security/AccessControlContext;)Ljava/lang/Object;+28
java.awt.EventQueue.dispatchEvent(Ljava/awt/AWTEvent;)V+46
java.awt.EventDispatchThread.pumpOneEventForFilters(I)Z+204
java.awt.EventDispatchThread.pumpEventsForFilter(ILjava/awt/Conditional;Ljava/awt/EventFilter;)V+30
java.awt.EventDispatchThread.pumpEventsForHierarchy(ILjava/awt/Conditional;Ljava/awt/Component;)V+11
java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V+4
java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V+3
java.awt.EventDispatchThread.run()V+9
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x0000000007309000 JavaThread "Substance heap status" daemon [_thread_blocked, id=5732, stack(0x000000000c000000,0x000000000c100000)]
0x000000000737e000 JavaThread "Headspace mixer frame proc thread" daemon [_thread_blocked, id=5520, stack(0x000000000bd00000,0x000000000be00000)]
0x00000000072a2800 JavaThread "Java Sound Event Dispatcher" daemon [_thread_blocked, id=2956, stack(0x000000000b700000,0x000000000b800000)]
0x00000000071dc800 JavaThread "Thread-3" [_thread_in_native, id=4104, stack(0x00000000082b0000,0x00000000083b0000)]
0x00000000003db800 JavaThread "DestroyJavaVM" [_thread_blocked, id=5600, stack(0x0000000002570000,0x0000000002670000)]
=>0x000000000713d000 JavaThread "AWT-EventQueue-0" [_thread_in_native, id=4364, stack(0x0000000007e30000,0x0000000007f30000)]
0x00000000067af800 JavaThread "AWT-Windows" daemon [_thread_in_native, id=5760, stack(0x0000000007830000,0x0000000007930000)]
0x00000000067ae800 JavaThread "AWT-Shutdown" [_thread_blocked, id=2600, stack(0x0000000007730000,0x0000000007830000)]
0x00000000066ea800 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=4244, stack(0x00000000074e0000,0x00000000075e0000)]
0x0000000006684000 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=5196, stack(0x0000000006d10000,0x0000000006e10000)]
0x0000000006681000 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=4192, stack(0x0000000006c10000,0x0000000006d10000)]
0x000000000666e000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=4260, stack(0x0000000006b10000,0x0000000006c10000)]
0x000000000666b000 JavaThread "Attach Listener" daemon [_thread_blocked, id=5008, stack(0x0000000006a10000,0x0000000006b10000)]
0x0000000006666000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=4032, stack(0x0000000006910000,0x0000000006a10000)]
0x000000000064b800 JavaThread "Finalizer" daemon [_thread_blocked, id=1132, stack(0x0000000006810000,0x0000000006910000)]
0x0000000000649000 JavaThread "Reference Handler" daemon [_thread_blocked, id=5336, stack(0x0000000006510000,0x0000000006610000)]
Other Threads:
0x0000000000641000 VMThread [stack: 0x0000000006410000,0x0000000006510000] [id=3820]
0x0000000006697000 WatcherThread [stack: 0x0000000006e10000,0x0000000006f10000] [id=5156]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
PSYoungGen total 19136K, used 15506K [0x00000000eaab0000, 0x00000000ec000000, 0x0000000100000000)
eden space 16448K, 94% used [0x00000000eaab0000,0x00000000eb9d4b98,0x00000000ebac0000)
from space 2688K, 0% used [0x00000000ebd60000,0x00000000ebd60000,0x00000000ec000000)
to space 2688K, 0% used [0x00000000ebac0000,0x00000000ebac0000,0x00000000ebd60000)
PSOldGen total 43712K, used 0K [0x00000000c0000000, 0x00000000c2ab0000, 0x00000000eaab0000)
object space 43712K, 0% used [0x00000000c0000000,0x00000000c0000000,0x00000000c2ab0000)
PSPermGen total 21248K, used 15942K [0x00000000bae00000, 0x00000000bc2c0000, 0x00000000c0000000)
object space 21248K, 75% used [0x00000000bae00000,0x00000000bbd91870,0x00000000bc2c0000)
Code Cache [0x0000000002670000, 0x00000000028e0000, 0x0000000005670000)
total_blobs=470 nmethods=39 adapters=385 free_code_cache=49729536 largest_free_block=6336
Dynamic libraries:
0x0000000000400000 - 0x000000000042e000 C:\Program Files\Java\jre6\bin\javaw.exe
0x00000000770f0000 - 0x0000000077299000 C:\Windows\SYSTEM32\ntdll.dll
0x0000000076ed0000 - 0x0000000076fef000 C:\Windows\system32\kernel32.dll
0x000007fefd0f0000 - 0x000007fefd15c000 C:\Windows\system32\KERNELBASE.dll
0x0000000074de0000 - 0x0000000074e1f000 C:\Program Files\AVAST Software\Avast\snxhk64.dll
0x000007fefdde0000 - 0x000007fefdebb000 C:\Windows\system32\ADVAPI32.dll
0x000007fefd410000 - 0x000007fefd4af000 C:\Windows\system32\msvcrt.dll
0x000007fefd4b0000 - 0x000007fefd4cf000 C:\Windows\SYSTEM32\sechost.dll
0x000007fefef90000 - 0x000007feff0bd000 C:\Windows\system32\RPCRT4.dll
0x0000000076ff0000 - 0x00000000770ea000 C:\Windows\system32\USER32.dll
0x000007fefdec0000 - 0x000007fefdf27000 C:\Windows\system32\GDI32.dll
0x000007fefee50000 - 0x000007fefee5e000 C:\Windows\system32\LPK.dll
0x000007feff0c0000 - 0x000007feff189000 C:\Windows\system32\USP10.dll
0x000007fefe090000 - 0x000007fefe0be000 C:\Windows\system32\IMM32.DLL
0x000007fefd4d0000 - 0x000007fefd5d9000 C:\Windows\system32\MSCTF.dll
0x000000006d7f0000 - 0x000000006dfa8000 C:\Program Files\Java\jre6\bin\server\jvm.dll
0x000007fefa980000 - 0x000007fefa9bb000 C:\Windows\system32\WINMM.dll
0x000000006d760000 - 0x000000006d76e000 C:\Program Files\Java\jre6\bin\verify.dll
0x000000006d3b0000 - 0x000000006d3d7000 C:\Program Files\Java\jre6\bin\java.dll
0x000000006d7b0000 - 0x000000006d7c2000 C:\Program Files\Java\jre6\bin\zip.dll
0x000000006d000000 - 0x000000006d1c3000 C:\Program Files\Java\jre6\bin\awt.dll
0x000007fefa620000 - 0x000007fefa691000 C:\Windows\system32\WINSPOOL.DRV
0x000007fefd7f0000 - 0x000007fefd9f3000 C:\Windows\system32\ole32.dll
0x000007fefe0c0000 - 0x000007fefee48000 C:\Windows\system32\SHELL32.dll
0x000007fefef10000 - 0x000007fefef81000 C:\Windows\system32\SHLWAPI.dll
0x000007fefbaf0000 - 0x000007fefbce4000 C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_fa396087175ac9ac\COMCTL32.dll
0x000007fefb3b0000 - 0x000007fefb3c8000 C:\Windows\system32\DWMAPI.DLL
0x000007fefb780000 - 0x000007fefb7d6000 C:\Windows\system32\uxtheme.dll
0x000007fef93b0000 - 0x000007fef942f000 C:\Program Files\Common Files\microsoft shared\ink\tiptsf.dll
0x000007fefd5e0000 - 0x000007fefd6b7000 C:\Windows\system32\OLEAUT32.dll
0x000007fefc180000 - 0x000007fefc18c000 C:\Windows\system32\version.dll
0x000007fefcf70000 - 0x000007fefcf7f000 C:\Windows\system32\CRYPTBASE.dll
0x000000006d2a0000 - 0x000000006d306000 C:\Program Files\Java\jre6\bin\fontmanager.dll
0x000000006d600000 - 0x000000006d617000 C:\Program Files\Java\jre6\bin\net.dll
0x000007fefee60000 - 0x000007fefeead000 C:\Windows\system32\WS2_32.dll
0x000007feff210000 - 0x000007feff218000 C:\Windows\system32\NSI.dll
0x000007fefc870000 - 0x000007fefc8c5000 C:\Windows\system32\mswsock.dll
0x000007fefc860000 - 0x000007fefc867000 C:\Windows\System32\wship6.dll
0x000000006d620000 - 0x000000006d62b000 C:\Program Files\Java\jre6\bin\nio.dll
0x0000000180000000 - 0x0000000180050000 C:\Users\Chris\AppData\Roaming\jRabbit Data\LWJGL Natives\lwjgl64.dll
0x000007fef1550000 - 0x000007fef166d000 C:\Windows\system32\OPENGL32.dll
0x000007fef47c0000 - 0x000007fef47ed000 C:\Windows\system32\GLU32.dll
0x000007fef1210000 - 0x000007fef1301000 C:\Windows\system32\DDRAW.dll
0x000007fef8090000 - 0x000007fef8098000 C:\Windows\system32\DCIMAN32.dll
0x000007feff220000 - 0x000007feff3f7000 C:\Windows\system32\SETUPAPI.dll
0x000007fefd160000 - 0x000007fefd196000 C:\Windows\system32\CFGMGR32.dll
0x000007fefd3b0000 - 0x000007fefd3ca000 C:\Windows\system32\DEVOBJ.dll
0x000007fefa2a0000 - 0x000007fefa49f000 C:\Windows\system32\d3d9.dll
0x000007fefa290000 - 0x000007fefa297000 C:\Windows\system32\d3d8thk.dll
0x000007feed900000 - 0x000007feee777000 C:\Windows\system32\nvd3dumx.dll
0x000007fefb860000 - 0x000007fefb88c000 C:\Windows\system32\powrprof.dll
0x000000006d510000 - 0x000000006d53e000 C:\Program Files\Java\jre6\bin\jsound.dll
0x000007fefb730000 - 0x000007fefb77b000 C:\Windows\system32\MMDevAPI.DLL
0x000007fefb940000 - 0x000007fefba6c000 C:\Windows\system32\PROPSYS.dll
0x000007fefa5e0000 - 0x000007fefa61b000 C:\Windows\system32\wdmaud.drv
0x0000000074a00000 - 0x0000000074a06000 C:\Windows\system32\ksuser.dll
0x000007fefbae0000 - 0x000007fefbae9000 C:\Windows\system32\AVRT.dll
0x000007fefa590000 - 0x000007fefa5df000 C:\Windows\system32\AUDIOSES.DLL
0x000007fefa4e0000 - 0x000007fefa4ea000 C:\Windows\system32\msacm32.drv
0x000007fefa4c0000 - 0x000007fefa4d8000 C:\Windows\system32\MSACM32.dll
0x000007fefa4a0000 - 0x000007fefa4a9000 C:\Windows\system32\midimap.dll
0x000000006d210000 - 0x000000006d238000 C:\Program Files\Java\jre6\bin\dcpr.dll
0x000007fefdf30000 - 0x000007fefdfc9000 C:\Windows\system32\CLBCatQ.DLL
0x000007fefcb00000 - 0x000007fefcb17000 C:\Windows\system32\CRYPTSP.dll
0x000007fefc5d0000 - 0x000007fefc617000 C:\Windows\system32\rsaenh.dll
0x000007fefc390000 - 0x000007fefc3ae000 C:\Windows\system32\USERENV.dll
0x000007fefcfa0000 - 0x000007fefcfaf000 C:\Windows\system32\profapi.dll
0x000007fefad70000 - 0x000007fefad85000 C:\Windows\system32\NLAapi.dll
0x000007fefb220000 - 0x000007fefb235000 C:\Windows\system32\napinsp.dll
0x000007fefb200000 - 0x000007fefb219000 C:\Windows\system32\pnrpnsp.dll
0x000007fefc6f0000 - 0x000007fefc74b000 C:\Windows\system32\DNSAPI.dll
0x000007fefbac0000 - 0x000007fefbacb000 C:\Windows\System32\winrnr.dll
0x0000000074700000 - 0x000000007472e000 C:\Program Files\Common Files\Microsoft Shared\Windows Live\WLIDNSP.DLL
0x00000000772b0000 - 0x00000000772b7000 C:\Windows\system32\PSAPI.DLL
0x00000000746d0000 - 0x00000000746f6000 C:\Program Files\Bonjour\mdnsNSP.dll
0x000007fef9ec0000 - 0x000007fef9ee7000 C:\Windows\system32\Iphlpapi.DLL
0x000007fef9eb0000 - 0x000007fef9ebb000 C:\Windows\system32\WINNSI.DLL
0x000007fefc250000 - 0x000007fefc257000 C:\Windows\System32\wshtcpip.dll
0x000007fefb7e0000 - 0x000007fefb7e8000 C:\Windows\system32\rasadhlp.dll
0x000007fef9cf0000 - 0x000007fef9d43000 C:\Windows\System32\fwpuclnt.dll
0x000007fefcf80000 - 0x000007fefcf94000 C:\Windows\system32\RpcRtRemote.dll
VM Arguments:
jvm_args: -Dfile.encoding=Cp1252
java_command: main.Crypt
Launcher Type: SUN_STANDARD
Environment Variables:
CLASSPATH=.;C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip
PATH=C:/Program Files/Java/jre6/bin/server;C:/Program Files/Java/jre6/bin;C:/Program Files/Java/jre6/lib/amd64;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\SlikSvn\bin\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files (x86)\Autodesk\Backburner\;J:\Development\Eclipse;
USERNAME=Chris
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 15 Stepping 11, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows 7 , 64 bit Build 7601 Service Pack 1
CPU:total 4 (4 cores per cpu, 1 threads per core) family 6 model 15 stepping 11, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3
Memory: 4k page, physical 4193464k(2246544k free), swap 8385080k(6086692k free)
vm_info: Java HotSpot(TM) 64-Bit Server VM (20.2-b06) for windows-amd64 JRE (1.6.0_27-b07), built on Jul 19 2011 01:08:22 by "java_re" with MS VC++ 8.0 (VS2005)
time: Mon Oct 03 09:29:15 2011
elapsed time: 1 seconds
From looking around on Stack Overflow, it seems like this is occasionally related to memory settings. Is that the case here? I've already set Eclipse to run with a lot of memory at its disposal; additionally, I'm only creating a small JFrame with a few components on it, plus initializing the LWJGL libraries. That doesn't take up much memory.
I often have problems with java 6 and Swing on my Windows Vista 64 box (but only when I launch my app from eclipse).
The way to fix it for me was to disable Direct3D:
java -Dsun.java2d.d3d=false ...
See also http://download.oracle.com/javase/6/docs/technotes/guides/2d/flags.html#d3d for further information.
Well, the error is from a dll trying to write to memory where it shouldn't. If it happens just sometimes, it may be from not building components on the event dispatch thread. It can't hurt to check.
This bug report at oracle may be related: http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=e5f1f1011daf96ffffffffdd154dd2e731150?bug_id=6967456
It may be related to swing's drag & drop functionality - see if disabling drag and drop on your form components supresses the error.
#CodeBunny, that would be comment:
1) is there Trindent.jar
2) how do you apply Substance Look and Feel to the JFrame,
SwingUtilities.invokeLater(new Runnable() {
#Override
public void run() {
try {
UIManager.setLookAndFeel(new SubstanceOfficeSilver2007LookAndFeel());
SwingUtilities.updateComponentTreeUI(frame);
} catch (UnsupportedLookAndFeelException e) {
throw new RuntimeException(e);
}
}
});
in most cases (if there some BackGround task) required usage of invokeAndWait
EDIT
depends
1) if you are load empty container, then add data (invokeLater)
2) or load everything and wait for that (invokeAndWait),
3) are your contructor for Container in last line contains setVisible(true), last from possible lines,
4) maybe you are outside EDT, something you must loading so heavy, isn't there RepaintManager Error???
5) disable Substance, if you get this error, then came from mistake in codeing or some your code returns error, otherwise is there something rellated with RepaintManager (overload Native OS Latency) or with Concurency, simple your code is out of EDT,
6) Substance is so sensitive, very sensitive for done code out of EDT issues, remove all Thread.sleep(int) from GUI rellated code

My library on multiples connections with my JNI applications

I am developing a java application which uses a c++ library. My application type is an client/server RCP (eclipse plugin based). The problem is when I try to connect more than 2 clients to my server, it always frozes. What is strange is that this problem happens, only when running it in Windows. In Linux, it works fine.
I want to notice also, that, programatically, the clients are represented by C++ threads. May be, they want to access the same resource. If I let the application running, waiting it to defroze, it crashes and generates the log shown below
# An unexpected error has been detected by Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6b88cd86, pid=2972, tid=3700
#
# Java VM: Java HotSpot(TM) Client VM (11.2-b01 mixed mode windows-x86)
# Problematic frame:
# C [libtlmdevice_ycp-3-0-0.dll+0x4cd86]
#
# 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 (0x637f0800): JavaThread "Thread-4" [_thread_in_native, id=3700, stack(0x687a0000,0x687f0000)]
siginfo: ExceptionCode=0xc0000005, reading address 0x0000000c
Registers:
EAX=0x00000000, EBX=0x6b87b418, ECX=0x003fcd58, EDX=0x00000000
ESP=0x687efaa8, EBP=0x687efaa8, ESI=0x003ffeb8, EDI=0x637f0800
EIP=0x6b88cd86, EFLAGS=0x00010202
Top of Stack: (sp=0x687efaa8)
0x687efaa8: 687efb08 6b86246a 00000000 6b897954
0x687efab8: 00000001 6b87b418 003ffeb8 637f0800
0x687efac8: 687efae8 6b87a97c 688946e8 00000000
0x687efad8: 00000001 00000000 68893500 633b3f02
0x687efae8: 687efb02 6b88d032 00000002 00000000
0x687efaf8: 00000000 6b87b418 003ffeb8 637f0800
0x687efb08: 687efb48 6b87b312 003fcd58 00000002
0x687efb18: 00000000 00000011 687efb58 7c90da1c
Instructions: (pc=0x6b88cd86)
0x6b88cd76: 08 0f b6 45 fc 88 42 08 c9 c3 55 89 e5 8b 45 08
0x6b88cd86: 8b 40 0c 5d c3 90 55 89 e5 53 83 ec 14 8b 45 08
Stack: [0x687a0000,0x687f0000], sp=0x687efaa8, free space=318k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [libtlmdevice_ycp-3-0-0.dll+0x4cd86]
C [libtlmdevice_ycp-3-0-0.dll+0x2246a]
C [libtlmdevice_ycp-3-0-0.dll+0x3b312]
C [libtlmdevice_ycp-3-0-0.dll+0x3b42c]
C [libtlmdevice_ycp-3-0-0.dll+0x3db81]
C [libtlmdevice_ycp-3-0-0.dll+0x3de1c]
C [libtlmdevice_ycp-3-0-0.dll+0x22f70]
j com.st.tlmdevice.api.TlmdeviceServer.Initialize(Ljava/lang/String;IIII)I+0
j com.st.tlmdevice.api.TlmdeviceServer.run()V+40
v ~StubRoutines::call_stub
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j com.st.tlmdevice.api.TlmdeviceServer.Initialize(Ljava/lang/String;IIII)I+0
j com.st.tlmdevice.api.TlmdeviceServer.run()V+40
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x66e52800 JavaThread "Thread-17" [_thread_in_native, id=1324, stack(0x68c30000,0x68c80000)]
0x63063000 JavaThread "Thread-15" [_thread_in_native, id=3060, stack(0x68b30000,0x68b80000)]
0x63035000 JavaThread "Thread-16" [_thread_in_native, id=3720, stack(0x68970000,0x689c0000)]
0x637e5800 JavaThread "Thread-14" [_thread_in_native, id=2672, stack(0x689c0000,0x68a10000)]
0x66da4400 JavaThread "Java Sound Event Dispatcher" daemon [_thread_blocked, id=1532, stack(0x6bf00000,0x6bf50000)]
=>0x637f0800 JavaThread "Thread-4" [_thread_in_native, id=3700, stack(0x687a0000,0x687f0000)]
0x637ec800 JavaThread "Thread-5" [_thread_blocked, id=796, stack(0x68750000,0x687a0000)]
0x66be8c00 JavaThread "Worker-1" [_thread_blocked, id=2016, stack(0x684c0000,0x68510000)]
0x66b67400 JavaThread "Worker-0" [_thread_blocked, id=2336, stack(0x67ac0000,0x67b10000)]
0x63408400 JavaThread "Start Level Event Dispatcher" daemon [_thread_blocked, id=3360, stack(0x63760000,0x637b0000)]
0x633ffc00 JavaThread "Framework Event Dispatcher" daemon [_thread_blocked, id=1268, stack(0x636c0000,0x63710000)]
0x633e6c00 JavaThread "State Data Manager" daemon [_thread_blocked, id=1968, stack(0x63670000,0x636c0000)]
0x63025000 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3936, stack(0x63270000,0x632c0000)]
0x6301ec00 JavaThread "CompilerThread0" daemon [_thread_blocked, id=468, stack(0x63220000,0x63270000)]
0x6301d400 JavaThread "Attach Listener" daemon [_thread_blocked, id=2560, stack(0x631d0000,0x63220000)]
0x6301c000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2716, stack(0x63180000,0x631d0000)]
0x6300c400 JavaThread "Finalizer" daemon [_thread_blocked, id=456, stack(0x63130000,0x63180000)]
0x63007800 JavaThread "Reference Handler" daemon [_thread_blocked, id=1400, stack(0x630e0000,0x63130000)]
0x003a6c00 JavaThread "main" [_thread_in_native, id=448, stack(0x008c0000,0x00910000)]
Other Threads:
0x63004000 VMThread [stack: 0x63090000,0x630e0000] [id=1424]
0x63038800 WatcherThread [stack: 0x632c0000,0x63310000] [id=2604]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 36352K, used 165K [0x02990000, 0x05100000, 0x07850000)
eden space 32320K, 0% used [0x02990000, 0x029b9740, 0x04920000)
from space 4032K, 0% used [0x04920000, 0x04920000, 0x04d10000)
to space 4032K, 0% used [0x04d10000, 0x04d10000, 0x05100000)
tenured generation total 483968K, used 30304K [0x07850000, 0x250f0000, 0x42990000)
the space 483968K, 6% used [0x07850000, 0x095e83f8, 0x095e8400, 0x250f0000)
compacting perm gen total 28928K, used 28902K [0x42990000, 0x445d0000, 0x62990000)
the space 28928K, 99% used [0x42990000, 0x445c9ac0, 0x445c9c00, 0x445d0000)
No shared spaces configured.
Dynamic libraries:
0x00400000 - 0x00424000 C:\spg\ext_tools\jdk\i686-win5.1\jdk1.6.0_12\jre\bin\javaw.exe
0x7c900000 - 0x7c9af000 C:\WINDOWS\system32\ntdll.dll
0x7c800000 - 0x7c8f6000 C:\WINDOWS\system32\kernel32.dll
0x77dd0000 - 0x77e6b000 C:\WINDOWS\system32\ADVAPI32.dll
0x77e70000 - 0x77f02000 C:\WINDOWS\system32\RPCRT4.dll
0x77fe0000 - 0x77ff1000 C:\WINDOWS\system32\Secur32.dll
0x7e410000 - 0x7e4a1000 C:\WINDOWS\system32\USER32.dll
0x77f10000 - 0x77f59000 C:\WINDOWS\system32\GDI32.dll
0x76390000 - 0x763ad000 C:\WINDOWS\system32\IMM32.DLL
0x7c340000 - 0x7c396000 C:\spg\ext_tools\jdk\i686-win5.1\jdk1.6.0_12\jre\bin\msvcr71.dll
0x6d8b0000 - 0x6db06000 C:\spg\ext_tools\jdk\i686-win5.1\jdk1.6.0_12\jre\bin\client\jvm.dll
0x76b40000 - 0x76b6d000 C:\WINDOWS\system32\WINMM.dll
0x6d340000 - 0x6d348000 C:\spg\ext_tools\jdk\i686-win5.1\jdk1.6.0_12\jre\bin\hpi.dll
0x76bf0000 - 0x76bfb000 C:\WINDOWS\system32\PSAPI.DLL
0x6d860000 - 0x6d86c000 C:\spg\ext_tools\jdk\i686-win5.1\jdk1.6.0_12\jre\bin\verify.dll
0x6d3e0000 - 0x6d3ff000 C:\spg\ext_tools\jdk\i686-win5.1\jdk1.6.0_12\jre\bin\java.dll
0x6d8a0000 - 0x6d8af000 C:\spg\ext_tools\jdk\i686-win5.1\jdk1.6.0_12\jre\bin\zip.dll
0x72000000 - 0x72014000 C:\STM\STWorkbenchR4.1.1\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.101.R34x_v20080731\eclipse_1115.dll
0x773d0000 - 0x774d3000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.5512_x-ww_35d4ce83\COMCTL32.dll
0x77c10000 - 0x77c68000 C:\WINDOWS\system32\msvcrt.dll
0x77f60000 - 0x77fd6000 C:\WINDOWS\system32\SHLWAPI.dll
0x77c00000 - 0x77c08000 C:\WINDOWS\system32\VERSION.dll
0x63530000 - 0x63568000 C:\WINDOWS\system32\uxtheme.dll
0x74720000 - 0x7476c000 C:\WINDOWS\system32\MSCTF.dll
0x755c0000 - 0x755ee000 C:\WINDOWS\system32\msctfime.ime
0x774e0000 - 0x7761d000 C:\WINDOWS\system32\ole32.dll
0x68000000 - 0x68036000 C:\WINDOWS\system32\rsaenh.dll
0x769c0000 - 0x76a74000 C:\WINDOWS\system32\USERENV.dll
0x63610000 - 0x63665000 C:\WINDOWS\system32\netapi32.dll
0x6d6c0000 - 0x6d6d3000 C:\spg\ext_tools\jdk\i686-win5.1\jdk1.6.0_12\jre\bin\net.dll
0x71ab0000 - 0x71ac7000 C:\WINDOWS\system32\WS2_32.dll
0x71aa0000 - 0x71aa8000 C:\WINDOWS\system32\WS2HELP.dll
0x71a50000 - 0x71a8f000 C:\WINDOWS\System32\mswsock.dll
0x76f20000 - 0x76f47000 C:\WINDOWS\system32\DNSAPI.dll
0x76fb0000 - 0x76fb8000 C:\WINDOWS\System32\winrnr.dll
0x76f60000 - 0x76f8c000 C:\WINDOWS\system32\WLDAP32.dll
0x76fc0000 - 0x76fc6000 C:\WINDOWS\system32\rasadhlp.dll
0x6d6e0000 - 0x6d6e9000 C:\spg\ext_tools\jdk\i686-win5.1\jdk1.6.0_12\jre\bin\nio.dll
0x673d0000 - 0x67425000 C:\Documents and Settings\turkia\workspace2\.metadata\.plugins\org.eclipse.pde.core\New_configuration\org.eclipse.osgi\bundles\561\1\.cp\swt-win32-3452.dll
0x77120000 - 0x771ab000 C:\WINDOWS\system32\OLEAUT32.dll
0x763b0000 - 0x763f9000 C:\WINDOWS\system32\comdlg32.dll
0x7c9c0000 - 0x7d1d7000 C:\WINDOWS\system32\SHELL32.dll
0x74d90000 - 0x74dfb000 C:\WINDOWS\system32\USP10.dll
0x771b0000 - 0x7727e000 C:\WINDOWS\system32\WININET.dll
0x67440000 - 0x67449000 C:\WINDOWS\system32\Normaliz.dll
0x67450000 - 0x67495000 C:\WINDOWS\system32\iertutil.dll
0x67730000 - 0x67744000 C:\Documents and Settings\turkia\workspace2\.metadata\.plugins\org.eclipse.pde.core\New_configuration\org.eclipse.osgi\bundles\561\1\.cp\swt-gdip-win32-3452.dll
0x67750000 - 0x678f6000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.GdiPlus_6595b64144ccf1df_1.0.2600.5512_x-ww_dfb54e0c\gdiplus.dll
0x74c80000 - 0x74cac000 C:\WINDOWS\system32\oleacc.dll
0x76080000 - 0x760e5000 C:\WINDOWS\system32\MSVCP60.dll
0x68040000 - 0x68305000 C:\WINDOWS\system32\xpsp2res.dll
0x76380000 - 0x76385000 C:\WINDOWS\system32\msimg32.dll
0x67b10000 - 0x67b1f000 C:\Documents and Settings\turkia\workspace2\.metadata\.plugins\org.eclipse.pde.core\New_configuration\org.eclipse.osgi\bundles\362\1\.cp\jWinHttp.dll
0x67b30000 - 0x67b89000 C:\WINDOWS\system32\WINHTTP.dll
0x76fd0000 - 0x7704f000 C:\WINDOWS\system32\CLBCATQ.DLL
0x77050000 - 0x77115000 C:\WINDOWS\system32\COMRes.dll
0x75cf0000 - 0x75d81000 C:\WINDOWS\system32\mlang.dll
0x70d00000 - 0x70d23000 C:\test\i686-win5.1-gcc_4.1.1_mingw-2-jdk_1.6.0_12-yac_1.2.5\bin\libyacapi.dll
0x6b840000 - 0x6bef9000 C:\test\i686-win5.1-gcc_4.1.1_mingw-2-jdk_1.6.0_12-yac_1.2.5\bin\libtlmdevice_ycp-3-0-0.dll
0x687f0000 - 0x68848000 C:\WINDOWS\system32\hnetcfg.dll
0x73080000 - 0x7309d000 C:\WINDOWS\system32\rsvpsp.dll
0x71a90000 - 0x71a98000 C:\WINDOWS\System32\wshtcpip.dll
0x6d5d0000 - 0x6d5f4000 C:\spg\ext_tools\jdk\i686-win5.1\jdk1.6.0_12\jre\bin\jsound.dll
0x6d600000 - 0x6d608000 C:\spg\ext_tools\jdk\i686-win5.1\jdk1.6.0_12\jre\bin\jsoundds.dll
0x73f10000 - 0x73f6c000 C:\WINDOWS\system32\DSOUND.dll
0x76c30000 - 0x76c5e000 C:\WINDOWS\system32\WINTRUST.dll
0x77a80000 - 0x77b15000 C:\WINDOWS\system32\CRYPT32.dll
0x77b20000 - 0x77b32000 C:\WINDOWS\system32\MSASN1.dll
0x76c90000 - 0x76cb8000 C:\WINDOWS\system32\IMAGEHLP.dll
0x72d20000 - 0x72d29000 C:\WINDOWS\system32\wdmaud.drv
0x72d10000 - 0x72d18000 C:\WINDOWS\system32\msacm32.drv
0x77be0000 - 0x77bf5000 C:\WINDOWS\system32\MSACM32.dll
0x77bd0000 - 0x77bd7000 C:\WINDOWS\system32\midimap.dll
0x73ee0000 - 0x73ee4000 C:\WINDOWS\system32\KsUser.dll
VM Arguments:
jvm_args: -Xms512m -Xmx1g -XX:MaxPermSize=512m -Declipse.pde.launch=true -Dfile.encoding=Cp1252
java_command: org.eclipse.equinox.launcher.Main -launcher C:\STM\STWorkbenchR4.1.1\eclipse.exe -name Eclipse -showsplash 600 -product com.st.platform.st_ide -data C:\Documents and Settings\turkia\workspace2/../runtime-New_configuration -configuration file:C:/Documents and Settings/turkia/workspace2/.metadata/.plugins/org.eclipse.pde.core/New_configuration/ -dev file:C:/Documents and Settings/turkia/workspace2/.metadata/.plugins/org.eclipse.pde.core/New_configuration/dev.properties -os win32 -ws win32 -arch x86 -nl en_US
Launcher Type: SUN_STANDARD
Environment Variables:
PATH=C:/spg/ext_tools/jdk/i686-win5.1/jdk1.6.0_12/bin/../jre/bin/client;C:/spg/ext_tools/jdk/i686-win5.1/jdk1.6.0_12/bin/../jre/bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
USERNAME=turkia
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 2, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows XP Build 2600 Service Pack 3
CPU:total 1 (1 cores per cpu, 1 threads per core) family 6 model 15 stepping 2, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3
Memory: 4k page, physical 2086444k(1045564k free), swap 4024844k(2273736k free)
vm_info: Java HotSpot(TM) Client VM (11.2-b01) for windows-x86 JRE (1.6.0_12-b04), built on Jan 17 2009 09:57:14 by "java_re" with MS VC++ 7.1
time: Thu Mar 03 11:07:22 2011
elapsed time: 334 seconds
libtlmdevice_ycp-3-0-0.dll is the library I am using
If you have any idea :)
Thanks in advance.
kind regards,
Ali.
The native code needs to attach to the jvm using AttachCurrentThread and use the JNIEnv pointer provided by this function. You cannot just use the first JNIEnv your c++ lib got its hands on.
Also, there's a good chance that the c++ lib isn't thread-safe, can't tell without seeing source.

Jpcap breaking the JVM

I have written the following program that is intended to dump all network device traffic to a file. I know the problem involves the use of JpcapWriter. Why am I getting the error message shown below?
import jpcap.*;
import jpcap.packet.*;
public class dumptraffic
{
private static final int maxPackets = 100;
public static void main(String args[])
{
try
{
NetworkInterface[] devices = JpcapCaptor.getDeviceList();
if (args.length != 1)
{
System.out.println("You must enter a device number.");
int i = 0;
for (NetworkInterface device : devices)
System.out.println((i++) + ": " + device.name);
return;
}
JpcapCaptor jpcap = JpcapCaptor.openDevice(devices[Integer.parseInt(args[0].trim())], 2000, false, 20);
JpcapWriter writer = JpcapWriter.openDumpFile(jpcap, "dump.pcap");
for (int i = 0; i < maxPackets; i++)
writer.writePacket(jpcap.getPacket());
writer.close();
System.out.println("Recorded packets to the file \"dump.pcap\"");
}
catch (Exception e)
{
System.out.println(e.getMessage());
}
}
}
Here is the log that Java dumps:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0234659d, pid=4900, tid=5808
#
# JRE version: 6.0_22-b04
# Java VM: Java HotSpot(TM) Client VM (17.1-b03 mixed mode, sharing windows-x86 )
# Problematic frame:
# v ~BufferBlob::jni_fast_GetLongField
#
# 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 (0x02211c00): JavaThread "main" [_thread_in_native, id=5808, stack(0x002f0000,0x00340000)]
siginfo: ExceptionCode=0xc0000005, reading address 0x00000000
Registers:
EAX=0x00000000, EBX=0x6da511e8, ECX=0x00000000, EDX=0x00000000
ESP=0x0033f578, EBP=0x0033f5b0, ESI=0x00000022, EDI=0x00000000
EIP=0x0234659d, EFLAGS=0x00010246
Top of Stack: (sp=0x0033f578)
0x0033f578: 02211d18 6d97567f 02211d18 00000000
0x0033f588: 00000022 00000000 02211d18 6da511e8
0x0033f598: 0033f58c 0033f19c 0033fd8c 6d9f4ed0
0x0033f5a8: 6da2a4b0 00000000 0033fc68 015d358c
0x0033f5b8: 02211d18 00000000 00000022 02211c00
0x0033f5c8: 380655e0 0033fc68 380655e0 0000005b
0x0033f5d8: 00000000 03000003 001521a8 77a94460
0x0033f5e8: 00000000 77a94460 00000000 001219b8
Instructions: (pc=0x0234659d)
0x0234658d: 00 00 00 8b c1 83 e0 01 8b 54 04 0c 8b 74 24 10
0x0234659d: 8b 12 c1 ee 02 8b 04 32 8b 54 32 04 be e0 16 a6
Stack: [0x002f0000,0x00340000], sp=0x0033f578, free space=13d0033f0ack
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
v ~BufferBlob::jni_fast_GetLongField
C [Jpcap.dll+0x358c]
j dumptraffic.main([Ljava/lang/String;)V+127
v ~StubRoutines::call_stub
V [jvm.dll+0xf3a9c]
V [jvm.dll+0x186591]
V [jvm.dll+0xf3b1d]
V [jvm.dll+0xfd365]
V [jvm.dll+0x104fbd]
C [java.exe+0x2155]
C [java.exe+0x85b4]
C [kernel32.dll+0x4d0e9]
C [ntdll.dll+0x419bb]
C [ntdll.dll+0x4198e]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j jpcap.JpcapWriter.writePacket(Ljpcap/packet/Packet;)V+0
j dumptraffic.main([Ljava/lang/String;)V+127
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x02245800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=2888, stack(0x04550000,0x045a0000)]
0x0223e400 JavaThread "CompilerThread0" daemon [_thread_blocked, id=2620, stack(0x04500000,0x04550000)]
0x0223d400 JavaThread "Attach Listener" daemon [_thread_blocked, id=4060, stack(0x044b0000,0x04500000)]
0x0223a400 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=4280, stack(0x04460000,0x044b0000)]
0x02232000 JavaThread "Finalizer" daemon [_thread_blocked, id=5952, stack(0x04410000,0x04460000)]
0x02230c00 JavaThread "Reference Handler" daemon [_thread_blocked, id=5860, stack(0x008c0000,0x00910000)]
=>0x02211c00 JavaThread "main" [_thread_in_native, id=5808, stack(0x002f0000,0x00340000)]
Other Threads:
0x0222f400 VMThread [stack: 0x003b0000,0x00400000] [id=4396]
0x0224f400 WatcherThread [stack: 0x045a0000,0x045f0000] [id=4156]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 4928K, used 371K [0x28050000, 0x285a0000, 0x2d5a0000)
eden space 4416K, 8% used [0x28050000, 0x280acf00, 0x284a0000)
from space 512K, 0% used [0x284a0000, 0x284a0000, 0x28520000)
to space 512K, 0% used [0x28520000, 0x28520000, 0x285a0000)
tenured generation total 10944K, used 0K [0x2d5a0000, 0x2e050000, 0x38050000)
the space 10944K, 0% used [0x2d5a0000, 0x2d5a0000, 0x2d5a0200, 0x2e050000)
compacting perm gen total 12288K, used 86K [0x38050000, 0x38c50000, 0x3c050000)
the space 12288K, 0% used [0x38050000, 0x38065868, 0x38065a00, 0x38c50000)
ro space 10240K, 51% used [0x3c050000, 0x3c57baf8, 0x3c57bc00, 0x3ca50000)
rw space 12288K, 54% used [0x3ca50000, 0x3d0e76d8, 0x3d0e7800, 0x3d650000)
Dynamic libraries:
0x00400000 - 0x00424000 C:\Windows\system32\java.exe
0x779d0000 - 0x77af7000 C:\Windows\system32\ntdll.dll
0x77700000 - 0x777dc000 C:\Windows\system32\kernel32.dll
0x761c0000 - 0x76286000 C:\Windows\system32\ADVAPI32.dll
0x76460000 - 0x76523000 C:\Windows\system32\RPCRT4.dll
0x10000000 - 0x10048000 C:\Windows\system32\guard32.dll
0x76950000 - 0x769ed000 C:\Windows\system32\USER32.dll
0x77be0000 - 0x77c2b000 C:\Windows\system32\GDI32.dll
0x75f00000 - 0x75f08000 C:\Windows\system32\VERSION.dll
0x77500000 - 0x775aa000 C:\Windows\system32\msvcrt.dll
0x77b60000 - 0x77b7e000 C:\Windows\system32\IMM32.DLL
0x76880000 - 0x76948000 C:\Windows\system32\MSCTF.dll
0x77b10000 - 0x77b19000 C:\Windows\system32\LPK.DLL
0x76290000 - 0x7630d000 C:\Windows\system32\USP10.dll
0x75ef0000 - 0x75ef7000 C:\Windows\system32\fltlib.dll
0x7c340000 - 0x7c396000 C:\Program Files\Java\jre6\bin\msvcr71.dll
0x6d7f0000 - 0x6da97000 C:\Program Files\Java\jre6\bin\client\jvm.dll
0x74900000 - 0x74932000 C:\Windows\system32\WINMM.dll
0x775b0000 - 0x776f5000 C:\Windows\system32\ole32.dll
0x763d0000 - 0x7645d000 C:\Windows\system32\OLEAUT32.dll
0x748c0000 - 0x748fd000 C:\Windows\system32\OLEACC.dll
0x75ec0000 - 0x75eec000 C:\Windows\system32\apphelp.dll
0x6d7a0000 - 0x6d7ac000 C:\Program Files\Java\jre6\bin\verify.dll
0x6d320000 - 0x6d33f000 C:\Program Files\Java\jre6\bin\java.dll
0x6d280000 - 0x6d288000 C:\Program Files\Java\jre6\bin\hpi.dll
0x76070000 - 0x76077000 C:\Windows\system32\PSAPI.DLL
0x6d7e0000 - 0x6d7ef000 C:\Program Files\Java\jre6\bin\zip.dll
0x015d0000 - 0x015f8000 C:\Windows\System32\Jpcap.dll
0x763a0000 - 0x763cd000 C:\Windows\system32\WS2_32.dll
0x77b20000 - 0x77b26000 C:\Windows\system32\NSI.dll
0x045f0000 - 0x0463c000 C:\Windows\system32\wpcap.dll
0x00920000 - 0x00938000 C:\Windows\system32\packet.dll
0x75980000 - 0x75999000 C:\Windows\system32\iphlpapi.dll
0x75940000 - 0x75975000 C:\Windows\system32\dhcpcsvc.DLL
0x75e70000 - 0x75e9c000 C:\Windows\system32\DNSAPI.dll
0x75f10000 - 0x75f24000 C:\Windows\system32\Secur32.dll
0x75930000 - 0x75937000 C:\Windows\system32\WINNSI.DLL
0x75900000 - 0x75922000 C:\Windows\system32\dhcpcsvc6.DLL
0x6d600000 - 0x6d613000 C:\Program Files\Java\jre6\bin\net.dll
0x756f0000 - 0x7572b000 C:\Windows\system32\mswsock.dll
0x756e0000 - 0x756e5000 C:\Windows\System32\wship6.dll
VM Arguments:
java_command: dumptraffic 1
Launcher Type: SUN_STANDARD
Environment Variables:
CLASSPATH=.;C:\Program Files\Java\jre6\lib\ext\QTJava.zip
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\QuickTime\QTSystem\;C:\Ruby192\bin;C:\Program Files\Java\jdk1.6.0_20\bin
USERNAME=Donald Taylor
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 13, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows Vista Build 6002 Service Pack 2
CPU:total 2 (2 cores per cpu, 1 threads per core) family 6 model 15 stepping 13, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3
Memory: 4k page, physical 2094396k(1168912k free), swap 4458364k(3080400k free)
vm_info: Java HotSpot(TM) Client VM (17.1-b03) for windows-x86 JRE (1.6.0_22-b04), built on Sep 15 2010 00:56:36 by "java_re" with MS VC++ 7.1 (VS2003)
time: Mon Nov 08 19:50:43 2010
elapsed time: 0 seconds
I have no solution to your problem, but you might find one on the jpcap discussion board on Google Groups.
Scanning through the messages (keywords "jvm crash") I noted one saying that the problem turned out to be calling a method with the wrong parameters. So you might try double-checking that your code is using the API correctly.
I would not report this to Sun / Oracle. The evidence in the crash dump points to an error in the way that something is using JNI.
Are you running it as root or m$ equivalent? Collecting packets on a network interface promiscuously requires some additional privileges from the OS.
The key line is:
# The crash happened outside the Java Virtual Machine in native code.
That is, the jpcap library uses native code, and the native code segfaulted. This is therefore a bug in the jpcap library, not in the JVM. From the documentation on Github:
Internally, jpcap implements bindings to the libpcap system library
through JNI (the Java Native Interface).
Now, if you want, you could try to debug the segfault by running the whole thing in GDB.
However. Noting
jpcap utilizes libpcap, a widely deployed shared-library for capturing
user-level packets. libpcap must be installed on your system in order
to use jpcap.
in the docs, and considering the fact that a common cause of segfaults is a missing shared library, I suspect that you don't have the pcap library installed on your system.
use this statement inside your for loop
if(captor.getPacket()==null || captor.getPacket()==Packet.EOF) break;

Categories