Fatal error when starting Tomcat mongrel plugin from inside eclipse - java

I am trying to start Tomcat from within eclipse using the Mongrel plugin.
Mongrel plugin adds start/stop/restart buttons on the eclipse main window. When I click on the start button I get this error.
I have multiple jdks / jres on the machine. Is this causing the error ?
I think I have configured my environment variables correctly.
JAVA_HOME, PATH etc.
Error I am getting on the eclipse console window:
Jan 6, 2015 1:44:42 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Sun\SDK\jdk\jre\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Sun\SDK\jdk\jre\bin;C:/Sun/SDK/jdk/bin/../jre/bin/client;C:/Sun/SDK/jdk/bin/../jre/bin;C:\Sun\SDK\jdk\bin;C:\Program Files (x86)\Java\jdk1.6.0_25\jre\bin\client
=============== DEBUG MESSAGE: illegal bytecode sequence - method not verified ================
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_PRIV_INSTRUCTION (0xc0000096) at pc=0x026326e1, pid=9276, tid=6124
#
# JRE version: 6.0_21-b07
# Java VM: Java HotSpot(TM) Client VM (17.0-b17 mixed mode windows-x86 )
# Problematic frame:
# j javax.servlet.jsp.JspFactory.<clinit>()V+-308868101
#
# An error report file with more information is saved as:
# C:\WebDev\tomcat\hs_err_pid9276.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
The contents of the error report file are as shown below:
--------------- T H R E A D ---------------
Current thread (0x0018e000): JavaThread "main" [_thread_in_Java, id=6124, stack(0x001f0000,0x00240000)]
siginfo: ExceptionCode=0xc0000096
Registers:
EAX=0x00000000, EBX=0x00000072, ECX=0x00000008, EDX=0x002d0000
ESP=0x0023edcc, EBP=0x0023ee08, ESI=0x14cc284b, EDI=0x0023ee0c
EIP=0x026326e1, EFLAGS=0x00010216
Top of Stack: (sp=0x0023edcc)
0x0023edcc: 0023ee0c 14cc284b 0023ee08 0023edec
0x0023eddc: 00000072 7ff00000 00000008 00000000
0x0023edec: 026326db 6daf2834 14cc3de0 00000000
0x0023edfc: 14cc1ae0 00000000 0023ee10 0023ee2c
0x0023ee0c: 026302cb 0023ee60 0023ee3c 6d9a3364
0x0023ee1c: 00001fa0 02630266 0018e000 14cc1ae0
0x0023ee2c: 0023eea4 6d9a3abc 0023ee60 0023efb8
0x0023ee3c: 0000000a 14cc1ae0 0263d270 0023ef28
Instructions: (pc=0x026326e1)
0x026326d1: 68 34 28 af 6d e8 00 00 00 00 60 e8 cf 3a 29 6b
0x026326e1: f4 66 90 00 00 00 00 00 00 00 00 00 00 00 00 c0
Stack: [0x001f0000,0x00240000], sp=0x0023edcc, free space=13b0023e774k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
j javax.servlet.jsp.JspFactory.<clinit>()V+-308868101
v ~StubRoutines::call_stub
V [jvm.dll+0xf3abc]
V [jvm.dll+0x1865b1]
V [jvm.dll+0xf3b3d]
V [jvm.dll+0xe331c]
V [jvm.dll+0xe37cb]
V [jvm.dll+0xe3aac]
V [jvm.dll+0xe3bf2]
V [jvm.dll+0xe39fa]
V [jvm.dll+0xe3bf2]
V [jvm.dll+0xeedd3]
j org.apache.jasper.compiler.JspRuntimeContext.<clinit>()V+0
v ~StubRoutines::call_stub
V [jvm.dll+0xf3abc]
V [jvm.dll+0x1865b1]
V [jvm.dll+0xf3b3d]
V [jvm.dll+0xe331c]
V [jvm.dll+0xe37cb]
V [jvm.dll+0xe3aac]
V [jvm.dll+0xe3bf2]
V [jvm.dll+0x11acb2]
V [jvm.dll+0x123019]
C [java.dll+0x13bc]
j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0
j java.lang.Class.forName(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+32
j org.apache.catalina.core.JasperListener.lifecycleEvent(Lorg/apache/catalina/LifecycleEvent;)V+22
j org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Ljava/lang/String;Ljava/lang/Object;)V+178
j org.apache.catalina.core.StandardServer.initialize()V+31
j org.apache.catalina.startup.Catalina.load()V+333
j org.apache.catalina.startup.Catalina.load([Ljava/lang/String;)V+9
v ~StubRoutines::call_stub
V [jvm.dll+0xf3abc]
V [jvm.dll+0x1865b1]
V [jvm.dll+0xf3b3d]
V [jvm.dll+0x1a0ebb]
V [jvm.dll+0x1a18d6]
V [jvm.dll+0x11f423]
C [java.dll+0x7127]
j sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+87
j sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6
j java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+161
j org.apache.catalina.startup.Bootstrap.load([Ljava/lang/String;)V+104
j org.apache.catalina.startup.Bootstrap.main([Ljava/lang/String;)V+125
v ~StubRoutines::call_stub
V [jvm.dll+0xf3abc]
V [jvm.dll+0x1865b1]
V [jvm.dll+0xf3b3d]
V [jvm.dll+0xfd385]
V [jvm.dll+0x104fdd]
C [javaw.exe+0x2155]
C [javaw.exe+0x8614]
C [kernel32.dll+0x1338a]
C [ntdll.dll+0x3bf32]
C [ntdll.dll+0x3bf05]
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x01e77000 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=11008, stack(0x18ef0000,0x18f40000)]
0x01e73c00 JavaThread "CompilerThread0" daemon [_thread_blocked, id=10620, stack(0x18e60000,0x18eb0000)]
0x01e60400 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=11512, stack(0x18dd0000,0x18e20000)]
0x01e5ec00 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=11088, stack(0x18d40000,0x18d90000)]
0x01e5a000 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=12748, stack(0x18aa0000,0x18af0000)]
0x01e4e000 JavaThread "Attach Listener" daemon [_thread_blocked, id=13936, stack(0x188d0000,0x18920000)]
0x01e4b400 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=13672, stack(0x18840000,0x18890000)]
0x01e20000 JavaThread "Finalizer" daemon [_thread_blocked, id=3636, stack(0x187b0000,0x18800000)]
0x01e1b400 JavaThread "Reference Handler" daemon [_thread_blocked, id=12956, stack(0x18720000,0x18770000)]
=>0x0018e000 JavaThread "main" [_thread_in_Java, id=6124, stack(0x001f0000,0x00240000)]
Other Threads:
0x01e19000 VMThread [stack: 0x18690000,0x186e0000] [id=10372]
0x18f48800 WatcherThread [stack: 0x19180000,0x191d0000] [id=2520]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 4928K, used 4066K [0x04630000, 0x04b80000, 0x09b80000)
eden space 4416K, 83% used [0x04630000, 0x049c84a0, 0x04a80000)
from space 512K, 75% used [0x04a80000, 0x04ae06e8, 0x04b00000)
to space 512K, 0% used [0x04b00000, 0x04b00000, 0x04b80000)
tenured generation total 10944K, used 1704K [0x09b80000, 0x0a630000, 0x14630000)
the space 10944K, 15% used [0x09b80000, 0x09d2a380, 0x09d2a400, 0x0a630000)
compacting perm gen total 12288K, used 6772K [0x14630000, 0x15230000, 0x18630000)
the space 12288K, 55% used [0x14630000, 0x14ccd198, 0x14ccd200, 0x15230000)
No shared spaces configured.
Dynamic libraries:
0x00400000 - 0x00424000 C:\Sun\SDK\jdk\jre\bin\javaw.exe
0x773a0000 - 0x77520000 C:\Windows\SysWOW64\ntdll.dll
0x76550000 - 0x76660000 C:\Windows\syswow64\kernel32.dll
0x75f60000 - 0x75fa7000 C:\Windows\syswow64\KERNELBASE.dll
0x768c0000 - 0x76960000 C:\Windows\syswow64\ADVAPI32.dll
0x74f80000 - 0x7502c000 C:\Windows\syswow64\msvcrt.dll
0x75fb0000 - 0x75fc9000 C:\Windows\SysWOW64\sechost.dll
0x74cd0000 - 0x74dc0000 C:\Windows\syswow64\RPCRT4.dll
0x74a60000 - 0x74ac0000 C:\Windows\syswow64\SspiCli.dll
0x74a50000 - 0x74a5c000 C:\Windows\syswow64\CRYPTBASE.dll
0x761b0000 - 0x762b0000 C:\Windows\syswow64\USER32.dll
0x75d20000 - 0x75db0000 C:\Windows\syswow64\GDI32.dll
0x77370000 - 0x7737a000 C:\Windows\syswow64\LPK.dll
0x74ba0000 - 0x74c3d000 C:\Windows\syswow64\USP10.dll
0x74b40000 - 0x74ba0000 C:\Windows\system32\IMM32.DLL
0x762b0000 - 0x7637c000 C:\Windows\syswow64\MSCTF.dll
0x7c340000 - 0x7c396000 C:\Sun\SDK\jdk\jre\bin\msvcr71.dll
0x6d8b0000 - 0x6db57000 C:\Sun\SDK\jdk\jre\bin\client\jvm.dll
0x73ad0000 - 0x73b02000 C:\Windows\system32\WINMM.dll
0x73b10000 - 0x73b5c000 C:\Windows\system32\apphelp.dll
0x6d860000 - 0x6d86c000 C:\Sun\SDK\jdk\jre\bin\verify.dll
0x6d3e0000 - 0x6d3ff000 C:\Sun\SDK\jdk\jre\bin\java.dll
0x6d340000 - 0x6d348000 C:\Sun\SDK\jdk\jre\bin\hpi.dll
0x75d10000 - 0x75d15000 C:\Windows\syswow64\PSAPI.DLL
0x6d430000 - 0x6d459000 C:\Sun\SDK\jdk\jre\bin\jdwp.dll
0x6d750000 - 0x6d756000 C:\Sun\SDK\jdk\jre\bin\npt.dll
0x6d8a0000 - 0x6d8af000 C:\Sun\SDK\jdk\jre\bin\zip.dll
0x6d2b0000 - 0x6d2b7000 C:\Sun\SDK\jdk\jre\bin\dt_socket.dll
0x75fd0000 - 0x76005000 C:\Windows\syswow64\WS2_32.dll
0x761a0000 - 0x761a6000 C:\Windows\syswow64\NSI.dll
0x72b60000 - 0x72b70000 C:\Windows\system32\NLAapi.dll
0x72b50000 - 0x72b60000 C:\Windows\system32\napinsp.dll
0x72b30000 - 0x72b42000 C:\Windows\system32\pnrpnsp.dll
0x74140000 - 0x7417c000 C:\Windows\System32\mswsock.dll
0x73570000 - 0x735b4000 C:\Windows\system32\DNSAPI.dll
0x72b20000 - 0x72b28000 C:\Windows\System32\winrnr.dll
0x72b10000 - 0x72b1d000 C:\Windows\system32\wshbth.dll
0x73f80000 - 0x73f9c000 C:\Windows\system32\IPHLPAPI.DLL
0x73f70000 - 0x73f77000 C:\Windows\system32\WINNSI.DLL
0x73c20000 - 0x73c58000 C:\Windows\System32\fwpuclnt.dll
0x72db0000 - 0x72db6000 C:\Windows\system32\rasadhlp.dll
0x74130000 - 0x74135000 C:\Windows\System32\wshtcpip.dll
0x6d610000 - 0x6d619000 C:\Sun\SDK\jdk\jre\bin\management.dll
VM Arguments:
jvm_args: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:59526 -Dcatalina.home=C:\WebDev\tomcat -Djava.endorsed.dirs=C:\WebDev\tomcat\endorsed -Dcatalina.base=C:\WebDev\tomcat -Djava.io.tmpdir=C:\WebDev\tomcat\temp -DECommJVMProperties=C:\WebDev\deployments\FANWebEAR\FANWebWebApp\WEB-INF\appConfig\JVMProps.props -Dfile.encoding=Cp1252 -Xbootclasspath:C:\Sun\SDK\jdk\jre\lib\rt.jar;C:\Sun\SDK\jdk\jre\lib\jsse.jar;C:\Sun\SDK\jdk\jre\lib\jce.jar;C:\Sun\SDK\jdk\jre\lib\charsets.jar;C:\Sun\SDK\lib\javaee.jar
java_command: org.apache.catalina.startup.Bootstrap -config C:\WebDev\tomcat\servers\FAN\conf\server.xml start
Launcher Type: SUN_STANDARD
Environment Variables:
JAVA_HOME=C:\Sun\SDK\jdk
CLASSPATH=.;C:\Sun\SDK\jdk\lib;C:\PROGRA~1\EIT\SQLLIB\java\db2java.zip;C:\PROGRA~1\EIT\SQLLIB\java\db2jcc.jar;C:\PROGRA~1\EIT\SQLLIB\java\sqlj.zip;C:\PROGRA~1\EIT\SQLLIB\java\db2jcc_license_cu.jar;C:\PROGRA~1\EIT\SQLLIB\bin;C:\PROGRA~1\EIT\SQLLIB\java\common.jar;C:\Program Files (x86)\MySQL\Connector J 5.1.29\mysql-connector-java-5.1.29-bin.jar
PATH=C:\Sun\SDK\jdk\jre\bin;C:/Sun/SDK/jdk/bin/../jre/bin/client;C:/Sun/SDK/jdk/bin/../jre/bin;C:\Sun\SDK\jdk\bin;C:\Program Files (x86)\Java\jdk1.6.0_25\jre\bin\client
USERNAME=dt202173
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows 7 Build 7601 Service Pack 1
CPU:total 4 (8 cores per cpu, 2 threads per core) family 6 model 58 stepping 9, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, ht
Memory: 4k page, physical 8248860k(2392088k free), swap 16495864k(9130856k free)
vm_info: Java HotSpot(TM) Client VM (17.0-b17) for windows-x86 JRE (1.6.0_21-b07), built on Jul 17 2010 01:10:15 by "java_re" with MS VC++ 7.1 (VS2003)
time: Tue Jan 06 13:44:42 2015
elapsed time: 0 seconds

Got this resolved. Putting the answer out here and hope this might help someone.
Basically I had multiple JRE's on my machine and due to a misconfiguration on my side, Tomcat was trying to use files from 2 different JRE's.
To fix it, I went into eclipse Preferences -> Mongrel -> JVM settings. Under the Boot classpath, I put the rt.jar from the jre which tomcat was using to launch.

Related

Java EXCEPTION_ACCESS_VIOLATION while executing batch update from Servlet

I wanted to insert multiple records in MS Access file from java Servlet. The batchupdate runs perfectly for first 10 records but the next batch update gives the following error:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6966ef76, pid=5688, tid=5368
#
# JRE version: 6.0_33-b03
# Java VM: Java HotSpot(TM) Client VM (20.8-b03 mixed mode windows-x86 )
# Problematic frame:
# C [odbcjt32.dll+0x1ef76]
#
# An error report file with more information is saved as:
# D:\SOFT\Eclipse IDE for Java EE\hs_err_pid5688.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.
#
Here is my sample code I am using:
statement = dbConnection.prepareStatement(insertQuery);
for(int i = 0; i < DataCache.seriesTable.getRows().size(); i++) {
ArrayList<String> row = DataCache.seriesTable.getRow(i);
for(int j = 0; j < row.size(); j++) {
statement.setString(j+1, row.get(j));
}
statement.addBatch();
if ((i + 1) % 5 == 0) {
statement.executeBatch(); // Execute every 5 items.
}
}
int[] n = statement.executeBatch();
Any idea how to get rid of this issue?
Here are the contents of "D:\SOFT\Eclipse IDE for Java EE\hs_err_pid5688.log" file.
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6966ef76, pid=5688, tid=5368
#
# JRE version: 6.0_33-b03
# Java VM: Java HotSpot(TM) Client VM (20.8-b03 mixed mode windows-x86 )
# Problematic frame:
# C [odbcjt32.dll+0x1ef76]
#
# 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 (0x184c9400): JavaThread "http-8080-2" daemon [_thread_in_native, id=5368, stack(0x18b60000,0x18bb0000)]
siginfo: ExceptionCode=0xc0000005, reading address 0x00000000
Registers:
EAX=0x00000000, EBX=0x0000000e, ECX=0x0000000a, EDX=0x00000005
ESP=0x18baf258, EBP=0x18baf274, ESI=0x18940340, EDI=0x189402d8
EIP=0x6966ef76, EFLAGS=0x00010246
Top of Stack: (sp=0x18baf258)
0x18baf258: 00000000 18940340 189402d8 00000000
0x18baf268: 00000000 00000001 00000001 18baf2a8
0x18baf278: 6966f95b 00000000 0000000e 00000001
0x18baf288: 00000001 000000ff 00000000 184ea710
0x18baf298: 00000000 00000000 0029d830 0029b240
0x18baf2a8: 18baf2e8 700be766 189402d8 0000000e
0x18baf2b8: 00000001 00000001 00000001 000000ff
0x18baf2c8: 00000000 184ea710 00000000 00000000
Instructions: (pc=0x6966ef76)
0x6966ef56: 52 e8 34 ea ff ff 85 c0 0f 84 56 ff ff ff 66 83
0x6966ef66: 7d 08 00 8b 40 20 75 14 83 f8 ff 75 08 8b 45 24
0x6966ef76: 83 38 ff 75 07 c7 45 f0 01 00 00 00 0f bf 4d 14
0x6966ef86: 6a 00 6a 00 51 6a 02 53 56 8d 87 30 03 00 00 50
Register to memory mapping:
EAX=0x00000000 is an unknown value
EBX=0x0000000e is an unknown value
ECX=0x0000000a is an unknown value
EDX=0x00000005 is an unknown value
ESP=0x18baf258 is pointing into the stack for thread: 0x184c9400
EBP=0x18baf274 is pointing into the stack for thread: 0x184c9400
ESI=0x18940340 is an unknown value
EDI=0x189402d8 is an unknown value
Stack: [0x18b60000,0x18bb0000], sp=0x18baf258, free space=316k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [odbcjt32.dll+0x1ef76] SQLNumParams+0x946
C [odbcjt32.dll+0x1f95b] SQLBindParameter+0x9b
C [ODBC32.dll+0x2e766] SQLBindParameter+0x1df
C [ODBC32.dll+0x2e5fd] SQLBindParameter+0x76
C [JdbcOdbc.dll+0x2c24] Java_sun_jdbc_odbc_JdbcOdbc_bindInParameterString+0x106
j sun.jdbc.odbc.JdbcOdbc.bindInParameterString(JII[BII[B[B[J)V+0
j sun.jdbc.odbc.JdbcOdbc.SQLBindInParameterString(JIIII[B[B[J)V+110
j sun.jdbc.odbc.JdbcOdbcPreparedStatement.setChar(IIILjava/lang/String;)V+135
j sun.jdbc.odbc.JdbcOdbcPreparedStatement.setString(ILjava/lang/String;)V+39
j sun.jdbc.odbc.JdbcOdbcPreparedStatement.setObject(ILjava/lang/Object;II)V+376
j sun.jdbc.odbc.JdbcOdbcPreparedStatement.setObject(ILjava/lang/Object;I)V+5
j sun.jdbc.odbc.JdbcOdbcPreparedStatement.emulateExecuteBatch()[I+268
j sun.jdbc.odbc.JdbcOdbcPreparedStatement.executeBatchUpdate()[I+564
j sun.jdbc.odbc.JdbcOdbcStatement.executeBatch()[I+1
j com.SDAM.servlets.Upload_Data_File.saveSeriesData()V+100
j com.SDAM.servlets.Upload_Data_File.extractSeriesData(Ljava/sql/Connection;)V+149
j com.SDAM.servlets.Upload_Data_File.processRequest(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+278
j com.SDAM.servlets.Upload_Data_File.doPost(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+3
j javax.servlet.http.HttpServlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+139
j javax.servlet.http.HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+30
j org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+376
j org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+101
j org.apache.catalina.core.StandardWrapperValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+804
j org.apache.catalina.core.StandardContextValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+365
j org.apache.catalina.core.StandardHostValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+64
j org.apache.catalina.valves.ErrorReportValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+6
j org.apache.catalina.core.StandardEngineValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+42
j org.apache.catalina.connector.CoyoteAdapter.service(Lorg/apache/coyote/Request;Lorg/apache/coyote/Response;)V+158
j org.apache.coyote.http11.Http11Processor.process(Ljava/net/Socket;)V+514
j org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Ljava/net/Socket;)Z+82
j org.apache.tomcat.util.net.JIoEndpoint$Worker.run()V+41
j java.lang.Thread.run()V+11
v ~StubRoutines::call_stub
V [jvm.dll+0xfadcb]
V [jvm.dll+0x18c3e1]
V [jvm.dll+0xfaf71]
V [jvm.dll+0xfafcb]
V [jvm.dll+0xb5569]
V [jvm.dll+0x1190a4]
V [jvm.dll+0x14108c]
C [msvcr71.dll+0x9565] endthreadex+0xa0
C [kernel32.dll+0x51174] BaseThreadInitThunk+0x12
C [ntdll.dll+0x5b3f5] RtlInitializeExceptionChain+0x63
C [ntdll.dll+0x5b3c8] RtlInitializeExceptionChain+0x36
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j sun.jdbc.odbc.JdbcOdbc.bindInParameterString(JII[BII[B[B[J)V+0
j sun.jdbc.odbc.JdbcOdbc.SQLBindInParameterString(JIIII[B[B[J)V+110
j sun.jdbc.odbc.JdbcOdbcPreparedStatement.setChar(IIILjava/lang/String;)V+135
j sun.jdbc.odbc.JdbcOdbcPreparedStatement.setString(ILjava/lang/String;)V+39
j sun.jdbc.odbc.JdbcOdbcPreparedStatement.setObject(ILjava/lang/Object;II)V+376
j sun.jdbc.odbc.JdbcOdbcPreparedStatement.setObject(ILjava/lang/Object;I)V+5
j sun.jdbc.odbc.JdbcOdbcPreparedStatement.emulateExecuteBatch()[I+268
j sun.jdbc.odbc.JdbcOdbcPreparedStatement.executeBatchUpdate()[I+564
j sun.jdbc.odbc.JdbcOdbcStatement.executeBatch()[I+1
j com.SDAM.servlets.Upload_Data_File.saveSeriesData()V+100
j com.SDAM.servlets.Upload_Data_File.extractSeriesData(Ljava/sql/Connection;)V+149
j com.SDAM.servlets.Upload_Data_File.processRequest(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+278
j com.SDAM.servlets.Upload_Data_File.doPost(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+3
j javax.servlet.http.HttpServlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+139
j javax.servlet.http.HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+30
j org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+376
j org.apache.catalina.core.ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+101
j org.apache.catalina.core.StandardWrapperValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+804
j org.apache.catalina.core.StandardContextValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+365
j org.apache.catalina.core.StandardHostValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+64
j org.apache.catalina.valves.ErrorReportValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+6
j org.apache.catalina.core.StandardEngineValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V+42
j org.apache.catalina.connector.CoyoteAdapter.service(Lorg/apache/coyote/Request;Lorg/apache/coyote/Response;)V+158
j org.apache.coyote.http11.Http11Processor.process(Ljava/net/Socket;)V+514
j org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Ljava/net/Socket;)Z+82
j org.apache.tomcat.util.net.JIoEndpoint$Worker.run()V+41
j java.lang.Thread.run()V+11
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x184aa400 JavaThread "http-8080-7" daemon [_thread_blocked, id=3684, stack(0x18df0000,0x18e40000)]
0x184a9c00 JavaThread "http-8080-6" daemon [_thread_blocked, id=2220, stack(0x18da0000,0x18df0000)]
0x184a9400 JavaThread "http-8080-5" daemon [_thread_blocked, id=5920, stack(0x18d50000,0x18da0000)]
0x184a9000 JavaThread "http-8080-4" daemon [_thread_blocked, id=5112, stack(0x18c00000,0x18c50000)]
0x184ed400 JavaThread "http-8080-3" daemon [_thread_blocked, id=4956, stack(0x18bb0000,0x18c00000)]
=>0x184c9400 JavaThread "http-8080-2" daemon [_thread_in_native, id=5368, stack(0x18b60000,0x18bb0000)]
0x184c3c00 JavaThread "http-8080-1" daemon [_thread_blocked, id=5892, stack(0x18b10000,0x18b60000)]
0x1851c800 JavaThread "TP-Monitor" daemon [_thread_blocked, id=3596, stack(0x18ac0000,0x18b10000)]
0x1851c400 JavaThread "TP-Processor4" daemon [_thread_in_native, id=4256, stack(0x18a70000,0x18ac0000)]
0x1851bc00 JavaThread "TP-Processor3" daemon [_thread_blocked, id=5900, stack(0x18a20000,0x18a70000)]
0x18520800 JavaThread "TP-Processor2" daemon [_thread_blocked, id=5576, stack(0x188d0000,0x18920000)]
0x184af000 JavaThread "TP-Processor1" daemon [_thread_blocked, id=700, stack(0x18880000,0x188d0000)]
0x184b7800 JavaThread "http-8080-Acceptor-0" daemon [_thread_in_native, id=2364, stack(0x18830000,0x18880000)]
0x184afc00 JavaThread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" daemon [_thread_blocked, id=3148, stack(0x180e0000,0x18130000)]
0x18400c00 JavaThread "GC Daemon" daemon [_thread_blocked, id=708, stack(0x18090000,0x180e0000)]
0x0194c400 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=1964, stack(0x17f30000,0x17f80000)]
0x01952800 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=5404, stack(0x17e80000,0x17ed0000)]
0x0193a400 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=5256, stack(0x17e30000,0x17e80000)]
0x01939400 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=5760, stack(0x17dc0000,0x17e10000)]
0x01937400 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=3956, stack(0x17d70000,0x17dc0000)]
0x0192b000 JavaThread "Attach Listener" daemon [_thread_blocked, id=5712, stack(0x17c60000,0x17cb0000)]
0x0192a000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=5516, stack(0x17c10000,0x17c60000)]
0x018fa400 JavaThread "Finalizer" daemon [_thread_blocked, id=5284, stack(0x17bc0000,0x17c10000)]
0x018f8c00 JavaThread "Reference Handler" daemon [_thread_blocked, id=3564, stack(0x17b70000,0x17bc0000)]
0x003e9400 JavaThread "main" [_thread_in_native, id=448, stack(0x00370000,0x003c0000)]
Other Threads:
0x018f5800 VMThread [stack: 0x17b20000,0x17b70000] [id=3760]
0x0194e000 WatcherThread [stack: 0x18040000,0x18090000] [id=1532]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 4992K, used 4236K [0x039e0000, 0x03f40000, 0x08f30000)
eden space 4480K, 83% used [0x039e0000, 0x03d87c10, 0x03e40000)
from space 512K, 96% used [0x03e40000, 0x03ebb4f0, 0x03ec0000)
to space 512K, 0% used [0x03ec0000, 0x03ec0000, 0x03f40000)
tenured generation total 10944K, used 6149K [0x08f30000, 0x099e0000, 0x139e0000)
the space 10944K, 56% used [0x08f30000, 0x09531738, 0x09531800, 0x099e0000)
compacting perm gen total 12288K, used 10772K [0x139e0000, 0x145e0000, 0x179e0000)
the space 12288K, 87% used [0x139e0000, 0x144653b0, 0x14465400, 0x145e0000)
No shared spaces configured.
Code Cache [0x01960000, 0x01af8000, 0x03960000)
total_blobs=697 nmethods=539 adapters=102 free_code_cache=31904832 largest_free_block=192
Dynamic libraries:
0x00400000 - 0x00425000 C:\Program Files\Java\jre6\bin\javaw.exe
0x77660000 - 0x7779c000 C:\Windows\SYSTEM32\ntdll.dll
0x77310000 - 0x773e4000 C:\Windows\system32\kernel32.dll
0x75a20000 - 0x75a6a000 C:\Windows\system32\KERNELBASE.dll
0x777f0000 - 0x77890000 C:\Windows\system32\ADVAPI32.dll
0x77440000 - 0x774ec000 C:\Windows\system32\msvcrt.dll
0x76f80000 - 0x76f99000 C:\Windows\SYSTEM32\sechost.dll
0x75c20000 - 0x75cc1000 C:\Windows\system32\RPCRT4.dll
0x75e00000 - 0x75ec9000 C:\Windows\system32\USER32.dll
0x773f0000 - 0x7743e000 C:\Windows\system32\GDI32.dll
0x774f0000 - 0x774fa000 C:\Windows\system32\LPK.dll
0x75b80000 - 0x75c1d000 C:\Windows\system32\USP10.dll
0x76d10000 - 0x76d2f000 C:\Windows\system32\IMM32.DLL
0x76e20000 - 0x76eec000 C:\Windows\system32\MSCTF.dll
0x7c340000 - 0x7c396000 C:\Program Files\Java\jre6\bin\msvcr71.dll
0x6d7f0000 - 0x6da9f000 C:\Program Files\Java\jre6\bin\client\jvm.dll
0x73c40000 - 0x73c72000 C:\Windows\system32\WINMM.dll
0x756c0000 - 0x7570b000 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
0x6d370000 - 0x6d399000 C:\Program Files\Java\jre6\bin\jdwp.dll
0x6d690000 - 0x6d696000 C:\Program Files\Java\jre6\bin\npt.dll
0x6d7e0000 - 0x6d7ef000 C:\Program Files\Java\jre6\bin\zip.dll
0x6d200000 - 0x6d207000 C:\Program Files\Java\jre6\bin\dt_socket.dll
0x777a0000 - 0x777d5000 C:\Windows\system32\WS2_32.dll
0x75df0000 - 0x75df6000 C:\Windows\system32\NSI.dll
0x73f20000 - 0x73f30000 C:\Windows\system32\NLAapi.dll
0x75200000 - 0x7523c000 C:\Windows\System32\mswsock.dll
0x750c0000 - 0x75104000 C:\Windows\system32\DNSAPI.dll
0x71be0000 - 0x71be8000 C:\Windows\System32\winrnr.dll
0x71bd0000 - 0x71be0000 C:\Windows\system32\napinsp.dll
0x71bb0000 - 0x71bc2000 C:\Windows\system32\pnrpnsp.dll
0x003c0000 - 0x003d9000 C:\Program Files\Bonjour\mdnsNSP.dll
0x73700000 - 0x7371c000 C:\Windows\system32\Iphlpapi.DLL
0x736f0000 - 0x736f7000 C:\Windows\system32\WINNSI.DLL
0x73590000 - 0x735c8000 C:\Windows\System32\fwpuclnt.dll
0x71ba0000 - 0x71ba6000 C:\Windows\system32\rasadhlp.dll
0x74d40000 - 0x74d45000 C:\Windows\System32\wshtcpip.dll
0x6d550000 - 0x6d559000 C:\Program Files\Java\jre6\bin\management.dll
0x6d780000 - 0x6d788000 C:\Program Files\Java\jre6\bin\sunmscapi.dll
0x75900000 - 0x75a1c000 C:\Windows\system32\CRYPT32.dll
0x75870000 - 0x7587c000 C:\Windows\system32\MSASN1.dll
0x6d600000 - 0x6d613000 C:\Program Files\Java\jre6\bin\net.dll
0x751f0000 - 0x751f6000 C:\Windows\System32\wship6.dll
0x75240000 - 0x75256000 C:\Windows\system32\CRYPTSP.dll
0x74fe0000 - 0x7501b000 C:\Windows\system32\rsaenh.dll
0x74e10000 - 0x74e27000 C:\Windows\system32\USERENV.dll
0x75760000 - 0x7576b000 C:\Windows\system32\profapi.dll
0x75740000 - 0x7574c000 C:\Windows\system32\CRYPTBASE.dll
0x6d360000 - 0x6d36d000 C:\Program Files\Java\jre6\bin\JdbcOdbc.dll
0x70090000 - 0x7011a000 C:\Windows\system32\ODBC32.dll
0x72840000 - 0x72878000 C:\Windows\system32\odbcint.dll
0x753e0000 - 0x753f7000 C:\Windows\system32\bcrypt.dll
0x74f20000 - 0x74f5d000 C:\Windows\system32\bcryptprimitives.dll
0x6ffa0000 - 0x6ffe5000 C:\PROGRA~1\COMMON~1\MICROS~1\OFFICE14\ACEODBC.DLL
0x733c0000 - 0x73463000 C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.5570_none_509463cabcb6ef2a\MSVCR90.dll
0x75b00000 - 0x75b7b000 C:\Windows\system32\COMDLG32.dll
0x77280000 - 0x772d7000 C:\Windows\system32\SHLWAPI.dll
0x745b0000 - 0x7474e000 C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7600.16385_none_421189da2b7fabfc\COMCTL32.dll
0x75ed0000 - 0x76b19000 C:\Windows\system32\SHELL32.dll
0x77500000 - 0x7765c000 C:\Windows\system32\ole32.dll
0x5cca0000 - 0x5de7e000 C:\Program Files\Common Files\Microsoft Shared\office14\mso.dll
0x19070000 - 0x192b0000 C:\Windows\system32\msi.dll
0x61e60000 - 0x6226f000 C:\Program Files\Common Files\Microsoft Shared\office14\Cultures\office.odf
0x73990000 - 0x7399f000 C:\Program Files\Common Files\Microsoft Shared\OFFICE14\1033\ACEODBCI.DLL
0x747d0000 - 0x747db000 C:\Program Files\Common Files\Microsoft Shared\OFFICE14\ACEERR.DLL
0x61ab0000 - 0x61cca000 C:\Program Files\Common Files\Microsoft Shared\OFFICE14\ACECORE.DLL
0x73330000 - 0x733be000 C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.5570_none_509463cabcb6ef2a\MSVCP90.dll
0x76ef0000 - 0x76f7f000 C:\Windows\system32\OLEAUT32.dll
0x624c0000 - 0x62592000 C:\Program Files\Common Files\Microsoft Shared\OFFICE14\1033\ACEWSTR.DLL
0x709f0000 - 0x70a0e000 C:\Windows\system32\odbccp32.dll
0x74cb0000 - 0x74cb9000 C:\Windows\system32\VERSION.dll
0x756a0000 - 0x756ba000 C:\Windows\system32\SspiCli.dll
0x74470000 - 0x744b0000 C:\Windows\system32\uxtheme.dll
0x58770000 - 0x5cc9a000 C:\Program Files\Common Files\Microsoft Shared\office14\MSORES.DLL
0x72b60000 - 0x72b76000 C:\Windows\system32\DavClnt.DLL
0x747e0000 - 0x747e8000 C:\Windows\system32\DAVHLPR.dll
0x60120000 - 0x60382000 C:\Program Files\Common Files\Microsoft Shared\office14\1033\MSOINTL.DLL
0x741c0000 - 0x741d3000 C:\Windows\system32\dwmapi.dll
0x696a0000 - 0x69743000 C:\PROGRA~1\COMMON~1\MICROS~1\OFFICE14\ACEEXCL.DLL
0x70470000 - 0x704a2000 C:\Program Files\Common Files\Microsoft Shared\OFFICE14\1033\ACEINTL.DLL
0x76d90000 - 0x76e13000 C:\Windows\system32\CLBCatQ.DLL
0x71d90000 - 0x71ee7000 C:\Windows\System32\msxml6.dll
0x69650000 - 0x6969e000 C:\Windows\system32\odbcjt32.dll
0x5fc30000 - 0x5fdb5000 C:\Windows\system32\msjet40.dll
0x693c0000 - 0x69458000 C:\Windows\system32\mswstr10.dll
0x71450000 - 0x71456000 C:\Windows\system32\odbcji32.dll
0x709d0000 - 0x709e1000 C:\Windows\system32\msjter40.dll
0x70940000 - 0x70946000 C:\Windows\system32\MSJINT40.DLL
0x692e0000 - 0x69328000 C:\Windows\system32\msjtes40.dll
0x1ded0000 - 0x1dedb000 C:\Windows\system32\VBAJET32.DLL
0x230d0000 - 0x23132000 C:\Windows\system32\expsrv.dll
0x777e0000 - 0x777e5000 C:\Windows\system32\PSAPI.DLL
VM Arguments:
jvm_args: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:52879 -Dcatalina.base=D:\SOFT\Eclipse IDE for Java EE\Workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0 -Dcatalina.home=C:\apache-tomcat-6.0.32 -Dwtp.deploy=D:\SOFT\Eclipse IDE for Java EE\Workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps -Djava.endorsed.dirs=C:\apache-tomcat-6.0.32\endorsed -Dfile.encoding=Cp1252
java_command: org.apache.catalina.startup.Bootstrap start
Launcher Type: SUN_STANDARD
Environment Variables:
JAVA_HOME=C:\Program Files\Java\jdk1.6.0_25
CLASSPATH=C:\apache-tomcat-6.0.32\lib\servlet-api.jar;C:\apache-tomcat-6.0.32\lib\jsp-api.jar;.;
PATH=C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:/Program Files/Java/jre6/lib/i386;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\Ruby192\bin;C:\Program Files\Java\jdk1.6.0_25\bin;E:\ApacheAnt\bin;D:\SOFT\Eclipse IDE for Java EE;
USERNAME=khawar.raza
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 6 Model 23 Stepping 7, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows 7 Build 7600
CPU:total 4 (4 cores per cpu, 1 threads per core) family 6 model 23 stepping 7, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1
Memory: 4k page, physical 3088716k(1133348k free), swap 6175668k(3980664k free)
vm_info: Java HotSpot(TM) Client VM (20.8-b03) for windows-x86 JRE (1.6.0_33-b03), built on May 9 2012 09:39:57 by "java_re" with MS VC++ 7.1 (VS2003)
time: Thu Jun 21 12:32:43 2012
elapsed time: 54 seconds
try closing when done:
statement.close();
Edit sorry, for some reason, I misunderstood your question. From the error message:
# The crash happened outside the Java Virtual Machine in native code.
I googled for the error, but this is as far as I was able to get:
http://www.java-forums.org/eclipse/312-exception_access_violation-0xc0000005.html
Some posts report that it could be a bug in JVM and you need to upgrade. Others suggest a corrupted DLL.
The first thing I would do, is test it on another machine, and move from there.
Not a lot of help, I know !
I have find the solution. Actually I was using MS Access as DBMS which is very slow and I think this was the real issue. The insertion speed of Java was incompatible with MS Access. MS Access overwhelmed with huge amount of data as I am inserting more than 200000 records at a time and due to this overwhelming, MS Access could not handle such huge amount of data and ACCESS VIOLATION was being raised. I replaced MS Access with MySQl and now its looking fine.
Thanks to all.
I had the same error, saving data from a scraping program. It was completely random but seemed to happen with increasing frequency.
After a day of trying various things, I finally tried going into Access and doing a Compact and Repair Database. That seems to have done the trick. So that may be a solution for someone else also.

" The crash happened outside the Java Virtual Machine in native code."how to solve this error (Java)?

Using the library in this link http://www.blog.kslemb.com/doku.php/en/projects/globx/java_hid
I have been modfied this code to write on a HID terminal
if (HIDHandle.equals(WinBase.INVALID_HANDLE_VALUE)) {
return HID_DEVICE_NOT_OPENED;
}
/* Write Feature report */
boolean Status=Kernel32.INSTANCE.WriteFile(HIDHandle, buffer, (int)buffersize, null, null);
if (Status == false) {
debug("Write File: " + getSystemError(Kernel32.INSTANCE.GetLastError()));
return HID_DEVICE_TRANSFER_FAILED;
} else {
return HID_DEVICE_SUCCESS;
}
This code would successfully writes on the HID device but then it would produce this error
A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7600d4d5, pid=4660, tid=3780
#
# JRE version: 6.0_27-b07
# Java VM: Java HotSpot(TM) Client VM (20.2-b06 mixed mode, sharing windows-x86 )
# Problematic frame:
# C [KERNELBASE.dll+0xd4d5]
#
# An error report file with more information is saved as:
# D:\eng\senior_project\usb\NetBeansProjects\USB\hs_err_pid4660.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
and These what appear in the log file
a#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7600d4d5, pid=180, tid=4348
#
# JRE version: 6.0_27-b07
# Java VM: Java HotSpot(TM) Client VM (20.2-b06 mixed mode, sharing windows-x86 )
# Problematic frame:
# C [KERNELBASE.dll+0xd4d5]
#
# 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 (0x001e9000): JavaThread "main" [_thread_in_native, id=4348, stack(0x001f0000,0x00240000)]
siginfo: ExceptionCode=0xc0000005, writing address 0x00000000
Registers:
EAX=0x00000005, EBX=0x000002f8, ECX=0x001df148, EDX=0x0023f750
ESP=0x0023f738, EBP=0x0023f770, ESI=0x00000000, EDI=0x00000000
EIP=0x7600d4d5, EFLAGS=0x00010246
Top of Stack: (sp=0x0023f738)
0x0023f738: 165f7936 0023f8c0 00000000 00000000
0x0023f748: 0023f77c 00000004 00000000 00000005
0x0023f758: 0023f738 0023f300 0023fdd4 76036590
0x0023f768: 607ff39e fffffffe 0023f78c 76e512cc
0x0023f778: 000002f8 0211c3c8 00000005 00000000
0x0023f788: 00000000 0023f7a8 1000cb77 000002f8
0x0023f798: 0211c3c8 00000005 00000000 00000000
0x0023f7a8: 0023f7e8 1000c7c2 1000c5a0 0023f7d0
Instructions: (pc=0x7600d4d5)
0x7600d4b5: 3d 03 01 00 00 75 12 6a 00 6a 00 53 ff 15 64 10
0x7600d4c5: 00 76 85 c0 7c 0e 8b 45 e0 85 c0 7c 07 8b 45 e4
0x7600d4d5: 89 07 eb c2 8b c8 81 e1 00 00 00 c0 81 f9 00 00
0x7600d4e5: 00 80 75 05 8b 4d e4 89 0f 50 e8 1e 98 02 00 33
Register to memory mapping:
EAX=0x00000005 is an unknown value
EBX=0x000002f8 is an unknown value
ECX=0x001df148 is an unknown value
EDX=0x0023f750 is pointing into the stack for thread: 0x001e9000
ESP=0x0023f738 is pointing into the stack for thread: 0x001e9000
EBP=0x0023f770 is pointing into the stack for thread: 0x001e9000
ESI=0x00000000 is an unknown value
EDI=0x00000000 is an unknown value
Stack: [0x001f0000,0x00240000], sp=0x0023f738, free space=317k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [KERNELBASE.dll+0xd4d5] WriteFile+0x133
C [kernel32.dll+0x112cc] WriteFile+0x4a
C [jna6285930827620941734.dll+0xcb77] Java_com_sun_jna_Native_initialize_1ffi_1type+0x37d7
C [jna6285930827620941734.dll+0xc7c2] Java_com_sun_jna_Native_initialize_1ffi_1type+0x3422
C [jna6285930827620941734.dll+0x4561] Java_com_sun_jna_Pointer__1getString+0xa31
C [jna6285930827620941734.dll+0x4d2e] Java_com_sun_jna_Function_invokeInt+0x2e
j com.sun.jna.Function.invokeInt(I[Ljava/lang/Object;)I+0
j com.sun.jna.Function.invoke([Ljava/lang/Object;Ljava/lang/Class;Z)Ljava/lang/Object;+315
j com.sun.jna.Function.invoke(Ljava/lang/Class;[Ljava/lang/Object;Ljava/util/Map;)Ljava/lang/Object;+214
j com.sun.jna.Library$Handler.invoke(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;+341
j $Proxy2.WriteFile(Lcom/sun/jna/platform/win32/WinNT$HANDLE;[BILcom/sun/jna/ptr/IntByReference;Lcom/sun/jna/platform/win32/WinBase$OVERLAPPED;)Z+37
j usb.Communication.SetFeatureReport([BS)B+29
j usb.USB.main([Ljava/lang/String;)V+62
v ~StubRoutines::call_stub
V [jvm.dll+0xfac3b]
V [jvm.dll+0x18c391]
V [jvm.dll+0xfacbd]
V [jvm.dll+0x95776]
V [jvm.dll+0x9d5b3]
C [java.exe+0x2155]
C [java.exe+0x85b4]
C [kernel32.dll+0x1339a] BaseThreadInitThunk+0x12
C [ntdll.dll+0x39ef2] RtlInitializeExceptionChain+0x63
C [ntdll.dll+0x39ec5] RtlInitializeExceptionChain+0x36
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j com.sun.jna.Function.invokeInt(I[Ljava/lang/Object;)I+0
j com.sun.jna.Function.invoke([Ljava/lang/Object;Ljava/lang/Class;Z)Ljava/lang/Object;+315
j com.sun.jna.Function.invoke(Ljava/lang/Class;[Ljava/lang/Object;Ljava/util/Map;)Ljava/lang/Object;+214
j com.sun.jna.Library$Handler.invoke(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;+341
j $Proxy2.WriteFile(Lcom/sun/jna/platform/win32/WinNT$HANDLE;[BILcom/sun/jna/ptr/IntByReference;Lcom/sun/jna/platform/win32/WinBase$OVERLAPPED;)Z+37
j usb.Communication.SetFeatureReport([BS)B+29
j usb.USB.main([Ljava/lang/String;)V+62
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x020f1c00 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=2628, stack(0x045e0000,0x04630000)]
0x020ed000 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=3440, stack(0x04550000,0x045a0000)]
0x020ec000 JavaThread "Attach Listener" daemon [_thread_blocked, id=1904, stack(0x044c0000,0x04510000)]
0x020e9000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=4148, stack(0x04430000,0x04480000)]
0x020dec00 JavaThread "Finalizer" daemon [_thread_blocked, id=3336, stack(0x043a0000,0x043f0000)]
0x020dcc00 JavaThread "Reference Handler" daemon [_thread_blocked, id=3196, stack(0x04310000,0x04360000)]
=>0x001e9000 JavaThread "main" [_thread_in_native, id=4348, stack(0x001f0000,0x00240000)]
Other Threads:
0x020a0800 VMThread [stack: 0x04280000,0x042d0000] [id=4704]
0x02100400 WatcherThread [stack: 0x04670000,0x046c0000] [id=4352]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 4928K, used 2462K [0x241e0000, 0x24730000, 0x29730000)
eden space 4416K, 55% used [0x241e0000, 0x24447bb0, 0x24630000)
from space 512K, 0% used [0x24630000, 0x24630000, 0x246b0000)
to space 512K, 0% used [0x246b0000, 0x246b0000, 0x24730000)
tenured generation total 10944K, used 0K [0x29730000, 0x2a1e0000, 0x341e0000)
the space 10944K, 0% used [0x29730000, 0x29730000, 0x29730200, 0x2a1e0000)
compacting perm gen total 12288K, used 669K [0x341e0000, 0x34de0000, 0x381e0000)
the space 12288K, 5% used [0x341e0000, 0x342877e8, 0x34287800, 0x34de0000)
ro space 10240K, 54% used [0x381e0000, 0x3875f548, 0x3875f600, 0x38be0000)
rw space 12288K, 55% used [0x38be0000, 0x39285140, 0x39285200, 0x397e0000)
Code Cache [0x02170000, 0x02200000, 0x04170000)
total_blobs=201 nmethods=66 adapters=71 free_code_cache=32980800 largest_free_block=0
Dynamic libraries:
0x00400000 - 0x00424000 C:\Program Files (x86)\Java\jdk1.6.0_27\bin\java.exe
0x77420000 - 0x775a0000 C:\Windows\SysWOW64\ntdll.dll
0x76e40000 - 0x76f50000 C:\Windows\syswow64\kernel32.dll
0x76000000 - 0x76046000 C:\Windows\syswow64\KERNELBASE.dll
0x76920000 - 0x769c0000 C:\Windows\syswow64\ADVAPI32.dll
0x76f50000 - 0x76ffc000 C:\Windows\syswow64\msvcrt.dll
0x75d80000 - 0x75d99000 C:\Windows\SysWOW64\sechost.dll
0x767d0000 - 0x768c0000 C:\Windows\syswow64\RPCRT4.dll
0x74f80000 - 0x74fe0000 C:\Windows\syswow64\SspiCli.dll
0x74f70000 - 0x74f7c000 C:\Windows\syswow64\CRYPTBASE.dll
0x7c340000 - 0x7c396000 C:\Program Files (x86)\Java\jdk1.6.0_27\jre\bin\msvcr71.dll
0x6d8a0000 - 0x6db4f000 C:\Program Files (x86)\Java\jdk1.6.0_27\jre\bin\client\jvm.dll
0x76ae0000 - 0x76be0000 C:\Windows\syswow64\USER32.dll
0x76730000 - 0x767c0000 C:\Windows\syswow64\GDI32.dll
0x75ca0000 - 0x75caa000 C:\Windows\syswow64\LPK.dll
0x76da0000 - 0x76e3d000 C:\Windows\syswow64\USP10.dll
0x745c0000 - 0x745f2000 C:\Windows\system32\WINMM.dll
0x76be0000 - 0x76c40000 C:\Windows\system32\IMM32.DLL
0x76050000 - 0x7611c000 C:\Windows\syswow64\MSCTF.dll
0x71540000 - 0x7158c000 C:\Windows\system32\apphelp.dll
0x6d850000 - 0x6d85c000 C:\Program Files (x86)\Java\jdk1.6.0_27\jre\bin\verify.dll
0x6d3d0000 - 0x6d3ef000 C:\Program Files (x86)\Java\jdk1.6.0_27\jre\bin\java.dll
0x6d890000 - 0x6d89f000 C:\Program Files (x86)\Java\jdk1.6.0_27\jre\bin\zip.dll
0x743e0000 - 0x743f6000 C:\Windows\system32\CRYPTSP.dll
0x743a0000 - 0x743db000 C:\Windows\system32\rsaenh.dll
0x71090000 - 0x710a7000 C:\Windows\system32\USERENV.dll
0x74380000 - 0x7438b000 C:\Windows\system32\profapi.dll
0x6d6b0000 - 0x6d6c3000 C:\Program Files (x86)\Java\jdk1.6.0_27\jre\bin\net.dll
0x76120000 - 0x76155000 C:\Windows\syswow64\WS2_32.dll
0x773f0000 - 0x773f6000 C:\Windows\syswow64\NSI.dll
0x74690000 - 0x746cc000 C:\Windows\system32\mswsock.dll
0x72e40000 - 0x72e46000 C:\Windows\System32\wship6.dll
0x746d0000 - 0x746e0000 C:\Windows\system32\NLAapi.dll
0x74620000 - 0x74630000 C:\Windows\system32\napinsp.dll
0x74600000 - 0x74612000 C:\Windows\system32\pnrpnsp.dll
0x745b0000 - 0x745bd000 C:\Windows\system32\wshbth.dll
0x74640000 - 0x74684000 C:\Windows\system32\DNSAPI.dll
0x74630000 - 0x74638000 C:\Windows\System32\winrnr.dll
0x74550000 - 0x74555000 C:\Windows\System32\wshtcpip.dll
0x74740000 - 0x7475c000 C:\Windows\system32\IPHLPAPI.DLL
0x74730000 - 0x74737000 C:\Windows\system32\WINNSI.DLL
0x74560000 - 0x74566000 C:\Windows\system32\rasadhlp.dll
0x74570000 - 0x745a8000 C:\Windows\System32\fwpuclnt.dll
0x10000000 - 0x10055000 C:\Users\mohamed\AppData\Local\Temp\jna6285930827620941734.dll
0x75c90000 - 0x75c95000 C:\Windows\syswow64\PSAPI.DLL
0x74b80000 - 0x74b89000 C:\Windows\system32\hid.dll
0x76160000 - 0x762fd000 C:\Windows\syswow64\setupapi.dll
0x75d40000 - 0x75d67000 C:\Windows\syswow64\CFGMGR32.dll
0x76500000 - 0x7658f000 C:\Windows\syswow64\OLEAUT32.dll
0x76c40000 - 0x76d9c000 C:\Windows\syswow64\ole32.dll
0x77000000 - 0x77012000 C:\Windows\syswow64\DEVOBJ.dll
0x75c60000 - 0x75c8d000 C:\Windows\syswow64\WINTRUST.dll
0x769c0000 - 0x76add000 C:\Windows\syswow64\CRYPT32.dll
0x767c0000 - 0x767cc000 C:\Windows\syswow64\MSASN1.dll
VM Arguments:
jvm_args: -Dfile.encoding=UTF-8
java_command: usb.USB
Launcher Type: SUN_STANDARD
Environment Variables:
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Lenovo\Bluetooth Software\;C:\Program Files\Lenovo\Bluetooth Software\syswow64;
USERNAME=mohamed
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 23 Stepping 10, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows 7 , 64 bit 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
Memory: 4k page, physical 3105384k(1019428k free), swap 6208920k(4162952k free)
vm_info: Java HotSpot(TM) Client VM (20.2-b06) for windows-x86 JRE (1.6.0_27-b07), built on Jul 19 2011 01:04:42 by "java_re" with MS VC++ 7.1 (VS2003)
time: Fri Feb 10 17:48:29 2012
elapsed time: 0 seconds
i have found the solution to this problem ,
boolean Status=Kernel32.INSTANCE.WriteFile(HIDHandle, buffer, (int)buffersize, null, null);
the function doesn't accept two nulls , only one null can be passed to the function , so the correction example would be :
IntByReference bWritten = new IntByReference();
/* Write Feature report */
boolean Status=Kernel32.INSTANCE.WriteFile(HIDHandle, buffer, (int)buffersize, bWritten, null);
I'm guessing you're using a Java library that has portions of it written in C (Java Native Interface). The error is happening in one of those C portions. Unless that library is something you have source code for that library, your only option would be to contact the vendor or look for an updated version.
But check this and see if it's related.
I reinstalled Eclipse.
Installed a different version of JDK.
Launched Eclipse as admin.
None of the above worked.
Finally I found the solution from Richard Ayotte here:
https://bugs.launchpad.net/ubuntu-gnome/+bug/1163501
Apparently, the tool tip window is the main culprit.
Solution:
Locate the file eclipse.ini in your Eclipse installation directory.
Put the following line in your eclipse.ini file (or AptanaStudio3.ini, if that is applicable to you) :
-Dorg.eclipse.swt.browser.DefaultType=mozilla
Save the file and restart Eclipse. Thank you, Rich !

SWTBot crashes JVM when running a test in an RCP application

I'm trying SWTBot out with a sample project according to the SWTBot User Guide. My problem is that when I run the second test (MessageCreateTest) the JVM crashes and I get the following error:
A fatal error has been detected by the Java Runtime Environment:
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000007fefd644929, pid=4852, tid=5556
JRE version: 6.0_18-b07
Java VM: Java HotSpot(TM) 64-Bit Server VM (16.0-b13 mixed mode windows-amd64 )
Problematic frame:
C [SHELL32.dll+0xa4929]
An error report file with more information is saved as:
D:\work\v8\workspace\test_workspace\org.rcpmail.test\hs_err_pid4852.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.
My test class:
package org.rcpmail.test;
import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
import org.junit.Before;
import org.junit.Test;
public class MessageCreateTest {
private SWTWorkbenchBot bot;
#Test
public void canCreateAMessage() throws Exception {
bot.menu("File").menu("Open Another Message View").click();
}
#Before
public void setup() {
bot = new SWTWorkbenchBot();
}
}
I checked out the error log file which I include here:
--------------- T H R E A D ---------------
Current thread (0x000000000053b800): JavaThread "main" [_thread_in_native, id=5556, stack(0x0000000002370000,0x0000000002470000)]
siginfo: ExceptionCode=0xc0000005, reading address 0x0000000000000000
Registers:
EAX=0x000000007ffffffe, EBX=0x0000000000000010, ECX=0x000000000246cc90, EDX=0x0000000000000104
ESP=0x000000000246cb08, EBP=0x000000000246cc90, ESI=0x0000000000000010, EDI=0x0000000000000000
EIP=0x000007fefd644929, EFLAGS=0x0000000000010202
Top of Stack: (sp=0x000000000246cb08)
0x000000000246cb08: 000007fefd8f961d 000000000000013f
0x000000000246cb18: 000000000000013c 000050446227f7fe
0x000000000246cb28: 00000000001a5710 0000000000291930
0x000000000246cb38: 0000000000000202 0000000000291998
0x000000000246cb48: 000007fefd8f9700 0000000000000010
0x000000000246cb58: 000000000246cf48 0000000000271b58
0x000000000246cb68: 0000000000000000 000000000246cb80
0x000000000246cb78: 00000000324d0080 000007fefd9f3124
0x000000000246cb88: 0000000000000000 0028002000730025
0x000000000246cb98: 0000000000000029 000000000028a1d0
0x000000000246cba8: 00000000001a57b4 000000000028a1d0
0x000000000246cbb8: 0000000000000104 000000000246ce90
0x000000000246cbc8: 00000000001a5710 00000000000000e9
0x000000000246cbd8: 000000000246cbe0 00000000001a0230
0x000000000246cbe8: 00000000000011f5 0055005c003a0043
0x000000000246cbf8: 0073007200650073 006500640065005c
Instructions: (pc=0x000007fefd644929)
0x000007fefd644919: d2 4c 2b c1 90 90 90 49 8d 04 12 49 3b c3 74 18
0x000007fefd644929: 41 0f b7 04 08 66 41 3b c3 74 0d 66 89 01 48 83
Stack: [0x0000000002370000,0x0000000002470000], sp=0x000000000246cb08, free space=3f20000000000000000k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [SHELL32.dll+0xa4929]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j org.eclipse.swt.internal.win32.OS.VtblCall(IJ)I+0
j org.eclipse.swt.widgets.TaskBar.getDirectory(JJ[CZ)J+141
j org.eclipse.swt.widgets.TaskBar.getDirectory([C)Ljava/lang/String;+204
j org.eclipse.swt.widgets.TaskBar.setMenu(Lorg/eclipse/swt/widgets/Menu;)V+97
j org.eclipse.swt.widgets.TaskItem.setMenu(Lorg/eclipse/swt/widgets/Menu;)V+53
v ~StubRoutines::call_stub
j sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+0
j sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+87
j sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6
j java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+161
j org.eclipse.mylyn.internal.commons.ui.TaskBarManager$TaskBarMenuManager.setMenuOnTaskItem(Lorg/eclipse/swt/widgets/Widget;Lorg/eclipse/swt/widgets/Menu;)V+45
j org.eclipse.mylyn.internal.commons.ui.TaskBarManager$TaskBarMenuManager.update(ZZ)V+68
j org.eclipse.jface.action.MenuManager.update(Z)V+3
j org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin.addSystemTaskBarActions()V+55
j org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin.access$6(Lorg/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin;)V+1
j org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin$TasksUiInitializationJob.runInUIThread(Lorg/eclipse/core/runtime/IProgressMonitor;)Lorg/eclipse/core/runtime/IStatus;+211
j org.eclipse.ui.progress.UIJob$1.run()V+53
j org.eclipse.swt.widgets.RunnableLock.run()V+11
j org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Z)Z+29
j org.eclipse.swt.widgets.Display.runAsyncMessages(Z)Z+5
j org.eclipse.swt.widgets.Display.readAndDispatch()Z+91
j org.eclipse.ui.internal.Workbench.runEventLoop(Lorg/eclipse/jface/window/Window$IExceptionHandler;Lorg/eclipse/swt/widgets/Display;)V+9
j org.eclipse.ui.internal.Workbench.runUI()I+555
j org.eclipse.ui.internal.Workbench.access$4(Lorg/eclipse/ui/internal/Workbench;)I+1
j org.eclipse.ui.internal.Workbench$7.run()V+55
j org.eclipse.core.databinding.observable.Realm.runWithDefault(Lorg/eclipse/core/databinding/observable/Realm;Ljava/lang/Runnable;)V+12
j org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Lorg/eclipse/swt/widgets/Display;Lorg/eclipse/ui/application/WorkbenchAdvisor;)I+18
j org.eclipse.ui.PlatformUI.createAndRunWorkbench(Lorg/eclipse/swt/widgets/Display;Lorg/eclipse/ui/application/WorkbenchAdvisor;)I+2
j org.rcpmail.Application.start(Lorg/eclipse/equinox/app/IApplicationContext;)Ljava/lang/Object;+12
j org.eclipse.swtbot.eclipse.core.UITestApplication.start(Lorg/eclipse/equinox/app/IApplicationContext;)Ljava/lang/Object;+87
j org.eclipse.equinox.internal.app.EclipseAppHandle.run(Ljava/lang/Object;)Ljava/lang/Object;+135
j org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Ljava/lang/Object;)Ljava/lang/Object;+103
j org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Ljava/lang/Object;)Ljava/lang/Object;+29
j org.eclipse.core.runtime.adaptor.EclipseStarter.run(Ljava/lang/Object;)Ljava/lang/Object;+149
j org.eclipse.core.runtime.adaptor.EclipseStarter.run([Ljava/lang/String;Ljava/lang/Runnable;)Ljava/lang/Object;+183
v ~StubRoutines::call_stub
j sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+0
j sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+87
j sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6
j java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+161
j org.eclipse.equinox.launcher.Main.invokeFramework([Ljava/lang/String;[Ljava/net/URL;)V+211
j org.eclipse.equinox.launcher.Main.basicRun([Ljava/lang/String;)V+126
j org.eclipse.equinox.launcher.Main.run([Ljava/lang/String;)I+4
j org.eclipse.equinox.launcher.Main.main([Ljava/lang/String;)V+10
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x000000002c122800 JavaThread "Worker-2" [_thread_blocked, id=4932, stack(0x0000000032360000,0x0000000032460000)]
0x000000002ce35800 JavaThread "Worker-1" [_thread_blocked, id=1396, stack(0x0000000032260000,0x0000000032360000)]
0x000000002d696000 JavaThread "WorkbenchTestable" [_thread_blocked, id=5784, stack(0x0000000032160000,0x0000000032260000)]
0x000000002ecc6800 JavaThread "Worker-0" [_thread_in_vm, id=5760, stack(0x0000000031960000,0x0000000031a60000)]
0x000000002d346000 JavaThread "Worker-JM" [_thread_blocked, id=6064, stack(0x000000002e760000,0x000000002e860000)]
0x000000002cc27800 JavaThread "[Timer] - Main Queue Handler" daemon [_thread_blocked, id=5176, stack(0x000000002e660000,0x000000002e760000)]
0x000000002d18f000 JavaThread "Bundle File Closer" daemon [_thread_blocked, id=5568, stack(0x000000002e460000,0x000000002e560000)]
0x000000002cdcc800 JavaThread "Start Level Event Dispatcher" daemon [_thread_blocked, id=5164, stack(0x000000002e360000,0x000000002e460000)]
0x000000002c9b8800 JavaThread "Framework Event Dispatcher" daemon [_thread_blocked, id=5944, stack(0x000000002e260000,0x000000002e360000)]
0x000000002cda6000 JavaThread "State Saver" [_thread_blocked, id=1036, stack(0x000000002e160000,0x000000002e260000)]
0x000000002b7cb800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=4904, stack(0x000000002bd60000,0x000000002be60000)]
0x000000002b7ca800 JavaThread "CompilerThread1" daemon [_thread_blocked, id=1128, stack(0x000000002bc60000,0x000000002bd60000)]
0x000000002b7b5800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5652, stack(0x000000002bb60000,0x000000002bc60000)]
0x000000002b7b1800 JavaThread "Attach Listener" daemon [_thread_blocked, id=4332, stack(0x000000002ba60000,0x000000002bb60000)]
0x000000002b7aa800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=288, stack(0x000000002b960000,0x000000002ba60000)]
0x0000000000527000 JavaThread "Finalizer" daemon [_thread_blocked, id=4720, stack(0x000000002b660000,0x000000002b760000)]
0x0000000000520800 JavaThread "Reference Handler" daemon [_thread_blocked, id=5248, stack(0x000000002b560000,0x000000002b660000)]
=>0x000000000053b800 JavaThread "main" [_thread_in_native, id=5556, stack(0x0000000002370000,0x0000000002470000)]
Other Threads:
0x000000000051c000 VMThread [stack: 0x000000002b460000,0x000000002b560000] [id=2328]
0x000000002b7cc800 WatcherThread [stack: 0x000000002be60000,0x000000002bf60000] [id=5404]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
PSYoungGen total 139008K, used 71391K [0x000000001fe90000, 0x000000002a930000, 0x000000002a930000)
eden space 130048K, 48% used [0x000000001fe90000,0x0000000023b8fe48,0x0000000027d90000)
from space 8960K, 99% used [0x000000002a070000,0x000000002a928048,0x000000002a930000)
to space 11520K, 0% used [0x00000000292b0000,0x00000000292b0000,0x0000000029df0000)
PSOldGen total 49600K, used 30640K [0x000000000a930000, 0x000000000d9a0000, 0x000000001fe90000)
object space 49600K, 61% used [0x000000000a930000,0x000000000c71c020,0x000000000d9a0000)
PSPermGen total 34816K, used 34638K [0x0000000005530000, 0x0000000007730000, 0x000000000a930000)
object space 34816K, 99% used [0x0000000005530000,0x0000000007703bd0,0x0000000007730000)
Dynamic libraries:
0x0000000000400000 - 0x000000000042e000 D:\work\v8\tool\win7-64\jdk1.6.0_18\bin\javaw.exe
0x0000000076ed0000 - 0x0000000077079000 C:\Windows\SYSTEM32\ntdll.dll
0x0000000076a00000 - 0x0000000076b1f000 C:\Windows\system32\kernel32.dll
0x000007fefc9d0000 - 0x000007fefca3c000 C:\Windows\system32\KERNELBASE.dll
0x000007fefd100000 - 0x000007fefd1db000 C:\Windows\system32\ADVAPI32.dll
0x000007fefcd10000 - 0x000007fefcdaf000 C:\Windows\system32\msvcrt.dll
0x000007fefd0b0000 - 0x000007fefd0cf000 C:\Windows\SYSTEM32\sechost.dll
0x000007fefd470000 - 0x000007fefd59d000 C:\Windows\system32\RPCRT4.dll
0x0000000076dd0000 - 0x0000000076eca000 C:\Windows\system32\USER32.dll
0x000007fefe5f0000 - 0x000007fefe657000 C:\Windows\system32\GDI32.dll
0x000007fefce20000 - 0x000007fefce2e000 C:\Windows\system32\LPK.dll
0x000007fefce30000 - 0x000007fefcef9000 C:\Windows\system32\USP10.dll
0x000007fefd0d0000 - 0x000007fefd0fe000 C:\Windows\system32\IMM32.DLL
0x000007fefcfa0000 - 0x000007fefd0a9000 C:\Windows\system32\MSCTF.dll
0x000000006d890000 - 0x000000006df35000 D:\work\v8\tool\win7-64\jdk1.6.0_18\jre\bin\server\jvm.dll
0x000007fef9ea0000 - 0x000007fef9edb000 C:\Windows\system32\WINMM.dll
0x000000006d800000 - 0x000000006d80e000 D:\work\v8\tool\win7-64\jdk1.6.0_18\jre\bin\verify.dll
0x000000006d450000 - 0x000000006d477000 D:\work\v8\tool\win7-64\jdk1.6.0_18\jre\bin\java.dll
0x000000006d3b0000 - 0x000000006d3ba000 D:\work\v8\tool\win7-64\jdk1.6.0_18\jre\bin\hpi.dll
0x0000000077090000 - 0x0000000077097000 C:\Windows\system32\PSAPI.DLL
0x000000006d850000 - 0x000000006d862000 D:\work\v8\tool\win7-64\jdk1.6.0_18\jre\bin\zip.dll
0x000007fefc170000 - 0x000007fefc187000 C:\Windows\system32\CRYPTSP.dll
0x000007fefbe70000 - 0x000007fefbeb7000 C:\Windows\system32\rsaenh.dll
0x000007fefbbe0000 - 0x000007fefbbfe000 C:\Windows\system32\USERENV.dll
0x000007fefc8a0000 - 0x000007fefc8af000 C:\Windows\system32\profapi.dll
0x000007fefc7d0000 - 0x000007fefc7df000 C:\Windows\system32\CRYPTBASE.dll
0x000000006d6a0000 - 0x000000006d6b7000 D:\work\v8\tool\win7-64\jdk1.6.0_18\jre\bin\net.dll
0x000007fefcdd0000 - 0x000007fefce1d000 C:\Windows\system32\WS2_32.dll
0x000007fefe660000 - 0x000007fefe668000 C:\Windows\system32\NSI.dll
0x000007fefc110000 - 0x000007fefc165000 C:\Windows\system32\mswsock.dll
0x000007fefc100000 - 0x000007fefc107000 C:\Windows\System32\wship6.dll
0x000007fefacc0000 - 0x000007fefacd5000 C:\Windows\system32\NLAapi.dll
0x000007fef78d0000 - 0x000007fef78e5000 C:\Windows\system32\napinsp.dll
0x000007fef78b0000 - 0x000007fef78c9000 C:\Windows\system32\pnrpnsp.dll
0x000007fefbf90000 - 0x000007fefbfeb000 C:\Windows\system32\DNSAPI.dll
0x000007fef78a0000 - 0x000007fef78ab000 C:\Windows\System32\winrnr.dll
0x000007fefbab0000 - 0x000007fefbab7000 C:\Windows\System32\wshtcpip.dll
0x000007fefa900000 - 0x000007fefa927000 C:\Windows\system32\IPHLPAPI.DLL
0x000007fefa7c0000 - 0x000007fefa7cb000 C:\Windows\system32\WINNSI.DLL
0x000007fef8460000 - 0x000007fef8468000 C:\Windows\system32\rasadhlp.dll
0x000007fefa680000 - 0x000007fefa6d3000 C:\Windows\System32\fwpuclnt.dll
0x000000006d6c0000 - 0x000000006d6cb000 D:\work\v8\tool\win7-64\jdk1.6.0_18\jre\bin\nio.dll
0x0000000072000000 - 0x0000000072012000 D:\work\v8\tool\win7-64\eclipse-custom-3.6.0\plugins\org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.2.R36x_v20101222\eclipse_1312.dll
0x000007fefb0b0000 - 0x000007fefb2a4000 C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_fa396087175ac9ac\COMCTL32.dll
0x000007fefd3f0000 - 0x000007fefd461000 C:\Windows\system32\SHLWAPI.dll
0x000007fefb9e0000 - 0x000007fefb9ec000 C:\Windows\system32\VERSION.dll
0x000000002c4a0000 - 0x000000002c53b000 D:\work\v8\workspace\test_workspace\.metadata\.plugins\org.eclipse.pde.core\pde-junit\org.eclipse.osgi\bundles\611\1\.cp\swt-win32-3659.dll
0x000007fefd1e0000 - 0x000007fefd3e3000 C:\Windows\system32\ole32.dll
0x000007fefe670000 - 0x000007fefe747000 C:\Windows\system32\OLEAUT32.dll
0x000007fefcf00000 - 0x000007fefcf97000 C:\Windows\system32\comdlg32.dll
0x000007fefd5a0000 - 0x000007fefe328000 C:\Windows\system32\SHELL32.dll
0x0000000076c70000 - 0x0000000076dca000 C:\Windows\system32\WININET.dll
0x00000000770a0000 - 0x00000000770a3000 C:\Windows\system32\Normaliz.dll
0x00000000767f0000 - 0x00000000769fd000 C:\Windows\system32\iertutil.dll
0x0000000076b20000 - 0x0000000076c6d000 C:\Windows\system32\urlmon.dll
0x000007fefafd0000 - 0x000007fefb026000 C:\Windows\system32\uxtheme.dll
0x000007fefaa10000 - 0x000007fefaa28000 C:\Windows\system32\dwmapi.dll
0x00000000003e0000 - 0x00000000003fe000 D:\work\v8\workspace\test_workspace\.metadata\.plugins\org.eclipse.pde.core\pde-junit\org.eclipse.osgi\bundles\611\1\.cp\swt-gdip-win32-3659.dll
0x000007fefadb0000 - 0x000007fefafc5000 C:\Windows\WinSxS\amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.17514_none_2b24536c71ed437a\gdiplus.dll
0x000007fef2af0000 - 0x000007fef2b44000 C:\Windows\system32\oleacc.dll
0x000007fefb5a0000 - 0x000007fefb6cc000 C:\Windows\system32\propsys.dll
0x000007fefcc70000 - 0x000007fefcd09000 C:\Windows\system32\CLBCatQ.DLL
0x000007fef46a0000 - 0x000007fef486a000 C:\Windows\system32\explorerframe.dll
0x000007fefab10000 - 0x000007fefab53000 C:\Windows\system32\DUser.dll
0x000007fefabc0000 - 0x000007fefacb2000 C:\Windows\system32\DUI70.dll
0x000007fef7c60000 - 0x000007fef7c71000 D:\work\v8\workspace\test_workspace\.metadata\.plugins\org.eclipse.pde.core\pde-junit\org.eclipse.osgi\bundles\95\1\.cp\jWinHttp-1.0.0.dll
0x000007fef90c0000 - 0x000007fef9131000 C:\Windows\system32\WINHTTP.dll
0x000007fef9050000 - 0x000007fef90b4000 C:\Windows\system32\webio.dll
0x000007fefa650000 - 0x000007fefa661000 C:\Windows\system32\dhcpcsvc6.DLL
0x000007fefa5d0000 - 0x000007fefa5e8000 C:\Windows\system32\dhcpcsvc.DLL
0x000007fefc740000 - 0x000007fefc765000 C:\Windows\system32\SspiCli.dll
0x000007fefbd70000 - 0x000007fefbd7a000 C:\Windows\system32\credssp.dll
0x000007fefc950000 - 0x000007fefc986000 C:\Windows\system32\CFGMGR32.dll
0x000007fefc880000 - 0x000007fefc894000 C:\Windows\system32\RpcRtRemote.dll
0x000007fefa010000 - 0x000007fefa017000 C:\Windows\system32\msimg32.dll
0x000007fefe3b0000 - 0x000007fefe587000 C:\Windows\system32\SETUPAPI.dll
0x000007fefca40000 - 0x000007fefca5a000 C:\Windows\system32\DEVOBJ.dll
0x000007fefb080000 - 0x000007fefb0ad000 C:\Windows\system32\ntmarta.dll
0x000007fefe590000 - 0x000007fefe5e2000 C:\Windows\system32\WLDAP32.dll
VM Arguments:
jvm_args: -Dosgi.requiredJavaVersion=1.5 -Xms40m -Xmx512m -Declipse.pde.launch=true -Declipse.p2.data.area=#config.dir\p2 -Dfile.encoding=Cp1250
java_command: org.eclipse.equinox.launcher.Main -os win32 -ws win32 -arch x86_64 -nl hu_HU -consoleLog -version 3 -port 56944 -testLoaderClass org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader -loaderpluginname org.eclipse.jdt.junit4.runtime -classNames org.rcpmail.test.MessageCreateTest -application org.eclipse.swtbot.eclipse.core.swtbottestapplication -product org.rcpmail.product -data D:\work\v8\workspace\test_workspace/../junit-workspace -configuration file:D:/work/v8/workspace/test_workspace/.metadata/.plugins/org.eclipse.pde.core/pde-junit/ -dev file:D:/work/v8/workspace/test_workspace/.metadata/.plugins/org.eclipse.pde.core/pde-junit/dev.properties -os win32 -ws win32 -arch x86_64 -nl hu_HU -consoleLog -testpluginname org.rcpmail.test
Launcher Type: SUN_STANDARD
Environment Variables:
JAVA_HOME=D:\work\v8\tool\win7-64\jdk1.6.0_18
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;;D:\work\v8\;D:\work\v8\tool\win7-64\jdk1.6.0_18\bin;D:\work\v8\tool\win7-64\eclipse-custom-3.6.0;D:\work\v8\tool\win7-64\apache-ant-1.8.0\bin;\bin;D:\work\v8\tool\win7-64\svn-win32-1.6.6\bin
USERNAME=edem
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 30 Stepping 5, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows 7 Build 7601 Service Pack 1
CPU:total 4 (8 cores per cpu, 2 threads per core) family 6 model 30 stepping 5, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, ht
Memory: 4k page, physical 8379508k(5484476k free), swap 16757168k(13043912k free)
vm_info: Java HotSpot(TM) 64-Bit Server VM (16.0-b13) for windows-amd64 JRE (1.6.0_18-b07), built on Dec 17 2009 13:24:11 by "java_re" with MS VC++ 8.0 (VS2005)
time: Mon Aug 01 15:36:17 2011
elapsed time: 5 seconds
I tried out every possible permutations to solve this problem but nothing seems to help.
I tried:
switching workspaces
different version of eclipse
changing jvm / application parameters
I cannot change the java installation however because we are working with a fixed version. Do you have any idea where could be the problem?
What I have here is the sample RCP Mail program and its test according to the link i pasted above.
The error indicates that you are using a 64 bit JVM.
Java VM: Java HotSpot(TM) 64-Bit Server VM (16.0-b13 mixed mode windows-amd64 )
And the error comes form a 32 bit dll.
Problematic frame:
C [SHELL32.dll+0xa4929]
So I would guess that the problem is, that the code somehow loads a 32 bit library but you need a 64 bit one. Installing a 64 bit version of eclipse might help, but perhaps this is not sufficient as SWT Bot might load the DLL in a special way. If so I would expect you are not the first one running into this issue (but I was not the other one ;) ).

JNA pointer invalid memory access causes EXCEPTION_ACCESS_VIOLATION?

I am trying to run the following C++ method from Java using JNA, but I get an EXCEPTION_ACCESS_VIOLATION.
typedef struct sp_session sp_session; ///< Representation of a session
/**
* The connection state of the specified session.
*
* #param[in] session Your session object
*
* #return The connection state - see the sp_connectionstate enum for possible values
*/
SP_LIBEXPORT(sp_connectionstate) sp_session_connectionstate(sp_session *session);
Here is my Java code:
main class
public class Test{
static{
System.loadLibrary("libspotify");
}
public static void main(String[] args){
JLibspotify lib = (JLibspotify)Native.loadLibrary("libspotify", JLibspotify.class);
sp_session mySession = new sp_session();
lib.sessionConnectionstate(mySession); // CRASH_HERE
}
}
library
public interface JLibspotify extends StdCallLibrary{
int sessionConnectionstate(sp_session session);
}
sp_session object I declared this as a PointerType as I don't have any information on it
public class sp_session extends PointerType{
public sp_session(Pointer address) {
super(address);
}
public sp_session() {
super();
}
}
And here is my crash report:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x1008dbf5, pid=4984, tid=6000
#
# JRE version: 7.0-b129
# Java VM: Java HotSpot(TM) Client VM (21.0-b01 mixed mode, sharing windows-x86 )
# Problematic frame:
# C [libspotify.dll+0x8dbf5]
#
# 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 (0x00a49400): JavaThread "main" [_thread_in_native, id=6000, stack(0x00ba0000,0x00bf0000)]
siginfo: ExceptionCode=0xc0000005, reading address 0x00000000
Registers:
EAX=0x00000000, EBX=0x334e8098, ECX=0x00000001, EDX=0x00000004
ESP=0x00bef7bc, EBP=0x00bef7c8, ESI=0x334e8098, EDI=0x00a49400
EIP=0x1008dbf5, EFLAGS=0x00010212
Top of Stack: (sp=0x00bef7bc)
0x00bef7bc: 00000001 0470dac7 00000000 00bef828
0x00bef7cc: 047091b9 04708eb0 00bef810 00000004
0x00bef7dc: 00000001 00befaa0 1008dbf0 650dcd94
0x00bef7ec: 00a49400 00a49400 334e8098 650dce6a
0x00bef7fc: 00a49400 00000400 0000000a 00bef828
0x00bef80c: 00000002 00befa30 00befaa0 00bef850
0x00bef81c: 00bef874 00000000 00000004 00befa78
0x00bef82c: 04702161 00befa30 1008dbf0 00befaa0
Instructions: (pc=0x1008dbf5)
0x1008dbd5: 0b 8b 01 8b 50 0c ff d2 5e 5b 59 c2 04 00 cc cc
0x1008dbe5: cc cc cc cc cc cc cc cc cc cc cc 51 8b 44 24 08
0x1008dbf5: 8b 08 8b 11 8b 42 10 c7 04 24 00 00 00 00 ff d0
0x1008dc05: 59 c2 04 00 cc cc cc cc cc cc cc 51 53 55 8b 6c
Register to memory mapping:
EAX=0x00000000 is an unknown value
EBX=0x334e8098 is an oop
{method}
- klass: {other class}
ECX=0x00000001 is an unknown value
EDX=0x00000004 is an unknown value
ESP=0x00bef7bc is pointing into the stack for thread: 0x00a49400
EBP=0x00bef7c8 is pointing into the stack for thread: 0x00a49400
ESI=0x334e8098 is an oop
{method}
- klass: {other class}
EDI=0x00a49400 is a thread
Stack: [0x00ba0000,0x00bf0000], sp=0x00bef7bc, free space=317k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [libspotify.dll+0x8dbf5] sp_session_connectionstate+0x5
C [jna8472051172185323617.tmp+0x91b9] JNI_OnUnload+0xda6
C [jna8472051172185323617.tmp+0x2161]
C [jna8472051172185323617.tmp+0x2849] Java_com_sun_jna_Function_invokeInt+0x35
j com.sun.jna.Function.invokeInt(I[Ljava/lang/Object;)I+0
j com.sun.jna.Function.invoke([Ljava/lang/Object;Ljava/lang/Class;)Ljava/lang/Object;+309
j com.sun.jna.Function.invoke(Ljava/lang/Class;[Ljava/lang/Object;Ljava/util/Map;)Ljava/lang/Object;+194
j com.sun.jna.Library$Handler.invoke(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;+344
j $Proxy0.sessionConnectionstate(Lcom/nbarraille/jspotify/model/sp_session;)I+16
j com.nbarraille.jspotify.main.Test.main([Ljava/lang/String;)V+110
v ~StubRoutines::call_stub
V [jvm.dll+0x115f6d]
V [jvm.dll+0x1b788e]
V [jvm.dll+0x115fed]
V [jvm.dll+0xa2507]
V [jvm.dll+0xac867]
C [javaw.exe+0x209e]
C [javaw.exe+0xa23b]
C [javaw.exe+0xa2c5]
C [kernel32.dll+0x51194] BaseThreadInitThunk+0x12
C [ntdll.dll+0x5b429] RtlInitializeExceptionChain+0x63
C [ntdll.dll+0x5b3fc] RtlInitializeExceptionChain+0x36
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j com.sun.jna.Function.invokeInt(I[Ljava/lang/Object;)I+0
j com.sun.jna.Function.invoke([Ljava/lang/Object;Ljava/lang/Class;)Ljava/lang/Object;+309
j com.sun.jna.Function.invoke(Ljava/lang/Class;[Ljava/lang/Object;Ljava/util/Map;)Ljava/lang/Object;+194
j com.sun.jna.Library$Handler.invoke(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;+344
j $Proxy0.sessionConnectionstate(Lcom/nbarraille/jspotify/model/sp_session;)I+16
j com.nbarraille.jspotify.main.Test.main([Ljava/lang/String;)V+110
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x009ffc00 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=680, stack(0x01120000,0x01170000)]
0x009fac00 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=5032, stack(0x00f00000,0x00f50000)]
0x009f9800 JavaThread "Attach Listener" daemon [_thread_blocked, id=6360, stack(0x01090000,0x010e0000)]
0x009f6400 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=652, stack(0x01010000,0x01060000)]
0x009ed000 JavaThread "Finalizer" daemon [_thread_blocked, id=1148, stack(0x00d30000,0x00d80000)]
0x009e7800 JavaThread "Reference Handler" daemon [_thread_blocked, id=6172, stack(0x00f50000,0x00fa0000)]
=>0x00a49400 JavaThread "main" [_thread_in_native, id=6000, stack(0x00ba0000,0x00bf0000)]
Other Threads:
0x009e6400 VMThread [stack: 0x00d90000,0x00de0000] [id=4112]
0x00a13000 WatcherThread [stack: 0x03e70000,0x03ec0000] [id=4168]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 4928K, used 1525K [0x23450000, 0x239a0000, 0x289a0000)
eden space 4416K, 34% used [0x23450000, 0x235cd6c8, 0x238a0000)
from space 512K, 0% used [0x238a0000, 0x238a0000, 0x23920000)
to space 512K, 0% used [0x23920000, 0x23920000, 0x239a0000)
tenured generation total 10944K, used 0K [0x289a0000, 0x29450000, 0x33450000)
the space 10944K, 0% used [0x289a0000, 0x289a0000, 0x289a0200, 0x29450000)
compacting perm gen total 12288K, used 638K [0x33450000, 0x34050000, 0x37450000)
the space 12288K, 5% used [0x33450000, 0x334efb70, 0x334efc00, 0x34050000)
ro space 10240K, 43% used [0x37450000, 0x3789ce40, 0x3789d000, 0x37e50000)
rw space 12288K, 53% used [0x37e50000, 0x384c2710, 0x384c2800, 0x38a50000)
Code Cache [0x01e50000, 0x01ed8000, 0x03e50000)
total_blobs=187 nmethods=39 adapters=85 free_code_cache=33013568 largest_free_block=0
Dynamic libraries:
0x01220000 - 0x01250000 C:\Program Files\Java\jdk1.7.0\bin\javaw.exe
0x76dc0000 - 0x76efd000 C:\Windows\SYSTEM32\ntdll.dll
0x76c10000 - 0x76ce4000 C:\Windows\system32\kernel32.dll
0x75110000 - 0x7515a000 C:\Windows\system32\KERNELBASE.dll
0x60000000 - 0x60041000 C:\Program Files\BitDefender\BitDefender 2011\Active Virus Control\Midas_00078_002\midas32.dll
0x61000000 - 0x61028000 C:\Program Files\BitDefender\BitDefender 2011\Active Virus Control\Midas_00078_002\plugin_base.m32
0x67000000 - 0x67048000 C:\Program Files\BitDefender\BitDefender 2011\Active Virus Control\Midas_00078_002\plugin_nt.m32
0x64000000 - 0x64021000 C:\Program Files\BitDefender\BitDefender 2011\Active Virus Control\Midas_00078_002\plugin_registry.m32
0x62000000 - 0x6202d000 C:\Program Files\BitDefender\BitDefender 2011\Active Virus Control\Midas_00078_002\plugin_extra.m32
0x65000000 - 0x6501a000 C:\Program Files\BitDefender\BitDefender 2011\Active Virus Control\Midas_00078_002\plugin_net.m32
0x63000000 - 0x630a6000 C:\Program Files\BitDefender\BitDefender 2011\Active Virus Control\Midas_00078_002\plugin_fragments.m32
0x75d20000 - 0x75dc0000 C:\Windows\system32\ADVAPI32.dll
0x75dc0000 - 0x75e6c000 C:\Windows\system32\msvcrt.dll
0x76f20000 - 0x76f39000 C:\Windows\SYSTEM32\sechost.dll
0x754b0000 - 0x75551000 C:\Windows\system32\RPCRT4.dll
0x76cf0000 - 0x76db9000 C:\Windows\system32\USER32.dll
0x752a0000 - 0x752ee000 C:\Windows\system32\GDI32.dll
0x757f0000 - 0x757fa000 C:\Windows\system32\LPK.dll
0x76f40000 - 0x76fdd000 C:\Windows\system32\USP10.dll
0x73d70000 - 0x73f0e000 C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7600.16661_none_420fe3fa2b8113bd\COMCTL32.dll
0x75cc0000 - 0x75d17000 C:\Windows\system32\SHLWAPI.dll
0x75490000 - 0x754af000 C:\Windows\system32\IMM32.DLL
0x75800000 - 0x758cc000 C:\Windows\system32\MSCTF.dll
0x69700000 - 0x697be000 C:\Program Files\Java\jdk1.7.0\jre\bin\msvcr100.dll
0x65030000 - 0x65339000 C:\Program Files\Java\jdk1.7.0\jre\bin\client\jvm.dll
0x736c0000 - 0x736f2000 C:\Windows\system32\WINMM.dll
0x72860000 - 0x7286c000 C:\Program Files\Java\jdk1.7.0\jre\bin\verify.dll
0x70fc0000 - 0x70fe0000 C:\Program Files\Java\jdk1.7.0\jre\bin\java.dll
0x76f00000 - 0x76f05000 C:\Windows\system32\PSAPI.DLL
0x6f6b0000 - 0x6f6c3000 C:\Program Files\Java\jdk1.7.0\jre\bin\zip.dll
0x10000000 - 0x10259000 C:\Windows\System32\libspotify.dll
0x75f80000 - 0x75fb5000 C:\Windows\system32\WS2_32.dll
0x76f10000 - 0x76f16000 C:\Windows\system32\NSI.dll
0x74ff0000 - 0x7510c000 C:\Windows\system32\CRYPT32.dll
0x74f80000 - 0x74f8c000 C:\Windows\system32\MSASN1.dll
0x74410000 - 0x74468000 C:\Windows\system32\WINHTTP.dll
0x743c0000 - 0x7440f000 C:\Windows\system32\webio.dll
0x74990000 - 0x749a6000 C:\Windows\system32\CRYPTSP.dll
0x74730000 - 0x7476b000 C:\Windows\system32\rsaenh.dll
0x74570000 - 0x74587000 C:\Windows\system32\USERENV.dll
0x74f10000 - 0x74f1b000 C:\Windows\system32\profapi.dll
0x74e90000 - 0x74e9c000 C:\Windows\system32\CRYPTBASE.dll
0x6fbd0000 - 0x6fbe6000 C:\Program Files\Java\jdk1.7.0\jre\bin\net.dll
0x74950000 - 0x7498c000 C:\Windows\system32\mswsock.dll
0x74940000 - 0x74946000 C:\Windows\System32\wship6.dll
0x72d60000 - 0x72d70000 C:\Windows\system32\NLAapi.dll
0x74810000 - 0x74854000 C:\Windows\system32\DNSAPI.dll
0x70520000 - 0x70528000 C:\Windows\System32\winrnr.dll
0x70510000 - 0x70520000 C:\Windows\system32\napinsp.dll
0x704f0000 - 0x70502000 C:\Windows\system32\pnrpnsp.dll
0x74470000 - 0x74475000 C:\Windows\System32\wshtcpip.dll
0x74480000 - 0x7449c000 C:\Windows\system32\IPHLPAPI.DLL
0x741f0000 - 0x741f7000 C:\Windows\system32\WINNSI.DLL
0x701d0000 - 0x701d6000 C:\Windows\system32\rasadhlp.dll
0x72810000 - 0x72848000 C:\Windows\System32\fwpuclnt.dll
0x72d70000 - 0x72d7f000 C:\Program Files\Java\jdk1.7.0\jre\bin\nio.dll
0x04700000 - 0x04752000 C:\Users\nbarraille\AppData\Local\Temp\jna8472051172185323617.tmp
VM Arguments:
jvm_args: -Djava.library.path=C:\Windows\System32 -Dfile.encoding=Cp1252
java_command: com.nbarraille.jspotify.main.Test
Launcher Type: SUN_STANDARD
Environment Variables:
PATH=C:/Program Files/Java/jdk1.7.0/bin/../jre/bin/client;C:/Program Files/Java/jdk1.7.0/bin/../jre/bin;C:/Program Files/Java/jdk1.7.0/bin/../jre/lib/i386;C:\Windows\System32
USERNAME=nbarraille
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 6 Model 23 Stepping 10, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows 7 Build 7600
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 3624108k(899440k free), swap 7246452k(3244776k free)
vm_info: Java HotSpot(TM) Client VM (21.0-b01) for windows-x86 JRE (1.7.0-ea-b129), built on Feb 10 2011 07:43:39 by "java_re" with unknown MS VC++:1600
time: Tue Mar 01 22:57:31 2011
elapsed time: 0 seconds
I've read that EXCEPTION_ACCESS_VIOLATION with ExceptionCode 0xc00000005 are often due to the usage of a pointer that holds an invalid memory address. Do you think it is the case here? Did I not initialize my session instance properly? How can I solve this?
Thank you!
Yes, according to the stack trace, the sp_session_connectionstate function is dereferencing a NULL pointer.
It might be possible that the sp_session being passed is NULL. If the C code isn't yours, this is most likely the case.
Unfortunately, I'm not very familiar with JNI, so I can't tell whether or not you're passing the pointer from Java to C correctly. Someone else probably knows better.

Create a playlist in iTunes with COM and Java

How do I create a playlist in iTunes from Java, using COM (on windows i.e. no AppleScript)?
I have found a library here that does most of what I need, and I have added some code to ITPlaylist.java, to call the "AddTrack" method (mentioned in the docs) on the iTunes object ITPlaylist :
public void addTrack(ITTrack track) {
ITPlaylistKind k = getKind();
if (k == ITPlaylistKindUser) {
Dispatch.put(object, "AddTrack", track);
} else
throw new UnsupportedOperationException("can only add track to user playlists - kind : " + k);
}
But I get an error :
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x1000e150, pid=3184, tid=3896
#
# JRE version: 6.0_15-b03
# Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode, sharing windows-x86)
# Problematic frame:
# C [jacob-1.14.3-x86.dll+0xe150]
#
# An error report file with more information is saved as:
# Z:\\hs_err_pid3184.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.
when I try and call this method. The log file contains:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x1000e150, pid=3040, tid=3756
#
# JRE version: 6.0_15-b03
# Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode, sharing windows-x86 )
# Problematic frame:
# C [jacob-1.14.3-x86.dll+0xe150]
#
# 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 (0x01ed1400): JavaThread "main" [_thread_in_native, id=3756, stack(0x003b0000,0x00400000)]
siginfo: ExceptionCode=0xc0000005, reading address 0x00000005
Registers:
EAX=0x00000000, EBX=0x0490f6f8, ECX=0x003ffd8c, EDX=0x240b14e8
ESP=0x003ff9d0, EBP=0x003ffa14, ESI=0x01ed1510, EDI=0x00000005
EIP=0x1000e150, EFLAGS=0x00010246
Top of Stack: (sp=0x003ff9d0)
0x003ff9d0: 01ed1400 28404d90 28404d90 01fd9e27
0x003ff9e0: 01ed1510 003ffa28 003ffa24 01ed1400
0x003ff9f0: 2840bbaf 003ff9f4 00000000 003ffa28
0x003ffa00: 28409fb8 00000000 28404d90 00000000
0x003ffa10: 003ffa24 003ffa4c 01fd2da1 00000000
0x003ffa20: 01fd8259 240b14e8 240b39d8 003ffa2c
0x003ffa30: 2840401a 003ffa58 28409fb8 00000000
0x003ffa40: 28404040 003ffa24 003ffa54 003ffa7c
Instructions: (pc=0x1000e150)
0x1000e140: 1d 53 ff 15 20 01 01 10 66 c7 03 09 00 89 7b 08
0x1000e150: 8b 0f 8b 51 04 57 ff d2 5f 5e 5b c2 0c 00 6a ff
Stack: [0x003b0000,0x00400000], sp=0x003ff9d0, free space=318k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [jacob-1.14.3-x86.dll+0xe150]
j com.jacob.com.Variant.putObject(Ljava/lang/Object;)V+2
j com.jacob.com.VariantUtilities.populateVariant(Lcom/jacob/com/Variant;Ljava/lang/Object;Z)V+511
j com.jacob.com.VariantUtilities.objectToVariant(Ljava/lang/Object;)Lcom/jacob/com/Variant;+248
j com.jacob.com.VariantUtilities.objectsToVariants([Ljava/lang/Object;)[Lcom/jacob/com/Variant;+19
j com.jacob.com.Dispatch.invoke(Lcom/jacob/com/Dispatch;Ljava/lang/String;I[Ljava/lang/Object;[I)Lcom/jacob/com/Variant;+8
j com.jacob.com.Dispatch.put(Lcom/jacob/com/Dispatch;Ljava/lang/String;Ljava/lang/Object;)V+18
j com.dt.iTunesController.ITPlaylist.addTrack(Lcom/dt/iTunesController/ITTrack;)V+19
j uk.co.teamnomad.itunes.WindowsLibraryImpl.savePlaylist(Ljava/util/List;Luk/co/teamnomad/itunes/PlayList;)V+46
j uk.co.teamnomad.bpm.main.Main.<init>(Luk/co/teamnomad/bpm/system/OperatingSystem;)V+309
j uk.co.teamnomad.bpm.main.Main.getInstance()Luk/co/teamnomad/bpm/main/Main;+16
j uk.co.teamnomad.bpm.main.Main.main([Ljava/lang/String;)V+8
v ~StubRoutines::call_stub
V [jvm.dll+0xecfac]
V [jvm.dll+0x1741d1]
V [jvm.dll+0xed02d]
V [jvm.dll+0xf5bf5]
V [jvm.dll+0xfd84d]
C [java.exe+0x2155]
C [java.exe+0x82ce]
C [kernel32.dll+0x44911]
C [ntdll.dll+0x3e4b6]
C [ntdll.dll+0x3e489]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j com.jacob.com.Variant.putVariantDispatch(Ljava/lang/Object;)V+0
j com.jacob.com.Variant.putObject(Ljava/lang/Object;)V+2
j com.jacob.com.VariantUtilities.populateVariant(Lcom/jacob/com/Variant;Ljava/lang/Object;Z)V+511
j com.jacob.com.VariantUtilities.objectToVariant(Ljava/lang/Object;)Lcom/jacob/com/Variant;+248
j com.jacob.com.VariantUtilities.objectsToVariants([Ljava/lang/Object;)[Lcom/jacob/com/Variant;+19
j com.jacob.com.Dispatch.invoke(Lcom/jacob/com/Dispatch;Ljava/lang/String;I[Ljava/lang/Object;[I)Lcom/jacob/com/Variant;+8
j com.jacob.com.Dispatch.put(Lcom/jacob/com/Dispatch;Ljava/lang/String;Ljava/lang/Object;)V+18
j com.dt.iTunesController.ITPlaylist.addTrack(Lcom/dt/iTunesController/ITTrack;)V+19
j uk.co.teamnomad.itunes.WindowsLibraryImpl.savePlaylist(Ljava/util/List;Luk/co/teamnomad/itunes/PlayList;)V+46
j uk.co.teamnomad.bpm.main.Main.<init>(Luk/co/teamnomad/bpm/system/OperatingSystem;)V+309
j uk.co.teamnomad.bpm.main.Main.getInstance()Luk/co/teamnomad/bpm/main/Main;+16
j uk.co.teamnomad.bpm.main.Main.main([Ljava/lang/String;)V+8
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x043a4800 JavaThread "MerapiBridgeSocket" [_thread_in_native, id=3664, stack(0x04800000,0x04850000)]
0x01f4c800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=2440, stack(0x04160000,0x041b0000)]
0x01f47c00 JavaThread "CompilerThread0" daemon [_thread_blocked, id=3628, stack(0x04110000,0x04160000)]
0x01f47400 JavaThread "Attach Listener" daemon [_thread_blocked, id=3584, stack(0x040c0000,0x04110000)]
0x01f3ac00 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2968, stack(0x04070000,0x040c0000)]
0x01ef8c00 JavaThread "Finalizer" daemon [_thread_blocked, id=3724, stack(0x04020000,0x04070000)]
0x01ef7800 JavaThread "Reference Handler" daemon [_thread_blocked, id=3324, stack(0x03fd0000,0x04020000)]
=>0x01ed1400 JavaThread "main" [_thread_in_native, id=3756, stack(0x003b0000,0x00400000)]
Other Threads:
0x01ef6000 VMThread [stack: 0x01180000,0x011d0000] [id=2836]
0x01f5f000 WatcherThread [stack: 0x041b0000,0x04200000] [id=3528]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 960K, used 794K [0x24000000, 0x24100000, 0x244e0000)
eden space 896K, 81% used [0x24000000, 0x240b7510, 0x240e0000)
from space 64K, 95% used [0x240f0000, 0x240ff450, 0x24100000)
to space 64K, 0% used [0x240e0000, 0x240e0000, 0x240f0000)
tenured generation total 4096K, used 876K [0x244e0000, 0x248e0000, 0x28000000)
the space 4096K, 21% used [0x244e0000, 0x245bb318, 0x245bb400, 0x248e0000)
compacting perm gen total 12288K, used 4255K [0x28000000, 0x28c00000, 0x2c000000)
the space 12288K, 34% used [0x28000000, 0x28427cb8, 0x28427e00, 0x28c00000)
ro space 8192K, 63% used [0x2c000000, 0x2c519920, 0x2c519a00, 0x2c800000)
rw space 12288K, 53% used [0x2c800000, 0x2ce74dd0, 0x2ce74e00, 0x2d400000)
Dynamic libraries:
0x00400000 - 0x00424000 C:\Windows\system32\java.exe
0x771a0000 - 0x772c7000 C:\Windows\system32\ntdll.dll
0x75a20000 - 0x75afb000 C:\Windows\system32\kernel32.dll
0x75ee0000 - 0x75fa6000 C:\Windows\system32\ADVAPI32.dll
0x772e0000 - 0x773a3000 C:\Windows\system32\RPCRT4.dll
0x7c340000 - 0x7c396000 C:\Program Files\Java\jre6\bin\msvcr71.dll
0x6d800000 - 0x6da8b000 C:\Program Files\Java\jre6\bin\client\jvm.dll
0x77060000 - 0x770fd000 C:\Windows\system32\USER32.dll
0x773b0000 - 0x773fb000 C:\Windows\system32\GDI32.dll
0x744f0000 - 0x74522000 C:\Windows\system32\WINMM.dll
0x76f30000 - 0x76fda000 C:\Windows\system32\msvcrt.dll
0x76d20000 - 0x76e64000 C:\Windows\system32\ole32.dll
0x75d20000 - 0x75dad000 C:\Windows\system32\OLEAUT32.dll
0x744b0000 - 0x744e9000 C:\Windows\system32\OLEACC.dll
0x77100000 - 0x7711e000 C:\Windows\system32\IMM32.DLL
0x76c00000 - 0x76cc8000 C:\Windows\system32\MSCTF.dll
0x75820000 - 0x7584c000 C:\Windows\system32\apphelp.dll
0x772d0000 - 0x772d9000 C:\Windows\system32\LPK.DLL
0x77120000 - 0x7719d000 C:\Windows\system32\USP10.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
0x75a10000 - 0x75a17000 C:\Windows\system32\PSAPI.DLL
0x6d7f0000 - 0x6d7ff000 C:\Program Files\Java\jre6\bin\zip.dll
0x6d610000 - 0x6d623000 C:\Program Files\Java\jre6\bin\net.dll
0x76e70000 - 0x76e9d000 C:\Windows\system32\WS2_32.dll
0x75fb0000 - 0x75fb6000 C:\Windows\system32\NSI.dll
0x75030000 - 0x7506b000 C:\Windows\system32\mswsock.dll
0x75090000 - 0x75095000 C:\Windows\System32\wship6.dll
0x74cf0000 - 0x74cf5000 C:\Windows\System32\wshtcpip.dll
0x10000000 - 0x10019000 C:\Windows\System32\jacob-1.14.3-x86.dll
0x72640000 - 0x726db000 C:\Windows\WinSxS\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.1434_none_d08b6002442c891f\MSVCR80.dll
0x76ea0000 - 0x76f24000 C:\Windows\system32\CLBCatQ.DLL
0x74db0000 - 0x74deb000 C:\Windows\system32\rsaenh.dll
VM Arguments:
java_command: bpm-0.0.13-jar-with-dependencies.jar
Launcher Type: SUN_STANDARD
Environment Variables:
CLASSPATH=.;C:\Program Files\QuickTime\QTSystem\QTJava.zip
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\QuickTime\QTSystem\
USERNAME=ed
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 6 Model 23 Stepping 6, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows Vista Build 6001 Service Pack 1
CPU:total 1 (2 cores per cpu, 1 threads per core) family 6 model 23 stepping 6, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1
Memory: 4k page, physical 2097151k(1656488k free), swap 4194303k(4092420k free)
vm_info: Java HotSpot(TM) Client VM (14.1-b02) for windows-x86 JRE (1.6.0_15-b03), built on Jul 25 2009 01:22:46 by "java_re" with MS VC++ 7.1
time: Mon Aug 31 20:14:48 2009
elapsed time: 7 seconds
What am I doing wrong ?
I havent done any iTunes stuff in Java for a while, but from what experience I have I remember that the interface can be rather fickle.
I don't have any definitive answer, but in attempt to provide at least a shot in the dark, maybe you should try casting the ITPlaylist you're working with to an ITUserPlaylist (if that's the correct type, of course) and then calling its addTrack method. That way you'd be using the function provided by the library, and if that doesn't work you can get in touch with the developer because there may be a more serious problem occurring.
From the dump you provided, it looks as though the underlying C in JACOB is trying to modify the equivalent ITPlaylist via the iTunes COM interface. This could be because of the way the inheritance is working? IE: ITPlaylist doesn't support addTrack (the underlying C is trying to call a nonexistent function) but ITUserPlaylist does? Just a thought.
Suggested correction:
public void addTrack(ITTrack track) {
ITPlaylistKind k = getKind();
if (k == ITPlaylistKindUser) {
Dispatch.put( ((ITUserPlaylist)this).object, "AddTrack", track);
} else
throw new UnsupportedOperationException("can only add track to user playlists - kind : " + k);
}
Again I'm certainly not the expert here so if anyone has any better ideas, please go ahead and post over me :)
Let me know if that offers you any success!
Edit
After re-reading my post, I realized I forgot this approach, which could arguably be better as it keeps the JACOB COM bridge out of the higher level stuff:
((ITUserPlaylist)this).addTrack(track);
The answer for me was to contact the developer of the library I was using, getting him to release a new version of the library. If you want to do this then use at least version 0.2, which will correctly differentiate between ITPlaylist objects and ITUserPlaylist ones, which (as mentioned by lurkingfridge79 are the only types of playlist that can have tracks added to them by the COM API.

Categories

Resources