Collect -h crashes JVM

I installed Sun Studio Express 07/08 on my Niagara2 machine. When I ran collect with options -j and -h to measure cache misses of Java programs, the JVM crashed with segmentation fault. Without -h option, it works fine. But with any HW counters and with any Java programs, JVM crashes.
# uname -sri
SunOS 5.10 SUNW,SPARC-Enterprise-T5220
# /disk2/StudioExpress/SUNWspro/bin/collect -V
collect: Sun Ceres Analyzer 7.7 SunOS_sparc 2008/07/10
# /disk2/StudioExpress/SUNWspro/bin/collect -j on -h ecdm,10007 -d /tmp /opt/jdk1.6.0_07/bin/java -jar /opt/jdk1.6.0_07/demo/jfc/Java2D/Java2Demo.jar
Creating experiment database /tmp/test.139.er ...
Segmentation Fault (core dumped)
# dbx /opt/jdk1.6.0_07/bin/java core
For information about new features see `help changes'
To remove this message, put `dbxenv suppress_startup_message 7.6' in your .dbxrc
Reading java
core file header read successfully
Reading ld.so.1
Reading libcollector.so
Reading libthread.so.1
Reading libjli.so
Reading libdl.so.1
Reading libc.so.1
Reading libc_psr.so.1
Reading libcpc.so.1
Reading libpctx.so.1
Reading libnvpair.so.1
Reading libdevinfo.so.1
Reading libproc.so.1
Reading libnsl.so.1
Reading libsec.so.1
Reading libgen.so.1
Reading librtld_db.so.1
Reading libelf.so.1
Reading libctf.so.1
Reading libavl.so.1
Reading libjvm.so
Reading libsocket.so.1
Reading libsched.so.1
Reading libm.so.1
Reading libCrun.so.1
Reading libdoor.so.1
Reading libm.so.2
Reading libscf.so.1
Reading libuutil.so.1
Reading libmd_psr.so.1
Reading libmp.so.2
t@1 (l@1) program terminated by signal SEGV (no mapping at the fault address)
0xff336aac: update_map_segments+0x068c: ld [%l3], %i4
(dbx) where
current thread: t@1
=>[1] update_map_segments(0x13, 0xfe7b7fc0, 0xff353aa0, 0xff369b18, 0x0, 0xfde81eb8), at 0xff336aac
[2] dlopen(0xff031490, 0x800, 0x938, 0xffbfef74, 0x0, 0x102), at 0xff337eec
[3] LoadJavaVM(0xffbfef74, 0xffbfef6c, 0xffbff374, 0x10e0a8, 0x10e4f0, 0x2a7f4), at 0x170c8
[4] main(0x0, 0xffbff7e4, 0x42e, 0x5, 0x14, 0xff2c0140), at 0x116fc
(dbx) quit
dbx: internal warning: td_ta_clear_event() failed -- debugger service failed
dbx: internal warning: td_ta_sync_tracking_enable(0) failed -- debugger service failed
Is this a bug, or I did something wrong?

Thank you for the report! Unfortunately I don't have access to a Niagara-2 system right now.
I tried to run a similar test on Niagara-1 system, but it did not help to reproduce the problem.
Probably it is important to use JDK 1.6.0_07 (I have JDK 1.6.0_06 on my Niagara-1 system),
or the problem is caused by "-h ecdm,10007" option. This type of HWC is not available on
Niagara-1 system, only these 2 are available:
Well-known HW counters available for profiling:
insts[1],9999991 (`Instructions Executed', alias for Instr_cnt; events)
Raw HW counters available for profiling:
Instr_cnt[1],1000003 (events)
I'll try to find a Niagara-2 system and let you know if I see the same problem.
BTW, can you try to run the same test with JDK 1.6.0_06?
Thanks,
Nik

Similar Messages

  • Printing report that has a parameter with multiple values crashes jvm

    I am using BOE XI 4.0 as an unmanaged RAS.
    I am able to preview a report that has a string discrete parameter that can have multiple values.  If I give it a single value.  It previews fine.  If I give it an empty string it prints all values which is fine.  If I give it two discrete values, it displays just those two.
    However, if I try printing the report to a printer:
    1 parameter value - prints fine.
    2 parameter values - crashes jvm
    empty string parameter value - crashes jvm
    I would appreciate some direction on how to do this.  It works in crystal reports for eclipse.
    The test jsp I am using is based off of the samples.  The print test jsp is the same as the preview test with the exception of the following code differences.:
    preview report.jsp code
    // Create a Viewer object
    CrystalReportViewer viewer = new CrystalReportViewer();
    // Set the report source for the  viewer to the ReportClientDocument's report source
    viewer.setReportSource(clientDoc.getReportSource());
    // Process the http request to view the report
    viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), out);
    // Dispose of the viewer object
    viewer.dispose();
    print report jsp code
      PrintReportOptions printOptions = new PrintReportOptions();
      printOptions.setPrinterName("DELL");
      try {
          clientDoc.getPrintOutputController().printReport(printOptions);
      } catch (ReportSDKException ex1) {
          System.out.println("Message - " + ex1.getLocalizedMessage());
      } catch (Exception ex2) {
          System.out.println("Message - " + ex2.getLocalizedMessage());
      clientDoc.close();

    I am using BOE XI 4.0 as an unmanaged RAS.
    I am able to preview a report that has a string discrete parameter that can have multiple values.  If I give it a single value.  It previews fine.  If I give it an empty string it prints all values which is fine.  If I give it two discrete values, it displays just those two.
    However, if I try printing the report to a printer:
    1 parameter value - prints fine.
    2 parameter values - crashes jvm
    empty string parameter value - crashes jvm
    I would appreciate some direction on how to do this.  It works in crystal reports for eclipse.
    The test jsp I am using is based off of the samples.  The print test jsp is the same as the preview test with the exception of the following code differences.:
    preview report.jsp code
    // Create a Viewer object
    CrystalReportViewer viewer = new CrystalReportViewer();
    // Set the report source for the  viewer to the ReportClientDocument's report source
    viewer.setReportSource(clientDoc.getReportSource());
    // Process the http request to view the report
    viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), out);
    // Dispose of the viewer object
    viewer.dispose();
    print report jsp code
      PrintReportOptions printOptions = new PrintReportOptions();
      printOptions.setPrinterName("DELL");
      try {
          clientDoc.getPrintOutputController().printReport(printOptions);
      } catch (ReportSDKException ex1) {
          System.out.println("Message - " + ex1.getLocalizedMessage());
      } catch (Exception ex2) {
          System.out.println("Message - " + ex2.getLocalizedMessage());
      clientDoc.close();

  • Sample code to crash JVM

    Hi,
    I am working on a program that do not report the stack trace from a crashed JVM (this is reported by customer).
    However i do not know how to crash a JVM, using a simple java application, so as to debug the above problem.
    Can someone please suggest a simple java application to cause JVM crash (JDK1.4.2.10 or JDK 1.5.x)
    Thanks

    Hi,
    //add the following line anywhere
    //credits++ to [email protected]
    import sun.dc.pr.PathDasher //[goes to the top alongwith other import(s)]
    PathDasher dasher = new PathDasher(null) ;
    //The JVM crashes when this line is executed
    // This is worrying because even Tiger [5] crashes
    Thanks
    Message was edited by: SamratBanerjea
    SamratBanerjea

  • JMF crash jvm EXCEPTION_STACK_OVERFLOW

    Hi ,
    I am facing a problem where JMF is causing JVM to crash while i am playing videos change from one to other. Can anyone give me some opinion why this happened? Urgent , thx
    # EXCEPTION_STACK_OVERFLOW (0xc00000fd) at pc=0x7c90e8ee, pid=632, tid=2616
    # Java VM: Java HotSpot(TM) Client VM (11.3-b02 mixed mode, sharing windows-x86)
    # Problematic frame:
    # C [ntdll.dll+0xe8ee]
    # 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 (0x040a1400): JavaThread "Loop thread: com.omnividea.media.parser.video.AudioTrack@b65c13" [_thread_in_native, id=2616, stack(0x06c80000,0x06d00000)]
    Here is the code i start and close the video :
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Start function :
    public void drawContent(String path)
    String mediaFile = null;
    // URL for our media file
    MediaLocator mrl = null;
    URL url = null;
    // Get the media filename info.
    // The applet tag should contain the path to the
    // source media file, relative to the html page.
         try {
         currVideoPath = path.trim();
         File file = new File(path.trim());
         url = file.toURL();
         mediaFile = url.toExternalForm();
         } catch (MalformedURLException mue) {
         try {
         // Create a media locator from the file name
         if ((mrl = new MediaLocator(mediaFile)) == null)
         // Create an instance of a player for this media
         try {
              player = Manager.createPlayer(mrl);
              player.addControllerListener(this);
              player.realize();
         } catch (NoPlayerException e) {
         }catch (InterruptedException ey) {
              ey.printStackTrace();
         player.start();
         } catch (MalformedURLException e) {
         } catch (IOException e) {
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Stop function :
    public synchronized void controllerUpdate(ControllerEvent event) {
    else if (event instanceof EndOfMediaEvent) {
              // We've reached the end of the media; rewind and
         synchronized(player)
         player.removeControllerListener(this);
         player.stop();
         player.close();
         player.deallocate();
    player.realize();
         player = null;
         System.gc(); // try to prevent memory leak for jmf
         controlComponent = null;
         visualComponent = null;
    call start function to start another video
    #############################################################################

    2 thoughts...
    First, player.realize is a non-blocking asyncronous call. You need to wait for the player to enter the realized state before you call start on it.
    Second,
    player.stop();
    player.close();
    player.deallocate();
    player.realize();
    player = null;
    Why in the name of God are you realizing a deallocated player? This is probably your problem, because players can't be garbage collected if they're not stopped, and a realized player isn't stopped.
    Take out the player.realize() in the above snippet, because that's a memory leak.

  • JDriver for Oracle crashes JVm on solaris

    Hi,
    I'm using the weblogic jDriver/XA for oracle with oracle 8.1.7 on solaris 2.8.
    The weblogic version is 6.1 SP2.
    The JVM randomly crashes with this error:
    Is the jDriver/XA that comes with weblogic stable ?
    Has the jDriver that comes with wlserver 6.1 SP3 fixed this problem ?
    Unexpected Signal : 11 occurred at PC=0xfe557f64
    Function name=JVM_InternString
    Library=/bea/jdk131/jre/lib/sparc/hotspot/libjvm.so
    Current Java thread:
         at weblogic.jdbc.oci.xa.XA.native_start(Native Method)
         at weblogic.jdbc.oci.xa.XA.start(XA.java:70)
         at weblogic.jdbc.oci.xa.XADataSource.start(XADataSource.java:640)
         at weblogic.jdbc.jta.DataSource.detectedUnavailable(DataSource.java:445)
         at weblogic.transaction.internal.ResourceDescriptor$2.execute(ResourceDescriptor.java:991)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    Dynamic libraries:
    0x10000      /bea/jdk131/jre/bin/../bin/sparc/native_threads/java
    0xff350000      /usr/lib/libthread.so.1
    0xff390000      /usr/lib/libdl.so.1
    0xff200000      /usr/lib/libc.so.1
    0xff330000      /usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1
    0xfe400000      /bea/jdk131/jre/lib/sparc/hotspot/libjvm.so
    0xff2e0000      /usr/lib/libCrun.so.1
    0xff1e0000      /usr/lib/libsocket.so.1
    0xff100000      /usr/lib/libnsl.so.1
    0xff0d0000      /usr/lib/libm.so.1
    0xff310000      /usr/lib/libw.so.1
    0xff0b0000      /usr/lib/libmp.so.2
    0xff080000      /bea/jdk131/jre/lib/sparc/native_threads/libhpi.so
    0xff050000      /bea/jdk131/jre/lib/sparc/libverify.so
    0xfe7c0000      /bea/jdk131/jre/lib/sparc/libjava.so
    0xff020000      /bea/jdk131/jre/lib/sparc/libzip.so
    0xfe3b0000      /usr/lib/locale/en_US.ISO8859-1/en_US.ISO8859-1.so.2
    0xfe390000      /bea/jdk131/jre/lib/sparc/libnet.so
    0xfaed0000      /usr/lib/nss_files.so.1
    0xd9200000      /bea/wlserver6.1/lib/solaris/oci817_8/libweblogicoci37.so
    0xd8400000      /u01/app/oracle/product/8.1.7/lib/libclntsh.so.8.0
    0xfad90000      /usr/lib/libC.so.5
    0xfaea0000      /u01/app/oracle/product/8.1.7/lib/libwtc8.so
    0xface0000      /usr/lib/libgen.so.1
    0xfacc0000      /usr/lib/libsched.so.1
    0xfaca0000      /usr/lib/libaio.so.1
    0xfac80000      /bea/wlserver6.1/lib/solaris/oci817_8/libweblogicoxa37.so
    0xfac10000      /bea/jdk131/jre/lib/sparc/libioser12.so
    0xdeae0000      /bea/jdk131/jre/lib/sparc/libawt.so
    0xd7480000      /bea/jdk131/jre/lib/sparc/motif21/libmawt.so
    0xdc8b0000      /bea/jdk131/jre/bin/../lib/sparc/libmlib_image.so
    0xd7200000      /usr/dt/lib/libXm.so.4
    0xd7190000      /usr/openwin/lib/libXt.so.4
    0xdc7d0000      /usr/openwin/lib/libXext.so.0
    0xdce60000      /usr/openwin/lib/libXtst.so.1
    0xd7080000      /usr/openwin/lib/libX11.so.4
    0xdc7b0000      /usr/openwin/lib/libSM.so.6
    0xdc6d0000      /usr/openwin/lib/libICE.so.6
    0xdc6a0000      /usr/openwin/lib/libdga.so.1
    0xd6f80000      /bea/jdk131/jre/lib/sparc/libfontmanager.so
    0xdc5a0000      /usr/openwin/lib/libdps.so.5
    0xdc4c0000      /bea/jdk131/jre/lib/sparc/libdcpr.so
    0xdc3b0000      /bea/jdk131/jre/lib/sparc/libcmm.so
    0xdc2c0000      /bea/jdk131/jre/lib/sparc/libjpeg.so
    0xdc890000      /bea/wlserver6.1/lib/solaris/libmuxer.so
    0xdc4a0000      /usr/ucblib/libucb.so.1
    0xdc790000      /usr/lib/libresolv.so.1
    0xdc1c0000      /usr/lib/libelf.so.1
    Local Time = Sun Aug 25 19:12:47 2002
    Elapsed Time = 21231
    # HotSpot Virtual Machine Error : 11
    # Error ID : 4F530E43505002BD 01
    # Please report this error at
    # http://java.sun.com/cgi-bin/bugreport.cgi
    # Java VM: Java HotSpot(TM) Client VM (1.3.1_04-b02 mixed mode)
    # An error report file has been saved as hs_err_pid342.log.
    # Please refer to the file for further information.

    We have observed some problems for XA in oracle 817 client. You should use 901 client and 901 jDriver
    to talk to 817 database as a solution.
    Mitesh
    prajod wrote:
    Hi,
    I'm using the weblogic jDriver/XA for oracle with oracle 8.1.7 on solaris 2.8.
    The weblogic version is 6.1 SP2.
    The JVM randomly crashes with this error:
    Is the jDriver/XA that comes with weblogic stable ?
    Has the jDriver that comes with wlserver 6.1 SP3 fixed this problem ?
    Unexpected Signal : 11 occurred at PC=0xfe557f64
    Function name=JVM_InternString
    Library=/bea/jdk131/jre/lib/sparc/hotspot/libjvm.so
    Current Java thread:
    at weblogic.jdbc.oci.xa.XA.native_start(Native Method)
    at weblogic.jdbc.oci.xa.XA.start(XA.java:70)
    at weblogic.jdbc.oci.xa.XADataSource.start(XADataSource.java:640)
    at weblogic.jdbc.jta.DataSource.detectedUnavailable(DataSource.java:445)
    at weblogic.transaction.internal.ResourceDescriptor$2.execute(ResourceDescriptor.java:991)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    Dynamic libraries:
    0x10000 /bea/jdk131/jre/bin/../bin/sparc/native_threads/java
    0xff350000 /usr/lib/libthread.so.1
    0xff390000 /usr/lib/libdl.so.1
    0xff200000 /usr/lib/libc.so.1
    0xff330000 /usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1
    0xfe400000 /bea/jdk131/jre/lib/sparc/hotspot/libjvm.so
    0xff2e0000 /usr/lib/libCrun.so.1
    0xff1e0000 /usr/lib/libsocket.so.1
    0xff100000 /usr/lib/libnsl.so.1
    0xff0d0000 /usr/lib/libm.so.1
    0xff310000 /usr/lib/libw.so.1
    0xff0b0000 /usr/lib/libmp.so.2
    0xff080000 /bea/jdk131/jre/lib/sparc/native_threads/libhpi.so
    0xff050000 /bea/jdk131/jre/lib/sparc/libverify.so
    0xfe7c0000 /bea/jdk131/jre/lib/sparc/libjava.so
    0xff020000 /bea/jdk131/jre/lib/sparc/libzip.so
    0xfe3b0000 /usr/lib/locale/en_US.ISO8859-1/en_US.ISO8859-1.so.2
    0xfe390000 /bea/jdk131/jre/lib/sparc/libnet.so
    0xfaed0000 /usr/lib/nss_files.so.1
    0xd9200000 /bea/wlserver6.1/lib/solaris/oci817_8/libweblogicoci37.so
    0xd8400000 /u01/app/oracle/product/8.1.7/lib/libclntsh.so.8.0
    0xfad90000 /usr/lib/libC.so.5
    0xfaea0000 /u01/app/oracle/product/8.1.7/lib/libwtc8.so
    0xface0000 /usr/lib/libgen.so.1
    0xfacc0000 /usr/lib/libsched.so.1
    0xfaca0000 /usr/lib/libaio.so.1
    0xfac80000 /bea/wlserver6.1/lib/solaris/oci817_8/libweblogicoxa37.so
    0xfac10000 /bea/jdk131/jre/lib/sparc/libioser12.so
    0xdeae0000 /bea/jdk131/jre/lib/sparc/libawt.so
    0xd7480000 /bea/jdk131/jre/lib/sparc/motif21/libmawt.so
    0xdc8b0000 /bea/jdk131/jre/bin/../lib/sparc/libmlib_image.so
    0xd7200000 /usr/dt/lib/libXm.so.4
    0xd7190000 /usr/openwin/lib/libXt.so.4
    0xdc7d0000 /usr/openwin/lib/libXext.so.0
    0xdce60000 /usr/openwin/lib/libXtst.so.1
    0xd7080000 /usr/openwin/lib/libX11.so.4
    0xdc7b0000 /usr/openwin/lib/libSM.so.6
    0xdc6d0000 /usr/openwin/lib/libICE.so.6
    0xdc6a0000 /usr/openwin/lib/libdga.so.1
    0xd6f80000 /bea/jdk131/jre/lib/sparc/libfontmanager.so
    0xdc5a0000 /usr/openwin/lib/libdps.so.5
    0xdc4c0000 /bea/jdk131/jre/lib/sparc/libdcpr.so
    0xdc3b0000 /bea/jdk131/jre/lib/sparc/libcmm.so
    0xdc2c0000 /bea/jdk131/jre/lib/sparc/libjpeg.so
    0xdc890000 /bea/wlserver6.1/lib/solaris/libmuxer.so
    0xdc4a0000 /usr/ucblib/libucb.so.1
    0xdc790000 /usr/lib/libresolv.so.1
    0xdc1c0000 /usr/lib/libelf.so.1
    Local Time = Sun Aug 25 19:12:47 2002
    Elapsed Time = 21231
    # HotSpot Virtual Machine Error : 11
    # Error ID : 4F530E43505002BD 01
    # Please report this error at
    # http://java.sun.com/cgi-bin/bugreport.cgi
    # Java VM: Java HotSpot(TM) Client VM (1.3.1_04-b02 mixed mode)
    # An error report file has been saved as hs_err_pid342.log.
    # Please refer to the file for further information.

  • JFileChooser crashes JVM - bug basically ignored. What can I do?

    See:
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7160713
    The bug has been marked as incomplete,needs more info, and "Low Prioroty" - Yet there is no mechanism to provide any more information. There is no way to add comments, or vote. The bug brings down the entire JVM with a native crash and it is trivial to reproduce.
    I would provide any information that is asked of me - but I need a way to do it. I think I got an email request for info (It's been a while now), but replies to the email bounced, and as noted above the bug page has no way to give feedback.
    Use any JFileChooser, click on the "Details" view. Then start clicking on column headings... after a few clicks the JVM crashes. Tested again with 7u6 - still crashes.

    This reproduces the problem more reliably for me.
    * JFileChooser Windows Crash
    package filechoosercrash;
    import java.awt.AWTEvent;
    import java.awt.BorderLayout;
    import java.awt.Robot;
    import java.awt.Toolkit;
    import java.awt.Window;
    import java.awt.event.AWTEventListener;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.InputEvent;
    import java.util.concurrent.CountDownLatch;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.swing.JButton;
    import javax.swing.JDialog;
    import javax.swing.JFileChooser;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.LookAndFeel;
    import javax.swing.SwingUtilities;
    import javax.swing.UIManager;
    import javax.swing.UIManager.LookAndFeelInfo;
    import javax.swing.UnsupportedLookAndFeelException;
    * @author scott
    public class FileChooserCrash {
         static CountDownLatch latch = new CountDownLatch(1);
         static JFrame frame;
         static JButton button;
         static JFileChooser chooser;
         static Robot robot;
         private static AWTEventListener terminator = new AWTEventListener() {
              @Override
              public void eventDispatched(AWTEvent event) {
                   System.exit(10);
          * @param args the command line arguments
         public static void main(final String[] args) throws Exception {
              SwingUtilities.invokeLater(new Runnable() {
                   @Override
                   public void run() {
                        try {
                             swingMain(args);
                        } catch (Exception ex) {
                             Logger.getLogger(FileChooserCrash.class.getName()).log(Level.SEVERE, null, ex);
              latch.await();
              // do the clicks
              sleep(3000);
              Toolkit.getDefaultToolkit().addAWTEventListener(terminator, AWTEvent.KEY_EVENT_MASK);
              long now = System.currentTimeMillis();
              for (int c = 0; c < 10; c++) {
                   Window w = JDialog.getWindows()[1]; // better be there!
                   System.out.println("w=" + w);
                   int detailsX = w.getX() + w.getWidth() - 36;
                   int detailY = w.getY() + 50;
                   int headingY = w.getY() + 100;
                   System.out.println("details at " + detailsX + ", " + detailY);
                   // Click details
                   robot.mouseMove(detailsX, detailY);
                   clickMouse();
                   sleep(100);
                   // Click column headings
                   while (System.currentTimeMillis() - now < 2 * 1000) {
                        int headingX = w.getX() + (w.getWidth()/2) + (int) (Math.random() * (w.getWidth()/2));
                        robot.mouseMove(headingX, headingY);
                        clickMouse();
                        sleep(300);
                   // Cancel
                   robot.mouseMove(w.getX() + w.getWidth() - 36, w.getY() + w.getHeight() - 36);
                   clickMouse();
                   sleep(300);
                   // re-open
                   robot.mouseMove(frame.getX() + 36, frame.getY() + 36);
                   clickMouse();
                   sleep(1000);
                   now = System.currentTimeMillis();
         private static void sleep(int millis) {
              try {
                   Thread.sleep(millis);
              } catch (InterruptedException ex) {
         private static void clickMouse() {
              robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
              sleep(100);
              robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
         private static void swingMain(String[] args) throws Exception {
              //switchToNimbus();
              robot = new Robot();
              frame = new JFrame("JFileChooser Crash Test");
              button = new JButton("Start...");
              button.addActionListener(new ActionListener() {
                   @Override
                   public void actionPerformed(ActionEvent e) {
                        showFileChooser(frame);
              frame.getContentPane().add(button, BorderLayout.CENTER);
              frame.getContentPane().add(new JLabel("Press \"Start...\" and let go of the mouse.  Robot will be used to change FileChooser to details view and then quickly click column headings until the crash."), BorderLayout.SOUTH);
              frame.pack();
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.setVisible(true);
         static void showFileChooser(JFrame parent) {
              chooser = new JFileChooser("C:\\");
              latch.countDown();
              chooser.showOpenDialog(parent);
         private static void switchToNimbus() throws UnsupportedLookAndFeelException, IllegalAccessException, InstantiationException, ClassNotFoundException {
              for (LookAndFeelInfo laf : UIManager.getInstalledLookAndFeels()) {
                   if (laf.getName().startsWith("Nimbus")) {
                        System.out.println("Using " + laf.getName());
                        UIManager.setLookAndFeel(laf.getClassName());
                        break;
    }

  • Runtime.exec() crashes JVM

    I wrote a program that runs a Perl script repeatedly via Runtime.exec().
    Q: Under what circumstances would this procedure silently crash the JVM? I am experiencing this behavior on Linux using Sun's JDK as well as IBM's. There is no error output. The program simply exits. What is causing this? And, how can it be avoided? If there is a way to recover from whatever problem is occurring, that would be ideal.

    Thanks jschell! Your input is helpful.
    I suspect that case #4 is in play here. When I run my program with the "-Xrs" switch, "Terminated" is outputted just before the JVM exits. Is there any way to intercept the signal to terminate from the child process before the JVM exits?
    NOTE: I am not running Runtime.exec() concurrently and I am explicitly destroying each Process after process.waitFor(). Also, I tend to watch the linux "top" output to confirm that only one Perl process is running at a time. I have tried various versions of a "runCommand" method. The current version spawns no additional threads:
    public static int runCommand(String[] command) throws InterruptedException, IOException
              ProcessBuilder builder = new ProcessBuilder(command);
              builder.redirectErrorStream(true);
              Process process = builder.start();
              InputStream input = null;
              InputStream error = null;
              OutputStream output = null;
              BufferedReader reader;
              String line;
              try     {
                   input = process.getInputStream();
                   error = process.getErrorStream();
                   output = process.getOutputStream();
                   reader = new BufferedReader(new InputStreamReader(input));
                   while ((line = reader.readLine()) != null)
                        System.out.println(line);
                   return process.waitFor();
              finally
                   close(output);
                   close(error);
                   close(input);
                   process.destroy();
              }

  • BufferedImage.createGraphics crashes JVM

    Hi,
    I want to add some annotations such as lines, text into an image loaded into a BufferedImage. The way I do this is like this:
    BufferedImage aBufferedImage = new BufferedImage(cm, raster, false, null);
    Graphics g = aBufferedImage.createGraphics();
    g.draw .... etc.
    ImageIO.write(aBufferedImage, "jpg", new File(inFileName));
    However, JVM crashes with message like these:
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x7D51DC
    Function=JNU_GetEnv+0xC
    Library=C:\Program Files\jdk1.4.2_06\jre\bin\java.dll
    Current Java thread:
    at sun.awt.font.NativeFontWrapper.registerFonts(Native Method)
    - locked <0x14206c48> (a java.lang.Class)
    at sun.java2d.SunGraphicsEnvironment.addPathFonts(SunGraphicsEnvironment.java:800)
    at sun.java2d.SunGraphicsEnvironment.registerFonts(SunGraphicsEnvironment.java:643)
    at sun.java2d.SunGraphicsEnvironment.access$200(SunGraphicsEnvironment.java:53)
    at sun.java2d.SunGraphicsEnvironment$1.run(SunGraphicsEnvironment.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.java2d.SunGraphicsEnvironment.<init>(SunGraphicsEnvironment.java:85)
    at sun.awt.Win32GraphicsEnvironment.<init>(Win32GraphicsEnvironment.java:54)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
    at java.lang.Class.newInstance0(Class.java:308)
    at java.lang.Class.newInstance(Class.java:261)
    at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62)
    - locked <0x141b3810> (a java.lang.Class)
    at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1041)
    at com.amicas.renderer.JImageRenderer.render(JImageRenderer.java:79)
    at com.amicas.renderer.JRendererTest.run(JRendererTest.java:47)
    at java.lang.Thread.run(Thread.java:534)
    Note that I never create any AWT or Swing component. The program is supposed to generate dynamic images inside a server and send images to clients.
    Has anybody experienced this? Any clue why it happened?
    Thanks!

    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4482430

  • CS5 Master Collection instantly crashes.

    I am installing Adobe CS5 Master Collection. The install finishes fine, but then when I want to open any programs like Illustrator, Photoshop, and InDesign they all crash. I am able to get Illustrator and Photoshop working again by changing their respective scriptsupport files to .old, but InDesign does not appear to have this. I need InDesign to work. Also, I cannot install any updates. They download and get halfway through installing and then they fail. I have already uninstalled and reinstalled. Nothing works. I have used the cleaner with no positive results. I have also tried to download the standalone updates for each program, but those do not help.

    try resetting your preferences.
    for id, InDesign Help | Setting preferences

  • Help!  Crashing JVM while doing SELECT statement through JDBC-ODBC bridge

    Hi everyone,
    Help please. I am working on a project on my own computer using the jdk version 1.5.0_04.
    The project involves running a select on a Microsoft Access 2003 database via the JDBC-ODBC bridge. The database is registered in the ODBC database sources, and it works fine in those other projects.
    Yet, when I'm running similar code in this project, it crashes the Java Virtual Machine. I get the following in a log file:
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7c901010, pid=2308, tid=1364
    # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing)
    # Problematic frame:
    # C [ntdll.dll+0x1010]
    --------------- T H R E A D ---------------
    Current thread (0x000360f8): JavaThread "main" [_thread_in_native, id=1364]
    siginfo: ExceptionCode=0xc0000005, reading address 0x00000018
    Registers:
    EAX=0x00000004, EBX=0x26bb5250, ECX=0x7ffde000, EDX=0x00000004
    ESP=0x0007f8d8, EBP=0x0007f8f0, ESI=0x00000000, EDI=0x02ea1590
    EIP=0x7c901010, EFLAGS=0x00010246
    Top of Stack: (sp=0x0007f8d8)
    0x0007f8d8: 74355a16 00000004 02ea15b4 7432139f
    0x0007f8e8: 02ea15b4 02ea1590 0007f900 74322c5d
    0x0007f8f8: 02ea15b4 000361b4 0007f914 74325fa0
    0x0007f908: 02ea1590 74350000 00390000 0007f930
    0x0007f918: 7432740e 02ea1590 0007f950 00000003
    0x0007f928: 00aabe20 000361b4 0007f948 6d3e11da
    0x0007f938: 02ea1590 0007f950 000360f8 26bb5250
    0x0007f948: 0007f980 00ad826f 00000000 0007f99c
    Instructions: (pc=0x7c901010)
    0x7c901000: 90 90 90 90 90 64 8b 0d 18 00 00 00 8b 54 24 04
    0x7c901010: 83 7a 14 00 75 4f f0 ff 42 04 75 19 8b 41 24 89
    Stack: [0x00040000,0x00080000), sp=0x0007f8d8, free space=254k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C [ntdll.dll+0x1010]
    C [ODBC32.dll+0x2c5d]
    C [ODBC32.dll+0x5fa0]
    C [ODBC32.dll+0x740e]
    C [JdbcOdbc.dll+0x11da]
    j sun.jdbc.odbc.JdbcOdbc.allocStmt(J[B)J+0
    j sun.jdbc.odbc.JdbcOdbc.SQLAllocStmt(J)J+47
    j sun.jdbc.odbc.JdbcOdbcConnection.createStatement(II)Ljava/sql/Statement;+27
    j sun.jdbc.odbc.JdbcOdbcConnection.createStatement()Ljava/sql/Statement;+7
    j LUDatabaseWorker.getBoxScoreFromDB(LStatisticalItems/BoxScore;)LStatisticalItems/BoxScore;+215
    j NewUSCHOLiveUpdate.processTheBoxScores()V+78
    j NewUSCHOLiveUpdate.main([Ljava/lang/String;)V+9
    v ~StubRoutines::call_stub
    V [jvm.dll+0x82696]
    V [jvm.dll+0xd6fd9]
    V [jvm.dll+0x82567]
    V [jvm.dll+0x895e6]
    C [java.exe+0x14c0]
    C [java.exe+0x64cd]
    C [kernel32.dll+0x16d4f]
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j sun.jdbc.odbc.JdbcOdbc.allocStmt(J[B)J+0
    j sun.jdbc.odbc.JdbcOdbc.SQLAllocStmt(J)J+47
    j sun.jdbc.odbc.JdbcOdbcConnection.createStatement(II)Ljava/sql/Statement;+27
    j sun.jdbc.odbc.JdbcOdbcConnection.createStatement()Ljava/sql/Statement;+7
    j LUDatabaseWorker.getBoxScoreFromDB(LStatisticalItems/BoxScore;)LStatisticalItems/BoxScore;+215
    j NewUSCHOLiveUpdate.processTheBoxScores()V+78
    j NewUSCHOLiveUpdate.main([Ljava/lang/String;)V+9
    v ~StubRoutines::call_stub
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x00a6e550 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=2240]
    0x00a6d258 JavaThread "CompilerThread0" daemon [_thread_blocked, id=736]
    0x00a6c440 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2252]
    0x00a47808 JavaThread "Finalizer" daemon [_thread_blocked, id=3352]
    0x00a46328 JavaThread "Reference Handler" daemon [_thread_blocked, id=1560]
    =>0x000360f8 JavaThread "main" [_thread_in_native, id=1364]
    Other Threads:
    0x00a67a68 VMThread [id=2700]
    0x00a6f8c8 WatcherThread [id=2480]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 576K, used 404K [0x22b90000, 0x22c30000, 0x23070000)
    eden space 512K, 70% used [0x22b90000, 0x22bea738, 0x22c10000)
    from space 64K, 66% used [0x22c20000, 0x22c2a990, 0x22c30000)
    to space 64K, 0% used [0x22c10000, 0x22c10000, 0x22c20000)
    tenured generation total 1408K, used 846K [0x23070000, 0x231d0000, 0x26b90000)
    the space 1408K, 60% used [0x23070000, 0x231438e0, 0x23143a00, 0x231d0000)
    compacting perm gen total 8192K, used 507K [0x26b90000, 0x27390000, 0x2ab90000)
    the space 8192K, 6% used [0x26b90000, 0x26c0ed38, 0x26c0ee00, 0x27390000)
    ro space 8192K, 66% used [0x2ab90000, 0x2b0e9dc0, 0x2b0e9e00, 0x2b390000)
    rw space 12288K, 46% used [0x2b390000, 0x2b927e98, 0x2b928000, 0x2bf90000)
    Dynamic libraries:
    0x00400000 - 0x0040c000      C:\jdk1.5.0_04\bin\java.exe
    0x7c900000 - 0x7c9b0000      C:\WINDOWS\system32\ntdll.dll
    0x7c800000 - 0x7c8f4000      C:\WINDOWS\system32\kernel32.dll
    0x77dd0000 - 0x77e6b000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77e70000 - 0x77f01000      C:\WINDOWS\system32\RPCRT4.dll
    0x77c10000 - 0x77c68000      C:\WINDOWS\system32\MSVCRT.dll
    0x6d6b0000 - 0x6d839000      C:\jdk1.5.0_04\jre\bin\client\jvm.dll
    0x77d40000 - 0x77dd0000      C:\WINDOWS\system32\USER32.dll
    0x77f10000 - 0x77f56000      C:\WINDOWS\system32\GDI32.dll
    0x76b40000 - 0x76b6d000      C:\WINDOWS\system32\WINMM.dll
    0x629c0000 - 0x629c9000      C:\WINDOWS\system32\LPK.DLL
    0x74d90000 - 0x74dfb000      C:\WINDOWS\system32\USP10.dll
    0x6d2f0000 - 0x6d2f8000      C:\jdk1.5.0_04\jre\bin\hpi.dll
    0x76bf0000 - 0x76bfb000      C:\WINDOWS\system32\PSAPI.DLL
    0x6d680000 - 0x6d68c000      C:\jdk1.5.0_04\jre\bin\verify.dll
    0x6d370000 - 0x6d38d000      C:\jdk1.5.0_04\jre\bin\java.dll
    0x6d6a0000 - 0x6d6af000      C:\jdk1.5.0_04\jre\bin\zip.dll
    0x6d3e0000 - 0x6d3ed000      C:\jdk1.5.0_04\jre\bin\JdbcOdbc.dll
    0x74320000 - 0x7435d000      C:\WINDOWS\system32\ODBC32.dll
    0x5d090000 - 0x5d127000      C:\WINDOWS\system32\COMCTL32.dll
    0x7c9c0000 - 0x7d1d5000      C:\WINDOWS\system32\SHELL32.dll
    0x77f60000 - 0x77fd6000      C:\WINDOWS\system32\SHLWAPI.dll
    0x763b0000 - 0x763f9000      C:\WINDOWS\system32\comdlg32.dll
    0x773d0000 - 0x774d2000      C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll
    0x20000000 - 0x20017000      C:\WINDOWS\system32\odbcint.dll
    0x774e0000 - 0x7761d000      C:\WINDOWS\system32\ole32.dll
    0x77120000 - 0x771ac000      C:\WINDOWS\system32\OLEAUT32.dll
    0x77fe0000 - 0x77ff1000      C:\WINDOWS\system32\Secur32.dll
    0x76fd0000 - 0x7704f000      C:\WINDOWS\system32\CLBCATQ.DLL
    0x77050000 - 0x77115000      C:\WINDOWS\system32\COMRes.dll
    0x77c00000 - 0x77c08000      C:\WINDOWS\system32\VERSION.dll
    0x0f9a0000 - 0x0f9ab000      C:\WINDOWS\system32\VBAJET32.DLL
    0x5ad70000 - 0x5ada8000      C:\WINDOWS\system32\uxtheme.dll
    VM Arguments:
    java_command: NewUSCHOLiveUpdate
    Environment Variables:
    JAVA_HOME=C:\jdk1.5.0_04
    CLASSPATH=C:\jdk1.5.0_04\bin\NewLiveUpdate;C:\jdk1.5.0_04\bin\NewLiveUpdate\StatisticalItems;C:\jdk1.5.0_04\bin\NewLiveUpdate\Exceptions;C:\jdk1.5.0_04\bin\NewLiveUpdate\Helper;
    PATH=C:\jdk1.5.0_04\bin;C:\JavaTools\ant\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBEM;;c:\program files\devstudio\sharedide\bin\ide;c:\program files\devstudio\sharedide\bin;c:\program files\devstudio\vc\bin
    USERNAME=Kevin Yetman
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 3, GenuineIntel
    --------------- S Y S T E M ---------------
    OS: Windows XP Build 2600 Service Pack 2
    CPU:total 2 family 15, cmov, cx8, fxsr, mmx, sse, sse2, ht
    Memory: 4k page, physical 1047020k(627436k free), swap 2518436k(2161900k free)
    vm_info: Java HotSpot(TM) Client VM (1.5.0_04-b05) for windows-x86, built on Jun 3 2005 02:10:41 by "java_re" with MS VC++ 6.0
    The code that is causing the problem is in the class shown below. It is in the method getBoxScoreFromDB. When it attempts to run the first select statement, it causes the crash that I showed above.
    The connection is set up by the calling class. The calling class constructs a LUDatabaseWorker, sets the necessary parameters (dbURL, driver class, username and password), and calls the openDBConnection().
    // LUDatabaseWorker.java
    import StatisticalItems.*;
    import java.sql.*;
    import java.util.*;
    public class LUDatabaseWorker
       private StatisticalItems.BoxScore m_CurrentBoxScoreInDB;
       private Connection                m_Connection;
       private String                    m_dbURL;
       private String                    m_dbUsername;
       private String                    m_dbPassword;
       private String                    m_dbDriverClass;
       public LUDatabaseWorker()
       public StatisticalItems.BoxScore getCurrentBoxScoreInDB()
       {  return m_CurrentBoxScoreInDB;
       public void setDBURL(String dbURL)
       {  m_dbURL=new String(dbURL);
       public void setDBUsername(String dbUsername)
       {  m_dbUsername=new String(dbUsername);
       public void setDBPassword(String dbPassword)
       {  m_dbPassword=new String(dbPassword);
       public void setDBDriverClass(String dbDriverClass)
       {  m_dbDriverClass=new String(dbDriverClass);
       public void openDBConnection()
          throws SQLException, ClassNotFoundException
          Class.forName(m_dbDriverClass);
          m_Connection=DriverManager.getConnection(m_dbURL, m_dbUsername, m_dbPassword);
       public void closeDBConnection()
          throws SQLException
          m_Connection.close();
       public Hashtable<String, Integer> getUSCHOCodeToMyTeamIndexMap()
          throws SQLException
          Hashtable<String, Integer> ht=new Hashtable<String, Integer>();
          String sqlQuery="SELECT TeamIndex, TeamCode FROM TeamLiveUpdateUSCHO";
          Statement st=m_Connection.createStatement();
          ResultSet rs=st.executeQuery(sqlQuery);
          while(rs.next())
             String uschoCode=new String(rs.getString(2));
             Integer myTeamIndex=new Integer(rs.getInt(1));
             ht.put(uschoCode, myTeamIndex);
          rs.close();
          st.close();
          return ht;
       public StatisticalItems.BoxScore getBoxScoreFromDB(StatisticalItems.BoxScore luBoxScore)
          throws SQLException
          StatisticalItems.BoxScore  boxScoreFromDB=new StatisticalItems.BoxScore();
          // get the basic game info from the live update box score.
          StatisticalItems.Game    luBasicGameData=luBoxScore.getBasicGameData();
          // get the basic game data.
          String sqlQuery="SELECT * FROM Game WHERE (Year=" + luBasicGameData.getYear() + ") AND (Month='";
          if( luBasicGameData.getMonth() < 10 )
          {  sqlQuery+="0";
          sqlQuery+=luBasicGameData.getMonth() + "') AND (Day='";
          if( luBasicGameData.getDay() < 10 )
          {  sqlQuery+="0";
          sqlQuery+=luBasicGameData.getDay() + "') AND (HomeTeamIndex=" + luBasicGameData.getHomeTeamIndex();
          sqlQuery+=") AND (VisitorTeamIndex=" + luBasicGameData.getVisitorTeamIndex() + ")";
          System.out.println(sqlQuery);
          Statement st=m_Connection.createStatement();
          ResultSet rs=st.executeQuery(sqlQuery);
          if( rs.next() )
             StatisticalItems.Game  dbGame=boxScoreFromDB.getBasicGameData();
             dbGame.setGameIndex(rs.getInt("GameIndex"));
             dbGame.setHomeTeamIndex(rs.getInt("HomeTeamIndex"));
             dbGame.setVisitorTeamIndex(rs.getInt("VisitorTeamIndex"));
             dbGame.setHomeTeamGoals(rs.getInt("HomeTeamGoals"));
             dbGame.setVisitorTeamGoals(rs.getInt("VisitorTeamGoals"));
             dbGame.setHomeTeamScoredFirst(rs.getString("HomeTeamScoredFirst"));
             dbGame.setYear(rs.getInt("Year"));
             dbGame.setMonth(rs.getInt("Month"));
             dbGame.setDay(rs.getInt("Day"));
             dbGame.setLeagueGame(rs.getBoolean("LeagueGame"));
             dbGame.setNeutralSiteGame(rs.getBoolean("NeutralSiteGame"));
             dbGame.setForfeitHome(rs.getBoolean("ForfeitHome"));
             dbGame.setForfeitVisitor(rs.getBoolean("ForfeitVisitor"));
             dbGame.setPlayoffGame(rs.getBoolean("PlayoffGame"));
             boxScoreFromDB.setBasicGameData(dbGame);
          StatisticalItems.Game  dbGame=boxScoreFromDB.getBasicGameData();
          // get the home team goals per period.
          sqlQuery="SELECT * FROM GameDetailGoalsPerPeriod WHERE (GameIndex=" + dbGame.getGameIndex() + ") AND ";
          sqlQuery+="(TeamIndex=" + dbGame.getHomeTeamIndex() + ")";
          rs=st.executeQuery(sqlQuery);
          if( rs.next() )
             StatisticalItems.GameDetailGoalsPerPeriod dbHomeGPP=boxScoreFromDB.getHomeTeamGoalsPerPeriod();
             dbHomeGPP.setGameDetailGoalsPerPeriodIndex(rs.getInt("GameDetailGoalsPerPeriodIndex"));
             dbHomeGPP.setGameIndex(rs.getInt("GameIndex"));
             dbHomeGPP.setTeamIndex(rs.getInt("TeamIndex"));
             dbHomeGPP.setPeriod1(new Integer(rs.getInt("GoalsFirstPeriod")));
             dbHomeGPP.setPeriod2(new Integer(rs.getInt("GoalsSecondPeriod")));
             dbHomeGPP.setPeriod3(new Integer(rs.getInt("GoalsThidPeriod")));
             dbHomeGPP.setOvertime(new Integer(rs.getInt("GoalsOvertime")));
             dbHomeGPP.setEmptyNetGoals(rs.getInt("EmptyNetGoals"));
             dbHomeGPP.setFoundInDatabase(true);
             boxScoreFromDB.setHomeTeamGoalsPerPeriod(dbHomeGPP);
          // get the visitor team goals per period. 
          sqlQuery="SELECT * FROM GameDetailGoalsPerPeriod WHERE (GameIndex=" + dbGame.getGameIndex() + ") AND ";
          sqlQuery+="(TeamIndex=" + dbGame.getVisitorTeamIndex() + ")";
          rs=st.executeQuery(sqlQuery);
          if( rs.next() )
             StatisticalItems.GameDetailGoalsPerPeriod dbVisitorGPP=boxScoreFromDB.getVisitorTeamGoalsPerPeriod();
             dbVisitorGPP.setGameDetailGoalsPerPeriodIndex(rs.getInt("GameDetailGoalsPerPeriodIndex"));
             dbVisitorGPP.setGameIndex(rs.getInt("GameIndex"));
             dbVisitorGPP.setTeamIndex(rs.getInt("TeamIndex"));
             dbVisitorGPP.setPeriod1(new Integer(rs.getInt("GoalsFirstPeriod")));
             dbVisitorGPP.setPeriod2(new Integer(rs.getInt("GoalsSecondPeriod")));
             dbVisitorGPP.setPeriod3(new Integer(rs.getInt("GoalsThidPeriod")));
             dbVisitorGPP.setOvertime(new Integer(rs.getInt("GoalsOvertime")));
             dbVisitorGPP.setEmptyNetGoals(rs.getInt("EmptyNetGoals"));
             dbVisitorGPP.setFoundInDatabase(true);
             boxScoreFromDB.setVisitorTeamGoalsPerPeriod(dbVisitorGPP);
          // get the home team shots per period.
          sqlQuery="SELECT * FROM GameDetailShotsPerPeriod WHERE (GameIndex=" + dbGame.getGameIndex() + ") AND ";
          sqlQuery+="(TeamIndex=" + dbGame.getHomeTeamIndex() + ")";
          rs=st.executeQuery(sqlQuery);
          if( rs.next() )
             StatisticalItems.GameDetailShotsPerPeriod dbHomeSPP=boxScoreFromDB.getHomeTeamShotsPerPeriod();
             dbHomeSPP.setGameDetailShotsPerPeriodIndex(rs.getInt("GameDetailShotsPerPeriodIndex"));
             dbHomeSPP.setGameIndex(rs.getInt("GameIndex"));
             dbHomeSPP.setTeamIndex(rs.getInt("TeamIndex"));
             dbHomeSPP.setPeriod1(new Integer(rs.getInt("ShotsFirstPeriod")));
             dbHomeSPP.setPeriod2(new Integer(rs.getInt("ShotsSecondPeriod")));
             dbHomeSPP.setPeriod3(new Integer(rs.getInt("ShotsThidPeriod")));
             dbHomeSPP.setOvertime(new Integer(rs.getInt("ShotsOvertime")));
             dbHomeSPP.setFoundInDatabase(true);
             boxScoreFromDB.setHomeTeamShotsPerPeriod(dbHomeSPP);
          // get the visitor team shots per period. 
          sqlQuery="SELECT * FROM GameDetailShotsPerPeriod WHERE (GameIndex=" + dbGame.getGameIndex() + ") AND ";
          sqlQuery+="(TeamIndex=" + dbGame.getVisitorTeamIndex() + ")";
          rs=st.executeQuery(sqlQuery);
          if( rs.next() )
             StatisticalItems.GameDetailShotsPerPeriod dbVisitorSPP=boxScoreFromDB.getVisitorTeamShotsPerPeriod();
             dbVisitorSPP.setGameDetailShotsPerPeriodIndex(rs.getInt("GameDetailShotsPerPeriodIndex"));
             dbVisitorSPP.setGameIndex(rs.getInt("GameIndex"));
             dbVisitorSPP.setTeamIndex(rs.getInt("TeamIndex"));
             dbVisitorSPP.setPeriod1(new Integer(rs.getInt("ShotsFirstPeriod")));
             dbVisitorSPP.setPeriod2(new Integer(rs.getInt("ShotsSecondPeriod")));
             dbVisitorSPP.setPeriod3(new Integer(rs.getInt("ShotsThidPeriod")));
             dbVisitorSPP.setOvertime(new Integer(rs.getInt("ShotsOvertime")));
             dbVisitorSPP.setFoundInDatabase(true);
             boxScoreFromDB.setVisitorTeamShotsPerPeriod(dbVisitorSPP);
          // get the home team special teams.
          sqlQuery="SELECT * FROM GameDetailSpecialTeams WHERE (GameIndex=" + dbGame.getGameIndex() + ") AND ";
          sqlQuery+="(TeamIndex=" + dbGame.getHomeTeamIndex() + ")";
          rs=st.executeQuery(sqlQuery);
          if( rs.next() )
             StatisticalItems.GameDetailSpecialTeams dbHomeST=boxScoreFromDB.getHomeTeamSpecialTeams();
             dbHomeST.setGameDetailSpecialTeamsIndex(rs.getInt("GameDetailSpecialTeamsIndex"));
             dbHomeST.setGameIndex(rs.getInt("GameIndex"));
             dbHomeST.setTeamIndex(rs.getInt("TeamIndex"));
             dbHomeST.setPowerplayGoals(rs.getInt("PowerPlayGoals"));
             dbHomeST.setShorthandedGoals(rs.getInt("ShortHandedGoals"));
             dbHomeST.setPowerplayOps(rs.getInt("PowerPlayOps"));
             dbHomeST.setShorthandedOps(rs.getInt("ShortHandedOps"));
             dbHomeST.setPenalties(rs.getInt("Penalties"));
             dbHomeST.setPenaltyMinutes(rs.getInt("PenaltyMinutes"));
             dbHomeST.setFoundInDatabase(true);
             boxScoreFromDB.setHomeTeamSpecialTeams(dbHomeST);
          // get the home team special teams.
          sqlQuery="SELECT * FROM GameDetailSpecialTeams WHERE (GameIndex=" + dbGame.getGameIndex() + ") AND ";
          sqlQuery+="(TeamIndex=" + dbGame.getVisitorTeamIndex() + ")";
          rs=st.executeQuery(sqlQuery);
          if( rs.next() )
             StatisticalItems.GameDetailSpecialTeams dbVisitorST=boxScoreFromDB.getVisitorTeamSpecialTeams();
             dbVisitorST.setGameDetailSpecialTeamsIndex(rs.getInt("GameDetailSpecialTeamsIndex"));
             dbVisitorST.setGameIndex(rs.getInt("GameIndex"));
             dbVisitorST.setTeamIndex(rs.getInt("TeamIndex"));
             dbVisitorST.setPowerplayGoals(rs.getInt("PowerPlayGoals"));
             dbVisitorST.setShorthandedGoals(rs.getInt("ShortHandedGoals"));
             dbVisitorST.setPowerplayOps(rs.getInt("PowerPlayOps"));
             dbVisitorST.setShorthandedOps(rs.getInt("ShortHandedOps"));
             dbVisitorST.setPenalties(rs.getInt("Penalties"));
             dbVisitorST.setPenaltyMinutes(rs.getInt("PenaltyMinutes"));
             dbVisitorST.setFoundInDatabase(true);
             boxScoreFromDB.setVisitorTeamSpecialTeams(dbVisitorST);
          rs.close();
          st.close();
          return boxScoreFromDB;    
       public void updateBoxScoreInDB(StatisticalItems.BoxScore  dbBoxScore,
                                      StatisticalItems.BoxScore  luBoxScore,
                                      LUBoxScoreComparator       bsc)
          throws SQLException
          if( bsc.getGameChanged() )
             updateGameInDB(dbBoxScore, luBoxScore);
          if( bsc.getHomeGoalsPerPeriodChanged() )
             updateHomeGoalsPerPeriod(dbBoxScore, luBoxScore);
          if( bsc.getVisitorGoalsPerPeriodChanged() )
             updateVisitorGoalsPerPeriod(dbBoxScore, luBoxScore);
          if( bsc.getHomeShotsPerPeriodChanged() )
             updateHomeShotsPerPeriod(dbBoxScore, luBoxScore);
          if( bsc.getVisitorShotsPerPeriodChanged() )
             updateVisitorShotsPerPeriod(dbBoxScore, luBoxScore);
          if( bsc.getHomeSpecialTeamsChanged() )
             updateHomeSpecialTeams(dbBoxScore, luBoxScore);
          if( bsc.getVisitorSpecialTeamsChanged() )
             updateVisitorSpecialTeams(dbBoxScore, luBoxScore);
       protected void updateGameInDB(StatisticalItems.BoxScore dbBoxScore,
                                     StatisticalItems.BoxScore luBoxScore)
          throws SQLException
          // the only fields that NEED to be updated are HomeTeamGoals, VisitorTeamGoals, HomeTeamScoredFirst,
          // and LeagueGame.  You can't determine from the LU box Score:
          // Forfeits, NeutralSite, or Playoff.
          // the GameIndex, Both team indexes, and the game date will NEVER change from the database.
          Statement st=m_Connection.createStatement();
          String sqlStmt="UPDATE Game SET ";
          sqlStmt+="HomeTeamGoals=" + luBoxScore.getBasicGameData().getHomeTeamGoals() + ", ";
          sqlStmt+="VisitorTeamGoals=" + luBoxScore.getBasicGameData().getVisitorTeamGoals() + ", ";
          sqlStmt+="HomeTeamScoredFirst='" + luBoxScore.getBasicGameData().getHomeTeamScoredFirst() + "', ";
          sqlStmt+="LeagueGame=" + luBoxScore.getBasicGameData().getLeagueGame() + " ";
          sqlStmt+="WHERE GameIndex=" + dbBoxScore.getBasicGameData().getGameIndex();
          st.executeUpdate(sqlStmt);
          st.close();
       protected void updateHomeGoalsPerPeriod(StatisticalItems.BoxScore dbBoxScore,
                                               StatisticalItems.BoxScore luBoxScore)
          throws SQLException
          Statement st=m_Connection.createStatement();
          String sqlStmt="";
          if( dbBoxScore.getHomeTeamGoalsPerPeriod().getFoundInDatabase() )
             sqlStmt="UPDATE GameDetailGoalsPerPeriod SET ";
             sqlStmt+="GameIndex=" + dbBoxScore.getHomeTeamGoalsPerPeriod().getGameIndex() + ", ";
             sqlStmt+="TeamIndex=" + luBoxScore.getHomeTeamGoalsPerPeriod().getTeamIndex() + ", ";
             sqlStmt+="GoalsFirstPeriod=" + luBoxScore.getHomeTeamGoalsPerPeriod().getPeriod1() + ", ";
             sqlStmt+="GoalsSecondPeriod=" + luBoxScore.getHomeTeamGoalsPerPeriod().getPeriod2() + ", ";
             sqlStmt+="GoalsThirdPeriod=" + luBoxScore.getHomeTeamGoalsPerPeriod().getPeriod3() + ", ";
             sqlStmt+="GoalsOvertime=" + luBoxScore.getHomeTeamGoalsPerPeriod().getOvertime() + ", ";
             sqlStmt+="EmptyNetGoals=" + luBoxScore.getHomeTeamGoalsPerPeriod().getEmptyNetGoals() + " ";
             sqlStmt+="WHERE GameIndex=" + dbBoxScore.getHomeTeamGoalsPerPeriod().getGameIndex() + " AND ";
             sqlStmt+="TeamIndex=" + luBoxScore.getHomeTeamGoalsPerPeriod().getTeamIndex();
          else
             sqlStmt="INSERT INTO GameDetailGoalsPerPeriod ";
             sqlStmt+="(GameIndex, TeamIndex, GoalsFirstPeriod, GoalsSecondPeriod, GoalsThirdPeriod, ";
             sqlStmt+="GoalsOvertime, EmptyNetGoals) VALUES(";
             sqlStmt+=dbBoxScore.getBasicGameData().getGameIndex() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamGoalsPerPeriod().getTeamIndex() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamGoalsPerPeriod().getPeriod1() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamGoalsPerPeriod().getPeriod2() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamGoalsPerPeriod().getPeriod3() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamGoalsPerPeriod().getOvertime() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamGoalsPerPeriod().getEmptyNetGoals() + ")";
          st.executeUpdate(sqlStmt);
          st.close();
       protected void updateVisitorGoalsPerPeriod(StatisticalItems.BoxScore dbBoxScore,
                                                  StatisticalItems.BoxScore luBoxScore)
          throws SQLException
          Statement st=m_Connection.createStatement();
          String sqlStmt="";
          if( dbBoxScore.getVisitorTeamGoalsPerPeriod().getFoundInDatabase() )
             sqlStmt="UPDATE GameDetailGoalsPerPeriod SET ";
             sqlStmt+="GameIndex=" + dbBoxScore.getVisitorTeamGoalsPerPeriod().getGameIndex() + ", ";
             sqlStmt+="TeamIndex=" + luBoxScore.getVisitorTeamGoalsPerPeriod().getTeamIndex() + ", ";
             sqlStmt+="GoalsFirstPeriod=" + luBoxScore.getVisitorTeamGoalsPerPeriod().getPeriod1() + ", ";
             sqlStmt+="GoalsSecondPeriod=" + luBoxScore.getVisitorTeamGoalsPerPeriod().getPeriod2() + ", ";
             sqlStmt+="GoalsThirdPeriod=" + luBoxScore.getVisitorTeamGoalsPerPeriod().getPeriod3() + ", ";
             sqlStmt+="GoalsOvertime=" + luBoxScore.getVisitorTeamGoalsPerPeriod().getOvertime() + ", ";
             sqlStmt+="EmptyNetGoals=" + luBoxScore.getVisitorTeamGoalsPerPeriod().getEmptyNetGoals() + " ";
             sqlStmt+="WHERE GameIndex=" + dbBoxScore.getVisitorTeamGoalsPerPeriod().getGameIndex() + " AND ";
             sqlStmt+="TeamIndex=" + luBoxScore.getVisitorTeamGoalsPerPeriod().getTeamIndex();
          else
             sqlStmt="INSERT INTO GameDetailGoalsPerPeriod ";
             sqlStmt+="(GameIndex, TeamIndex, GoalsFirstPeriod, GoalsSecondPeriod, GoalsThirdPeriod, ";
             sqlStmt+="GoalsOvertime, EmptyNetGoals) VALUES(";
             sqlStmt+=dbBoxScore.getBasicGameData().getGameIndex() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamGoalsPerPeriod().getTeamIndex() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamGoalsPerPeriod().getPeriod1() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamGoalsPerPeriod().getPeriod2() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamGoalsPerPeriod().getPeriod3() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamGoalsPerPeriod().getOvertime() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamGoalsPerPeriod().getEmptyNetGoals() + ")";
          st.executeUpdate(sqlStmt);
          st.close();
       protected void updateHomeShotsPerPeriod(StatisticalItems.BoxScore dbBoxScore,
                                               StatisticalItems.BoxScore luBoxScore)
          throws SQLException
          Statement st=m_Connection.createStatement();
          String sqlStmt="";
          if( dbBoxScore.getHomeTeamShotsPerPeriod().getFoundInDatabase() )
             sqlStmt="UPDATE GameDetailShotsPerPeriod SET ";
             sqlStmt+="GameIndex=" + dbBoxScore.getHomeTeamShotsPerPeriod().getGameIndex() + ", ";
             sqlStmt+="TeamIndex=" + luBoxScore.getHomeTeamShotsPerPeriod().getTeamIndex() + ", ";
             sqlStmt+="ShotsFirstPeriod=" + luBoxScore.getHomeTeamShotsPerPeriod().getPeriod1() + ", ";
             sqlStmt+="ShotsSecondPeriod=" + luBoxScore.getHomeTeamShotsPerPeriod().getPeriod2() + ", ";
             sqlStmt+="ShotsThirdPeriod=" + luBoxScore.getHomeTeamShotsPerPeriod().getPeriod3() + ", ";
             sqlStmt+="ShotsOvertime=" + luBoxScore.getHomeTeamShotsPerPeriod().getOvertime() + " ";
             sqlStmt+="WHERE GameIndex=" + dbBoxScore.getHomeTeamShotsPerPeriod().getGameIndex() + " AND ";
             sqlStmt+="TeamIndex=" + luBoxScore.getHomeTeamShotsPerPeriod().getTeamIndex();
          else
             sqlStmt="INSERT INTO GameDetailShotsPerPeriod ";
             sqlStmt+="(GameIndex, TeamIndex, ShotsFirstPeriod, ShotsSecondPeriod, ShotsThirdPeriod, ";
             sqlStmt+="ShotsOvertime) VALUES(";
             sqlStmt+=dbBoxScore.getBasicGameData().getGameIndex() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamShotsPerPeriod().getTeamIndex() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamShotsPerPeriod().getPeriod1() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamShotsPerPeriod().getPeriod2() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamShotsPerPeriod().getPeriod3() + ", ";
             sqlStmt+=luBoxScore.getHomeTeamShotsPerPeriod().getOvertime() + ")";
          st.executeUpdate(sqlStmt);
          st.close();
       protected void updateVisitorShotsPerPeriod(StatisticalItems.BoxScore dbBoxScore,
                                                  StatisticalItems.BoxScore luBoxScore)
          throws SQLException
          Statement st=m_Connection.createStatement();
          String sqlStmt="";
          if( dbBoxScore.getVisitorTeamShotsPerPeriod().getFoundInDatabase() )
             sqlStmt="UPDATE GameDetailShotsPerPeriod SET ";
             sqlStmt+="GameIndex=" + dbBoxScore.getVisitorTeamShotsPerPeriod().getGameIndex() + ", ";
             sqlStmt+="TeamIndex=" + luBoxScore.getVisitorTeamShotsPerPeriod().getTeamIndex() + ", ";
             sqlStmt+="ShotsFirstPeriod=" + luBoxScore.getVisitorTeamShotsPerPeriod().getPeriod1() + ", ";
             sqlStmt+="ShotsSecondPeriod=" + luBoxScore.getVisitorTeamShotsPerPeriod().getPeriod2() + ", ";
             sqlStmt+="ShotsThirdPeriod=" + luBoxScore.getVisitorTeamShotsPerPeriod().getPeriod3() + ", ";
             sqlStmt+="ShotsOvertime=" + luBoxScore.getVisitorTeamShotsPerPeriod().getOvertime() + " ";
             sqlStmt+="WHERE GameIndex=" + dbBoxScore.getVisitorTeamShotsPerPeriod().getGameIndex() + " AND ";
             sqlStmt+="TeamIndex=" + luBoxScore.getVisitorTeamShotsPerPeriod().getTeamIndex();
          else
             sqlStmt="INSERT INTO GameDetailShotsPerPeriod ";
             sqlStmt+="(GameIndex, TeamIndex, ShotsFirstPeriod, ShotsSecondPeriod, ShotsThirdPeriod, ";
             sqlStmt+="ShotsOvertime) VALUES(";
             sqlStmt+=dbBoxScore.getBasicGameData().getGameIndex() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamShotsPerPeriod().getTeamIndex() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamShotsPerPeriod().getPeriod1() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamShotsPerPeriod().getPeriod2() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamShotsPerPeriod().getPeriod3() + ", ";
             sqlStmt+=luBoxScore.getVisitorTeamShotsPerPeriod().getOvertime() + ")";
          st.executeUpdate(sqlStmt);
          st.close();
       protected void updateHomeSpecialTeams(StatisticalItems.BoxScore dbBoxScore,
                                             StatisticalItems.BoxScore luBoxScore)
          throws SQLException
          Statement st=m_Connection.createStatement();
          String sqlStmt="";
          if( dbBoxScore.getHomeTeamSpecialTeams().getFoundInDatabase() )
             sqlStmt="UPDATE GameDetailSpecialTeams SET ";
             sqlStmt+="GameIndex=" + dbBoxScore.getHomeTeamSpecialTeams().getGameIndex() + ", ";
             sqlStmt+="TeamIndex=" + luBoxScore.getHomeTeamSpecialTeams().getTeamIndex() + ", ";
             sqlStmt+="PowerplayGoals=" + luBoxScore.getHomeTeamSpecialTeams().getPowerplayGoals() + ", ";
             sqlStmt+="PowerplayOps=" + luBoxScore.getHomeTeamSpecialTeams().getPowerplayOps() + ", ";
             sqlStmt+="ShorthandedGoals=" + luBoxScore.getHomeTeamSpecialTeams().getShorthandedGoals() + ", ";
             sqlStmt+="ShorthandedOps=" + luBoxScore.getHomeTeamSpecialTeams().getShorthande                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    its because you use hungarian notation - that was the hollywood squares answer.
    It looks like a bug in either the ntdll or the JdbcOdbc dll, so I'd see if you can't isolate the problem (like using a smaller bit of code) and file a bug report. Find out exacty what your sql statement is which causes this to crash - hint : line 215

  • After AttachCurrentThread: Calling back to Java method crashes JVM

    Hi,
    so I managed to get my multithreaded native code being invoked from a Java program.
    However, as soon as I try to invoke a Java callback from native code not running in the main thread, the program segfaults. Here's my code:
    // in the main thread, I store a pointer to the JVM that invokes this code
        if (env->GetJavaVM(&jvm) < 0) {
            std::cerr << "JNI ERROR: Failed getting reference to Java VM" << std::endl;
            return;
        assert (jvm != NULL);
    // in some other concurrently running (native) thread:
        JNIEnv *env;
        if (jvm->AttachCurrentThread((void**)&env, NULL) != JNI_OK) {
            std::cerr << "ERROR: Could not attach event thread to JVM" << std::endl;
            return;
        assert (env != NULL);
        assert (connector != NULL);
        assert (focusEventCallback != NULL);
        // the following line segfaults
        env->CallVoidMethod(connector, focusEventCallback);"connector" is a POJO, focusEventCallback the jmethodID referencing the Java callback.
    Am I missing something?
    Thanks in advance,
    Matthias

    jschell wrote:
    What do you mean by that? I get this reference in the main thread in JNI_OnLoad and I use it in another thread. So I use it across thread boundaries. Is that what you mean?Generally not a good idea.So what do you suggest?
    Getting that reference inside the thread where I use it didn't work, because the class lookup failed (ClassNotFoundException).Which means your code was wrong, not that it wouldn't work.So, what in particular was wrong about my code? Here is the section of the code that did not work, because the class lookup failed:
        JNIEnv *env = NULL;
        // "import" the native user level thread as a Java thread in the JVM
        if (jvm->AttachCurrentThread((void**)&env, NULL) != JNI_OK) {
            std::cerr << "JNI ERROR: Could not attach X11 event thread to JVM" << std::endl;
            return;
        jclass connectorClass = env->FindClass("de/dfki/km/mydesk/nativeInterfaces/linux/NetWmConnector");
        if (env->ExceptionOccurred()) {
            env->ExceptionDescribe(); // will output ClassNotFoundException
        }The same code works inside JNI_OnLoad.
    Well, an assertion is supposed to do that: Terminate the program if there is a condition that would stop the program from operating properly. The crashes I was talking about are segmentation faults. A failing assertion is not a crash, it will just terminate the program with an "assertion failed" message.You are not writing a C/C++ app. You are running some code in a shared library that is run from a VM.
    Very different.
    I haven't tried it but I am rather certain that if you cause an assertion failure that you are going to see a crash. So far as I know the only exit mechanism that doesn't cause the VM to crash explicitly is a system exit call. And that probably shouldn't be used either (not normally.)Well, as far as I know, assert() sends an abort signal and terminates the process (which is the VM in this case). I probably overused assertions in that I used them to probe for runtime errors, not for programming errors. I'll remove them from the retail code anyway, so for now, it's just fine that the program terminates if something goes wrong. It helps locating the offending LOC.

  • Full GC crashed JVM!

    JVM log as following:
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x081b4609, pid=2812, tid=10276
    # Java VM: Java HotSpot(TM) Server VM (1.4.2_10-b03 mixed mode)
    # Problematic frame:
    # V [jvm.dll+0x1b4609]
    --------------- T H R E A D ---------------
    Current thread (0x0003e5b8): VMThread [id=10276]
    siginfo: ExceptionCode=0xc0000005, reading address 0x0fe16e7c
    Registers:
    EAX=0x47b68b38, EBX=0x00a1b968, ECX=0x00000001, EDX=0x0fe16e4c
    ESP=0x02f0fc28, EBP=0x02f0fc70, ESI=0x1f5f4de8, EDI=0x1fc4c208
    EIP=0x081b4609, EFLAGS=0x00010202
    Top of Stack: (sp=0x02f0fc28)
    0x02f0fc28: 00a1b968 02f0fc70 00000000 00000001
    0x02f0fc38: 1f224870 1f5f4de8 00000000 00a1b968
    0x02f0fc48: 1f224870 47b68b38 080b89d9 1f224890
    0x02f0fc58: 0003ae80 00a1b840 080b0695 02f0fc70
    0x02f0fc68: 0003ae80 00036430 00a1b840 00a1b968
    0x02f0fc78: 1f224a00 080b1128 00a1b890 0003ae80
    0x02f0fc88: 0e390000 00000000 00000001 00000001
    0x02f0fc98: 00000000 00000001 00000001 0000a218
    Instructions: (pc=0x081b4609)
    0x081b45f9: 74 24 14 e9 cb 00 00 00 8b fe 8b 57 04 83 c2 08
    0x081b4609: 8b 42 30 85 c0 7f 28 7d 1e 83 c9 ff 2b c8 8b 47
    Stack: [0x02ed0000,0x02f10000), sp=0x02f0fc28, free space=255k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    V [jvm.dll+0x1b4609]
    VM_Operation (0x05b3f46c): full generation collection, mode: safepoint, requested by thread 0x035bd340
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x035bd340 JavaThread "ConnectionHandler-35" [_thread_blocked, id=13304]
    Other Threads:
    =>0x0003e5b8 VMThread [id=10276]
    0x00a6b568 WatcherThread [id=20724]
    VM state:at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
    [0x00036dd0/0x0000071c] Threads_lock - owner thread: 0x0003e5b8
    [0x00036f50/0x000006e0] Heap_lock - owner thread: 0x035bd340
    Heap
    def new generation total 104832K, used 82219K [0x10010000, 0x171d0000, 0x171d0000)
    eden space 93184K, 82% used [0x10010000, 0x14b24d20, 0x15b10000)
    from space 11648K, 45% used [0x16670000, 0x16ba62b0, 0x171d0000)
    to space 11648K, 0% used [0x15b10000, 0x15b10000, 0x16670000)
    tenured generation total 932096K, used 796258K [0x171d0000, 0x50010000, 0x50010000)
    the space 932096K, 85% used [0x171d0000, 0x47b68b38, 0x1f224a00, 0x50010000)
    compacting perm gen total 80896K, used 80769K [0x50010000, 0x54f10000, 0x58010000)
    the space 80896K, 99% used [0x50010000, 0x54ef0558, 0x54ef0600, 0x54f10000)
    Dynamic libraries:
    0x00400000 - 0x0040b000      C:\j2sdk1.4.2\bin\java.exe
    0x7c930000 - 0x7ca00000      C:\WINDOWS\system32\ntdll.dll
    0x7c800000 - 0x7c92b000      C:\WINDOWS\system32\kernel32.dll
    0x77f30000 - 0x77fdc000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77c20000 - 0x77cbf000      C:\WINDOWS\system32\RPCRT4.dll
    0x77b70000 - 0x77bca000      C:\WINDOWS\system32\MSVCRT.dll
    0x08000000 - 0x082b7000      C:\j2sdk1.4.2\jre\bin\server\jvm.dll
    0x77e10000 - 0x77ea1000      C:\WINDOWS\system32\USER32.dll
    0x77bd0000 - 0x77c18000      C:\WINDOWS\system32\GDI32.dll
    0x769e0000 - 0x76a0a000      C:\WINDOWS\system32\WINMM.dll
    0x76180000 - 0x7619d000      C:\WINDOWS\system32\IMM32.DLL
    0x63090000 - 0x63099000      C:\WINDOWS\system32\LPK.DLL
    0x74ae0000 - 0x74b41000      C:\WINDOWS\system32\USP10.dll
    0x71b20000 - 0x71b28000      C:\WINDOWS\system32\rdpsnd.dll
    0x77f10000 - 0x77f21000      C:\WINDOWS\system32\WINSTA.dll
    0x71ba0000 - 0x71bf8000      C:\WINDOWS\system32\NETAPI32.dll
    0x76ab0000 - 0x76abb000      C:\WINDOWS\system32\PSAPI.DLL
    0x10000000 - 0x10007000      C:\j2sdk1.4.2\jre\bin\hpi.dll
    0x003e0000 - 0x003ee000      C:\j2sdk1.4.2\jre\bin\verify.dll
    0x008b0000 - 0x008c9000      C:\j2sdk1.4.2\jre\bin\java.dll
    0x003f0000 - 0x003fe000      C:\j2sdk1.4.2\jre\bin\zip.dll
    0x03310000 - 0x0331f000      C:\j2sdk1.4.2\jre\bin\net.dll
    0x71b60000 - 0x71b77000      C:\WINDOWS\system32\WS2_32.dll
    0x71b50000 - 0x71b58000      C:\WINDOWS\system32\WS2HELP.dll
    0x71a80000 - 0x71ac0000      C:\WINDOWS\System32\mswsock.dll
    0x76e30000 - 0x76e5a000      C:\WINDOWS\system32\DNSAPI.dll
    0x76ed0000 - 0x76ed7000      C:\WINDOWS\System32\winrnr.dll
    0x76e70000 - 0x76e9e000      C:\WINDOWS\system32\WLDAP32.dll
    0x76ee0000 - 0x76ee5000      C:\WINDOWS\system32\rasadhlp.dll
    0x037e0000 - 0x037e8000      C:\j2sdk1.4.2\jre\bin\nio.dll
    0x69660000 - 0x696b6000      C:\WINDOWS\system32\hnetcfg.dll
    0x71a40000 - 0x71a48000      C:\WINDOWS\System32\wshtcpip.dll
    0x05170000 - 0x05176000      C:\j2sdk1.4.2\jre\bin\ioser12.dll
    0x76c50000 - 0x76c69000      C:\WINDOWS\system32\iphlpapi.dll
    0x76c30000 - 0x76c49000      C:\WINDOWS\system32\MPRAPI.dll
    0x76d50000 - 0x76d83000      C:\WINDOWS\system32\ACTIVEDS.dll
    0x76d20000 - 0x76d47000      C:\WINDOWS\system32\adsldpc.dll
    0x76ac0000 - 0x76b05000      C:\WINDOWS\system32\credui.dll
    0x7ca10000 - 0x7d1f0000      C:\WINDOWS\system32\SHELL32.dll
    0x77eb0000 - 0x77f02000      C:\WINDOWS\system32\SHLWAPI.dll
    0x769c0000 - 0x769d8000      C:\WINDOWS\system32\ATL.DLL
    0x774b0000 - 0x775e4000      C:\WINDOWS\system32\ole32.dll
    0x775f0000 - 0x7767c000      C:\WINDOWS\system32\OLEAUT32.dll
    0x76d90000 - 0x76d9c000      C:\WINDOWS\system32\rtutils.dll
    0x5d000000 - 0x5d00f000      C:\WINDOWS\system32\SAMLIB.dll
    0x770d0000 - 0x77246000      C:\WINDOWS\system32\SETUPAPI.dll
    0x77cd0000 - 0x77dd3000      C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.3790.1830_x-ww_7AE38CCF\comctl32.dll
    0x078a0000 - 0x078a5000      C:\j2sdk1.4.2\jre\bin\rmi.dll
    0x68000000 - 0x6802f000      C:\WINDOWS\system32\rsaenh.dll
    0x75870000 - 0x7592f000      C:\WINDOWS\system32\USERENV.dll
    0x07b10000 - 0x07b28000      C:\WINDOWS\system32\jacob.dll
    0x0e2c0000 - 0x0e311000      C:\WINDOWS\system32\MSCTF.dll
    0x77680000 - 0x77703000      C:\WINDOWS\system32\CLBCatQ.DLL
    0x76f70000 - 0x770ca000      C:\WINDOWS\system32\COMRes.dll
    0x77b60000 - 0x77b68000      C:\WINDOWS\system32\VERSION.dll
    0x74520000 - 0x747e6000      C:\WINDOWS\system32\msi.dll
    0x0e320000 - 0x0e869000      C:\WINDOWS\system32\xpsp2res.dll
    0x07ad0000 - 0x07ada000      C:\WINDOWS\system32\gdca_jni.dll
    0x0ec40000 - 0x0ecda000      C:\WINDOWS\system32\GDCA_API.dll
    0x0ed40000 - 0x0ee2d000      C:\WINDOWS\system32\easysoap.dll
    0x07ae0000 - 0x07b05000      C:\WINDOWS\system32\LIBEXPAT.dll
    0x71b10000 - 0x71b1b000      C:\WINDOWS\system32\WSOCK32.dll
    0x779e0000 - 0x77a84000      C:\WINDOWS\system32\WININET.dll
    0x760a0000 - 0x76131000      C:\WINDOWS\system32\CRYPT32.dll
    0x76080000 - 0x76092000      C:\WINDOWS\system32\MSASN1.dll
    0x0ee30000 - 0x0ee90000      C:\WINDOWS\system32\MSVCRTD.dll
    0x0f190000 - 0x0f1b9000      C:\WINDOWS\system32\gdca_dal_szd20.dll
    0x0f1c0000 - 0x0f1e8000      C:\WINDOWS\system32\WDCRWV.dll
    0x0f540000 - 0x0f653000      C:\j2sdk1.4.2\jre\bin\awt.dll
    0x72f40000 - 0x72f67000      C:\WINDOWS\system32\WINSPOOL.DRV
    VM Arguments:
    jvm_args: -Xms1024m -Xmx1024m -XX:MaxPermSize=128M -Xloggc:gc_2007-06-07.log
    Launcher Type: SUN_STANDARD
    Environment Variables:
    JAVA_HOME=C:\j2sdk1.4.2
    USERNAME=Administrator
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 5, GenuineIntel
    --------------- S Y S T E M ---------------
    OS: Windows Server 2003 family Build 3790 Service Pack 1
    CPU:total 4 family 15, cmov, cx8, fxsr, mmx, sse, sse2
    Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(3877052k free)
    vm_info: Java HotSpot(TM) Server VM (1.4.2_10-b03) for windows-x86, built on Oct 10 2005 14:35:06 by "java_re" with MS VC++ 6.0
    ==================================
    GC log as following:
    329536.817: [GC 894240K->801472K(1036928K), 0.0825468 secs]
    329559.843: [GC 894656K->801311K(1036928K), 0.0741285 secs]
    329578.676: [GC 894495K->801812K(1036928K), 0.0571409 secs]
    329588.626: [GC 894996K->801595K(1036928K), 0.0731206 secs]
    329597.617: [Full GC
    ==================================
    I had checked the release notes of 1.4.2. According to the bug(id=6268279), it should be resolved at the version we used!
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6268279
    So what's the trouble?
    Thanks a lot.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    JVM log as following:
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x081b4609, pid=2812, tid=10276
    # Java VM: Java HotSpot(TM) Server VM (1.4.2_10-b03 mixed mode)
    # Problematic frame:
    # V [jvm.dll+0x1b4609]
    --------------- T H R E A D ---------------
    Current thread (0x0003e5b8): VMThread [id=10276]
    siginfo: ExceptionCode=0xc0000005, reading address 0x0fe16e7c
    Registers:
    EAX=0x47b68b38, EBX=0x00a1b968, ECX=0x00000001, EDX=0x0fe16e4c
    ESP=0x02f0fc28, EBP=0x02f0fc70, ESI=0x1f5f4de8, EDI=0x1fc4c208
    EIP=0x081b4609, EFLAGS=0x00010202
    Top of Stack: (sp=0x02f0fc28)
    0x02f0fc28: 00a1b968 02f0fc70 00000000 00000001
    0x02f0fc38: 1f224870 1f5f4de8 00000000 00a1b968
    0x02f0fc48: 1f224870 47b68b38 080b89d9 1f224890
    0x02f0fc58: 0003ae80 00a1b840 080b0695 02f0fc70
    0x02f0fc68: 0003ae80 00036430 00a1b840 00a1b968
    0x02f0fc78: 1f224a00 080b1128 00a1b890 0003ae80
    0x02f0fc88: 0e390000 00000000 00000001 00000001
    0x02f0fc98: 00000000 00000001 00000001 0000a218
    Instructions: (pc=0x081b4609)
    0x081b45f9: 74 24 14 e9 cb 00 00 00 8b fe 8b 57 04 83 c2 08
    0x081b4609: 8b 42 30 85 c0 7f 28 7d 1e 83 c9 ff 2b c8 8b 47
    Stack: [0x02ed0000,0x02f10000), sp=0x02f0fc28, free space=255k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    V [jvm.dll+0x1b4609]
    VM_Operation (0x05b3f46c): full generation collection, mode: safepoint, requested by thread 0x035bd340
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x035bd340 JavaThread "ConnectionHandler-35" [_thread_blocked, id=13304]
    Other Threads:
    =>0x0003e5b8 VMThread [id=10276]
    0x00a6b568 WatcherThread [id=20724]
    VM state:at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
    [0x00036dd0/0x0000071c] Threads_lock - owner thread: 0x0003e5b8
    [0x00036f50/0x000006e0] Heap_lock - owner thread: 0x035bd340
    Heap
    def new generation total 104832K, used 82219K [0x10010000, 0x171d0000, 0x171d0000)
    eden space 93184K, 82% used [0x10010000, 0x14b24d20, 0x15b10000)
    from space 11648K, 45% used [0x16670000, 0x16ba62b0, 0x171d0000)
    to space 11648K, 0% used [0x15b10000, 0x15b10000, 0x16670000)
    tenured generation total 932096K, used 796258K [0x171d0000, 0x50010000, 0x50010000)
    the space 932096K, 85% used [0x171d0000, 0x47b68b38, 0x1f224a00, 0x50010000)
    compacting perm gen total 80896K, used 80769K [0x50010000, 0x54f10000, 0x58010000)
    the space 80896K, 99% used [0x50010000, 0x54ef0558, 0x54ef0600, 0x54f10000)
    Dynamic libraries:
    0x00400000 - 0x0040b000      C:\j2sdk1.4.2\bin\java.exe
    0x7c930000 - 0x7ca00000      C:\WINDOWS\system32\ntdll.dll
    0x7c800000 - 0x7c92b000      C:\WINDOWS\system32\kernel32.dll
    0x77f30000 - 0x77fdc000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77c20000 - 0x77cbf000      C:\WINDOWS\system32\RPCRT4.dll
    0x77b70000 - 0x77bca000      C:\WINDOWS\system32\MSVCRT.dll
    0x08000000 - 0x082b7000      C:\j2sdk1.4.2\jre\bin\server\jvm.dll
    0x77e10000 - 0x77ea1000      C:\WINDOWS\system32\USER32.dll
    0x77bd0000 - 0x77c18000      C:\WINDOWS\system32\GDI32.dll
    0x769e0000 - 0x76a0a000      C:\WINDOWS\system32\WINMM.dll
    0x76180000 - 0x7619d000      C:\WINDOWS\system32\IMM32.DLL
    0x63090000 - 0x63099000      C:\WINDOWS\system32\LPK.DLL
    0x74ae0000 - 0x74b41000      C:\WINDOWS\system32\USP10.dll
    0x71b20000 - 0x71b28000      C:\WINDOWS\system32\rdpsnd.dll
    0x77f10000 - 0x77f21000      C:\WINDOWS\system32\WINSTA.dll
    0x71ba0000 - 0x71bf8000      C:\WINDOWS\system32\NETAPI32.dll
    0x76ab0000 - 0x76abb000      C:\WINDOWS\system32\PSAPI.DLL
    0x10000000 - 0x10007000      C:\j2sdk1.4.2\jre\bin\hpi.dll
    0x003e0000 - 0x003ee000      C:\j2sdk1.4.2\jre\bin\verify.dll
    0x008b0000 - 0x008c9000      C:\j2sdk1.4.2\jre\bin\java.dll
    0x003f0000 - 0x003fe000      C:\j2sdk1.4.2\jre\bin\zip.dll
    0x03310000 - 0x0331f000      C:\j2sdk1.4.2\jre\bin\net.dll
    0x71b60000 - 0x71b77000      C:\WINDOWS\system32\WS2_32.dll
    0x71b50000 - 0x71b58000      C:\WINDOWS\system32\WS2HELP.dll
    0x71a80000 - 0x71ac0000      C:\WINDOWS\System32\mswsock.dll
    0x76e30000 - 0x76e5a000      C:\WINDOWS\system32\DNSAPI.dll
    0x76ed0000 - 0x76ed7000      C:\WINDOWS\System32\winrnr.dll
    0x76e70000 - 0x76e9e000      C:\WINDOWS\system32\WLDAP32.dll
    0x76ee0000 - 0x76ee5000      C:\WINDOWS\system32\rasadhlp.dll
    0x037e0000 - 0x037e8000      C:\j2sdk1.4.2\jre\bin\nio.dll
    0x69660000 - 0x696b6000      C:\WINDOWS\system32\hnetcfg.dll
    0x71a40000 - 0x71a48000      C:\WINDOWS\System32\wshtcpip.dll
    0x05170000 - 0x05176000      C:\j2sdk1.4.2\jre\bin\ioser12.dll
    0x76c50000 - 0x76c69000      C:\WINDOWS\system32\iphlpapi.dll
    0x76c30000 - 0x76c49000      C:\WINDOWS\system32\MPRAPI.dll
    0x76d50000 - 0x76d83000      C:\WINDOWS\system32\ACTIVEDS.dll
    0x76d20000 - 0x76d47000      C:\WINDOWS\system32\adsldpc.dll
    0x76ac0000 - 0x76b05000      C:\WINDOWS\system32\credui.dll
    0x7ca10000 - 0x7d1f0000      C:\WINDOWS\system32\SHELL32.dll
    0x77eb0000 - 0x77f02000      C:\WINDOWS\system32\SHLWAPI.dll
    0x769c0000 - 0x769d8000      C:\WINDOWS\system32\ATL.DLL
    0x774b0000 - 0x775e4000      C:\WINDOWS\system32\ole32.dll
    0x775f0000 - 0x7767c000      C:\WINDOWS\system32\OLEAUT32.dll
    0x76d90000 - 0x76d9c000      C:\WINDOWS\system32\rtutils.dll
    0x5d000000 - 0x5d00f000      C:\WINDOWS\system32\SAMLIB.dll
    0x770d0000 - 0x77246000      C:\WINDOWS\system32\SETUPAPI.dll
    0x77cd0000 - 0x77dd3000      C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.3790.1830_x-ww_7AE38CCF\comctl32.dll
    0x078a0000 - 0x078a5000      C:\j2sdk1.4.2\jre\bin\rmi.dll
    0x68000000 - 0x6802f000      C:\WINDOWS\system32\rsaenh.dll
    0x75870000 - 0x7592f000      C:\WINDOWS\system32\USERENV.dll
    0x07b10000 - 0x07b28000      C:\WINDOWS\system32\jacob.dll
    0x0e2c0000 - 0x0e311000      C:\WINDOWS\system32\MSCTF.dll
    0x77680000 - 0x77703000      C:\WINDOWS\system32\CLBCatQ.DLL
    0x76f70000 - 0x770ca000      C:\WINDOWS\system32\COMRes.dll
    0x77b60000 - 0x77b68000      C:\WINDOWS\system32\VERSION.dll
    0x74520000 - 0x747e6000      C:\WINDOWS\system32\msi.dll
    0x0e320000 - 0x0e869000      C:\WINDOWS\system32\xpsp2res.dll
    0x07ad0000 - 0x07ada000      C:\WINDOWS\system32\gdca_jni.dll
    0x0ec40000 - 0x0ecda000      C:\WINDOWS\system32\GDCA_API.dll
    0x0ed40000 - 0x0ee2d000      C:\WINDOWS\system32\easysoap.dll
    0x07ae0000 - 0x07b05000      C:\WINDOWS\system32\LIBEXPAT.dll
    0x71b10000 - 0x71b1b000      C:\WINDOWS\system32\WSOCK32.dll
    0x779e0000 - 0x77a84000      C:\WINDOWS\system32\WININET.dll
    0x760a0000 - 0x76131000      C:\WINDOWS\system32\CRYPT32.dll
    0x76080000 - 0x76092000      C:\WINDOWS\system32\MSASN1.dll
    0x0ee30000 - 0x0ee90000      C:\WINDOWS\system32\MSVCRTD.dll
    0x0f190000 - 0x0f1b9000      C:\WINDOWS\system32\gdca_dal_szd20.dll
    0x0f1c0000 - 0x0f1e8000      C:\WINDOWS\system32\WDCRWV.dll
    0x0f540000 - 0x0f653000      C:\j2sdk1.4.2\jre\bin\awt.dll
    0x72f40000 - 0x72f67000      C:\WINDOWS\system32\WINSPOOL.DRV
    VM Arguments:
    jvm_args: -Xms1024m -Xmx1024m -XX:MaxPermSize=128M -Xloggc:gc_2007-06-07.log
    Launcher Type: SUN_STANDARD
    Environment Variables:
    JAVA_HOME=C:\j2sdk1.4.2
    USERNAME=Administrator
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 5, GenuineIntel
    --------------- S Y S T E M ---------------
    OS: Windows Server 2003 family Build 3790 Service Pack 1
    CPU:total 4 family 15, cmov, cx8, fxsr, mmx, sse, sse2
    Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(3877052k free)
    vm_info: Java HotSpot(TM) Server VM (1.4.2_10-b03) for windows-x86, built on Oct 10 2005 14:35:06 by "java_re" with MS VC++ 6.0
    ==================================
    GC log as following:
    329536.817: [GC 894240K->801472K(1036928K), 0.0825468 secs]
    329559.843: [GC 894656K->801311K(1036928K), 0.0741285 secs]
    329578.676: [GC 894495K->801812K(1036928K), 0.0571409 secs]
    329588.626: [GC 894996K->801595K(1036928K), 0.0731206 secs]
    329597.617: [Full GC
    ==================================
    I had checked the release notes of 1.4.2. According to the bug(id=6268279), it should be resolved at the version we used!
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6268279
    So what's the trouble?
    Thanks a lot.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • IE crashing jvm.dll - hyperthreading

    I have a web application that is loading an appletto create a sub menu. The applet refreshes and sporadically crashes internet explorer. I cannot determine the crash because it is on some machines. I got a process dump of IE from Windows debuging and MS support told me that the jpiexp32.dll was crashing the JVM. The errors are always sharing violations, 0xc0000005.
    Are there any issues with JVM and hyperthreading CPU's
    What logging or debugging can I enable on the jvm to get more info to post to support.

    This trouble-shooting and diagnostic document has information:
    http://java.sun.com/j2se/1.5/pdf/jdk50_ts_guide.pdf

  • Collect with 32bit JVM failed

    Hi,
    I am using collect tool from Sun Studio 12, i used it succeccfully on my system using 64-bit Sun JDK 1.6
    but when i try to use it to collect Hardware counter data using 32-bit jvm it failes and shows error while i trying to analyze collect data using "Analyzer" tool
    The error message it shows is *"test.1.er***Collector Error: Initializing Hardware counter profiling failed"*
    OS version
    $ uname -a
    Linux m02 2.6.18-92.el5.src-PAPI #1 SMP Tue Jan 27 10:57:40 CET 2009 x86_64 x86_64 x86_64 GNU/Linux
    Java version (32-bit version that is not working)
    ]$ java -version
    java version "1.6.0_10"
    Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
    Java HotSpot(TM) Server VM (build 11.0-b15, mixed mode)
    the other Java version that is working fine (64-bit version)
    ]$ java -version
    java version "1.6.0_13"
    Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
    Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02, mixed mode)
    collect command output
    ]$ collect
    NOTE: Linux-64-bit, 32 CPUs, CentOS_5.2 system "mi02" is supported by the Performance tools.
    NOTE: The J2SE[tm] version 1.6.0_10 found at java (picked by PATH) is supported by the Performance tools.
    usage:  collect <args> target <target-args>
            Sun Analyzer 7.7 Linux_i386 2009/06/03 [64-bit]
      -p <interval> specify clock-profiling
            clock profiling interval range on this system is from
            10.000 to 1000.000 millisec.; resolution is 10.000 millisec.
      -h <ctr_def>...[,<ctr_n_def>]
            specify HW counter profiling for up to 4 HW counters
            see below for more details
      -s <threshold>        specify synchronization wait tracing
      -r <option>   specify thread analyzer experiment; see man page
      -H {on|off}   specify heap tracing
      -M {version|off}      specify an MPI experiment
            Supported MPI versions: CT8.2, CT8.1, CT8, CT7, CT7.1, OPENMPI, MPICH2, MVAPICH2
      -m {on|off}   specify MPI tracing
      -j {on|off|path}      specify Java profiling
      -J <java-args>        specify arguments to Java for Java profiling
      -t <duration> specify time over which to record data
      -x    specify leaving the target waiting for a debugger attach
      -n    dry run -- don't run target or collect performance data
      -y <signal>[,r]       specify delayed initialization and pause/resume signal
            When set, the target starts in paused mode;
              if the optional r is provided, it starts in resumed mode
      -F {on|off|all|=<regex>}      specify following descendant processes
      -A {on|off|copy}      specify archiving of load-objects; default is on
      -S <interval> specify periodic sampling interval (secs.)
      -L <size>     specify experiment size limit (MB.)
      -l <signal>   specify signal for samples
      -o <expt>     specify experiment name
      -d <directory>        specify experiment directory
      -g <groupname>        specify experiment group
      -O <file>     redirect all of collect's output to file
      -v    print expanded log of processing
      -C <label>    specify comment label (up to 10 may appear)
      -R    show the README file and exit
      -V    print version number and exit
    Default experiment:
            expt_name = test.3.er
            clock profiling enabled, 10.000 millisec.
            descendant processes will not be followed
            periodic sampling, 1 secs.
            experiment size limit 2000 MB.
            experiment archiving: on
            data descriptor: "p:10000;S:1;L:2000;A:1;"
                    host: `m02', cpuver = 2501, ncpus = 32, clock frequency 1200 MHz.
                    memory:  16518000 pages @ 4096 bytes = 64523 MB.
    Specifying HW counters on `AMD Family 10h':
        <ctr_def> == [+]<ctr>[~<attr>=<val>]...[~<attrN>=<valN>][/<reg#>][,<interval>]
           <+>
              for memory-related counters, attempt to backtrack to find
              the triggering instruction and the virtual and physical
              addresses of the memory reference
           <ctr>
              counter name, must be selected from the available counters
              listed below.  On most systems, if a counter is not listed
              below, it may still be specified by its numeric value
           <attr>=<val>
              optional attribute where <val> can be in decimal or hex
              format, and <attr> can be one of:
                 'umask'
                 'os'
                 'edge'
                 'pc'
                 'inv'
                 'cmask'
           <reg#>
              forces use of a specific hardware register.  If not specified,
              collect will attempt to place the counter into the first
              available register and as a result, may be unable to place
              subsequent counters due to register conflicts.
           <interval> == {on|hi|lo|<value>}
              `on' selects the default rate, listed below
              `hi' specifies an interval ~10 times shorter than `on'
              `lo' specifies an interval ~10 times longer than `on'
    Aliased HW counters available for profiling:
        cycles[/{0|1|2|3}],99999989 (`CPU Cycles', alias for BU_cpu_clk_unhalted; CPU-cycles)
        insts[/{0|1|2|3}],9999991 (`Instructions Executed', alias for FR_retired_x86_instr_w_excp_intr; events)
        ic[/{0|1|2|3}],100003 (`I$ Refs', alias for IC_fetch; events)
        icm[/{0|1|2|3}],100003 (`I$ Misses', alias for IC_miss; events)
        itlbh[/{0|1|2|3}],100003 (`ITLB Hits', alias for IC_itlb_L1_miss_L2_hit; events)
        itlbm[/{0|1|2|3}],100003 (`ITLB Misses', alias for IC_itlb_L1_miss_L2_miss; events)
        eci[/{0|1|2|3}],1000003 (`E$ Instr. Refs', alias for BU_internal_L2_req~umask=0x1; events)
        ecim[/{0|1|2|3}],10007 (`E$ Instr. Misses', alias for BU_fill_req_missed_L2~umask=0x1; events)
        dc[/{0|1|2|3}],1000003 (`D$ Refs', alias for DC_access; load events)
        dcm[/{0|1|2|3}],100003 (`D$ Misses', alias for DC_miss; load events)
        dtlbh[/{0|1|2|3}],100003 (`DTLB Hits', alias for DC_dtlb_L1_miss_L2_hit; load-store events)
        dtlbm[/{0|1|2|3}],100003 (`DTLB Misses', alias for DC_dtlb_L1_miss_L2_miss; load-store events)
        ecd[/{0|1|2|3}],1000003 (`E$ Data Refs', alias for BU_internal_L2_req~umask=0x2; load-store events)
        ecdm[/{0|1|2|3}],10007 (`E$ Data Misses', alias for BU_fill_req_missed_L2~umask=0x2; load-store events)
        fpadd[/{0|1|2|3}],1000003 (`FP Adds', alias for FP_dispatched_fpu_ops~umask=0x1; events)
        fpmul[/{0|1|2|3}],1000003 (`FP Muls', alias for FP_dispatched_fpu_ops~umask=0x2; events)
        fpustall[/{0|1|2|3}],1000003 (`FPU Stall Cycles', alias for FR_dispatch_stall_fpu_full; CPU-cycles)
        memstall[/{0|1|2|3}],1000003 (`Memory Unit Stall Cycles', alias for FR_dispatch_stall_ls_full; CPU-cycles)
        PAPI_l1_dcm[/{0|1|2|3}],100003 (`Level 1 data cache misses'; load-store events)
        PAPI_l1_icm[/{0|1|2|3}],100003 (`Level 1 instruction cache misses'; events)
        PAPI_l2_dcm[/{0|1|2|3}],100003 (`Level 2 data cache misses'; load-store events)
    Raw HW counters available for profiling:
      *......  { I removed raw counter list to shorten this post}*
    See section 3.15 of the "BIOS and Kernel Developer's Guide (BKDG) For AMD Family 10h Processors,"
    AMD publication #31116
    See the collect.1 man page for more information
    analyzer tool version
    $ analyzer -v
    analyzer: Sun Analyzer 7.7 Linux_i386 2009/06/03
    Any idea what is wrong with my configuration? Can we use collect for 32-bit and java apps?
    Thanks a lot
    Edited by: allo6 on Aug 20, 2009 3:25 AM

    hi,
    how to compile 32 bits libraries on a Centos5 64 bits running on AMD 64 bits (Family 10h)
    running
    make CC="gcc -m32" CFLAGS="-m32" LDFLAGS="-m32" ARCH=i386
    or just
    make CC="gcc -m32" CFLAGS="-m32" LDFLAGS="-m32" generate a 32 bit version
    /usr/local/perfctr32/lib/libperfctr.so.5.2.6.35: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped
    but the "collect"command (from sun studio for collecting HW values) returns HW counter not suported.
    the above generated library is 32 bit but it is intel architecture, The architecture i have is AMD, what "ARCH" flag to spefify for this
    if i do not specify any ARCH value there there is this error in the make command
    ake[4]: Entering directory `perfctr-2.6.x/examples/perfex'
    gcc -m32 -m32 perfex.o x86.o ../../usr.lib/libperfctr.a -o perfex
    ../../usr.lib/libperfctr.a(event_set_x86.o):(.rodata+0x24): undefined reference to `perfctr_p5_event_set'
    ../../usr.lib/libperfctr.a(event_set_x86.o):(.rodata+0x28): undefined reference to `perfctr_p5mmx_event_set'
    ../../usr.lib/libperfctr.a(event_set_x86.o):(.rodata+0x2c): undefined reference to `perfctr_ppro_event_set'
    ../../usr.lib/libperfctr.a(event_set_x86.o):(.rodata+0x30): undefined reference to `perfctr_p2_event_set'
    ../../usr.lib/libperfctr.a(event_set_x86.o):(.rodata+0x34): undefined reference to `perfctr_p3_event_set'
    ../../usr.lib/libperfctr.a(event_set_x86.o):(.rodata+0x38): undefined reference to `perfctr_mii_event_set'

Maybe you are looking for

  • Keyfigure values are incorrect in BEx Query based on infoset

    Hi Experts, I have created a infoset using 3 DSO's . 1 main DSO( from which i rquire all the data) is linked with other 2 DSO's using left outer join. DSO is linked with other 2 DSO's with a field return GUID . Now when i am executing a query , key f

  • Dynamic columns in report... NON ALV REPORT

    Hey Guys, I have a internal table which has abt 50 columns now i wanna show only the columns that have any value in it... Now this is not an ALV report... this is a basic report.... So anyideas as to where i can start  on this.... i dont want to writ

  • One key recovery is not working in g560

    i had deleted the partition D... now i m having two os linux and windows 7.. when i m pressing the one key recovery button it willl display the msg like x:/windows/system32> how can i clear this problem..

  • Loading an extranel SWF into movie

    Hi I'm trying to load an external SFW into my empty placeholder moveiclip. I can achive this fine using buttons and an onClick event, but how can I have this happen at the start of a movie clip with no human interaction. The code I am trying is below

  • How to handle SYS_REFCURSOR?

    I created table in oracle 11g like below, CREATE TABEL family( EMP_ID VARCHAR(255), EMP_PASSWD VARCHAR(255), EMP_NAME VARCHAR(255), PRIMARY KEY(EMP_ID) ) And I inserted a few data. commit command was successful. I made a stored procedure to call data