RJava/JRI crashes jvm

when I am running JRI examples JRE breaks down
Creating Rengine (with arguments)
# An unexpected error has been detected by Java Runtime Environment:
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6c733b9d, pid=5224, tid=5496
# Java VM: Java HotSpot(TM) Client VM (10.0-b19 mixed mode windows-x86)
# Problematic frame:
# C  [R.dll+0x33b9d]
# An error report file with more information is saved as:
# C:\workspaceVE\XTest\hs_err_pid5224.log
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
import org.rosuda.JRI.Rengine;
public class RTest3 {
     public static void main(String[] args) {
          // just making sure we have the right version of everything
          if (!Rengine.versionCheck()) {
              System.err.println("** Version mismatch - Java files don't match library version.");
              System.exit(1);
          args = new String[1];
          args[0]="--save";// also tried --zero-init
             System.out.println("Creating Rengine (with arguments)");
               // 1) we pass the arguments from the command line
               // 2) we won't use the main loop at first, we'll start it later
               //    (that's the "false" as second argument)
               // 3) the callbacks are implemented by the TextConsole class above
               Rengine re=new Rengine(args, false, null);
//            also tried Rengine re = new Rengine();
//              System.out.println("Rengine created, waiting for R");
               // the engine creates R is a new thread, so we should wait until it's ready
//             if (!re.waitForR()) {
//                 System.out.println("Cannot load R");
//                 return;
             re.assign("x", "shubha");
}

From looking that the web site (found with google) it looks like it has been replaced with rJava (http://www.rforge.net/rJava/)

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

  • 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

  • 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.

  • 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

  • Servlet Crashing JVM!!

    We have been having a problem lately with Java crashing on our production machines. All of the java we use is wrapped around servlet applications, and I am getting the following error in the Tomcat log... any ideas on what can cause this?
    SIGSEGV 11 segmentation violation
    si_signo [11]: SEGV
    si_errno [0]:
    si_code [1]: SEGV_MAPERR [addr: 0xff00]
    stackpointer=D999FF18
    Inconsistent thread : best efforts attempt (may fail)
    "Thread-8 Labels" (TID:0x27858f8, sys_thread_t:0x2785830, state:CW, thread_t: t@2324, threadID:0xd90f1d70, stack_bottom:0xd90f1d70,
    stack_size:0x1fd70) prio=5
    [1] java.lang.Object.wait(Object.java:424)
    [2] com.mapinfo.graphics.text.ba.run(Unknown Source)
    [3] java.lang.Thread.run(Thread.java:478)
    -------------------

    Sounds like you've got a problem with your native thread libraries, or something native (and nasty) is happening in that 'com.mapinfo.graphics.text.ba.run' package.
    You didn't say which OS, etc... you are running, but make sure you have the latest stable kernels and thread libraries installed.
    What you are showing is most likely not a JVM issue.
    - K

  • Browser crashing, jvm.dll = error

    hi, im not sure on the details and all that, all i know is that over the last year i have been playing runescape on my pc fine. recently i had to reboot my pc to clear alot of the junk off it, upon reinstalling java for runescape i have started getting error messages. I use bt yahoo browser and it says, "browser has encounterd a problem and needs to close" then i click more detail and it says . mod name:jvm.dll
    im not sure if my java is to blame or what is. I have the latest java from the home page and the latest bt yahoo browser. I am running windows xp.
    If anyone has any help to try to fix this error i would be very grateful.

    Hi Mark,
    I was browsing the Internet for a solution to a Java problem which is the same as you're question posted on the 9th September 2005.
    I was wondering if you have a solution to the problem.
    Many thanks,
    Tom
    hi, im not sure on the details and all that, all i
    know is that over the last year i have been playing
    runescape on my pc fine. recently i had to reboot my
    pc to clear alot of the junk off it, upon
    reinstalling java for runescape i have started
    getting error messages. I use bt yahoo browser and
    it says, "browser has encounterd a problem and needs
    to close" then i click more detail and it says . mod
    name:jvm.dll
    im not sure if my java is to blame or what is. I have
    the latest java from the home page and the latest bt
    yahoo browser. I am running windows xp.
    If anyone has any help to try to fix this error i
    would be very grateful.
    hi, im not sure on the details and all that, all i
    know is that over the last year i have been playing
    runescape on my pc fine. recently i had to reboot my
    pc to clear alot of the junk off it, upon
    reinstalling java for runescape i have started
    getting error messages. I use bt yahoo browser and
    it says, "browser has encounterd a problem and needs
    to close" then i click more detail and it says . mod
    name:jvm.dll
    im not sure if my java is to blame or what is. I have
    the latest java from the home page and the latest bt
    yahoo browser. I am running windows xp.
    If anyone has any help to try to fix this error i
    would be very grateful.

Maybe you are looking for

  • Since about two weeks the right click doesn't work in firefox, how do i resolve this?

    I always used the Nightly version of Firefox, so I figured it was a bug in the new update. But by now I completely removed Nightly, and installed the normal Firefox, but still nothing happens after rightclicking in the screen > in, e.g. the bookmark

  • Switch over from active to passive in the cluster

    If online EMS Sun Server goes off line , the client looses the connectivity with EMS till the IP address of the other online server is updated in client PC. When the servers switch over from active to passive in the cluster, we have to change the ser

  • Lightroom - Printing 13x19

    I have a problem getting Lightroom to accept the 13x19 sheet size -- don't have this problem with smaller size sheets.  When I hit ok the right margin resets to 4.57".  Am I missing something or is this a bug?  Here's the steps I take (in order): Set

  • No static ip option.WRT54G

    Note :- I had only router connected to my PC when I was configuring it  & not de modem. I wanna configure mah WRT54G with the static IP provided by my ISP. but when log on to web browser GUI (192.168.1.1) it has only DHCP option under Internet settin

  • ESS - Change Communication Data Error

    Hello, I'm running EP 7.0 with BP ESS 60.2 and when I run "Change Communication Data Error" in ESS » Employee Search, I get the following error, but ONLY when someone types values in the "Extension" or "E-mail" fields: com.sap.pcuigp.xssfpm.java.FPMR