Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4413262

JToolBar application wont start under Win98H and JVM produces error file

XMLWordPrintable

    • x86
    • generic



      Name: jbT81659 Date: 02/08/2001

      OS: Windows98 Hebrew enabled, 2nd Edition
      JDK: jdk1.4.0-B50

      Java fails to start the application jToolBar and JVM produces an eror log file.
      This bug is reproducable under Win98 Hebrew, 2nd Edition.
      Here is the contents of log file
      -----
      n unexpected exception has been detected in native code outside the VM.
      Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x504178b7
      Function name=(N/A)
      Library=(N/A)

      NOTE: We are unable to locate the function name symbol for the error
            just occurred. Please refer to release documentation for possible
            reason and solutions.



      Current Java thread:
              at java.awt.Toolkit.getDesktopProperty(Toolkit.java:1486)
              at
      javax.swing.LookAndFeel.getDesktopPropertyValue(LookAndFeel.java:316)
              at
      javax.swing.plaf.basic.BasicLookAndFeel.initComponentDefaults(BasicLookAndFeel.java:485)
              at
      javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults(MetalLookAndFeel.java:196)
              at
      javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.java:77)
              at
      javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.java:1188)
              at javax.swing.UIManager.setLookAndFeel(UIManager.java:374)
              at javax.swing.UIManager.setLookAndFeel(UIManager.java:404)
              at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1026)
              at javax.swing.UIManager.initialize(UIManager.java:1122)
              at javax.swing.UIManager.maybeInitialize(UIManager.java:1105)
              at javax.swing.UIManager.getUI(UIManager.java:720)
              at javax.swing.JPanel.updateUI(JPanel.java:106)
              at javax.swing.JPanel.<init>(JPanel.java:65)
              at javax.swing.JPanel.<init>(JPanel.java:89)
              at javax.swing.JPanel.<init>(JPanel.java:97)
              at javax.swing.JRootPane.createGlassPane(JRootPane.java:467)
              at javax.swing.JRootPane.<init>(JRootPane.java:299)
              at javax.swing.JFrame.createRootPane(JFrame.java:227)
              at javax.swing.JFrame.frameInit(JFrame.java:209)
              at javax.swing.JFrame.<init>(JFrame.java:181)
              at jToolBar.main(jToolBar.java:27)

      Dynamic libraries:
      0x7CB20000 - 0x7CB3D000 C:\WINDOWS\SYSTEM\IMAGEHLP.DLL

      Local Time = Thu Feb 08 02:48:17 2001
      Elapsed Time = 18
      #
      # The exception above was detected in native code outside the VM
      #
      # Java VM: Java HotSpot(TM) Client VM (B50 mixed mode)
      #

      -----
      To reproduce bug, do the following:
      1- Compile the following code under Win98H(2nd Ed)
      2- Note that compilation does not generate any errors.
      3- Type java jToolBar on the prompt.
      4- Verify that application is displayed
      5- Close application and restart it again.
      6- Repeat steps 3-5 untill application fails.

      ------------Code-----------------------------
      /* Copyright (c) Sun Microsystems 1998

      $Header: /home/sun/src/JDK1.2/jToolBar.java,v 1.12 2000/03/30 08:13:08 isam Exp $

      */

      import javax.swing.*;
      import javax.swing.JToolBar;
      import javax.swing.JButton;
      import javax.swing.JFrame;
      import javax.swing.JTextArea;
      import javax.swing.JScrollPane;
      import javax.swing.JPanel;
      import java.awt.*;
      import java.awt.event.*;

      public class jToolBar extends JApplet
      {
              public void init()
              {
                      ToolBarDemo toolbar = new ToolBarDemo();
                      getContentPane().add(toolbar);
              }
              
              public static void main(String[] argv)
              {
                      JFrame frame = new JFrame("\u0645\u062b\u0627\u0644");
                      frame.setContentPane(new ToolBarDemo());
                      frame.pack();
                      frame.setVisible(true);
              frame.addWindowListener( new WindowAdapter()
              {
                   public void windowClosing( WindowEvent e)
                   {
                       System.exit(0);
                   }
              });

              }
      }
      class ToolBarDemo extends JPanel
      {
              protected JTextArea textArea;
              protected String newline = "\n";

              public ToolBarDemo()
              {

                      JToolBar toolBar = new JToolBar();
                      addButtons(toolBar);

                      textArea = new JTextArea(10, 30);
                      textArea.setFont(new Font("Lucida Sans Regular",Font.PLAIN,8));
                      JScrollPane scrollPane = new JScrollPane(textArea);

                      JPanel contentPane = new JPanel();
                      contentPane.setLayout(new BorderLayout());
                      contentPane.setPreferredSize(new Dimension(400, 450));
                      contentPane.add(toolBar, BorderLayout.NORTH);
                      contentPane.add(scrollPane, BorderLayout.CENTER);
                      add(contentPane);
              }

              protected void addButtons(JToolBar toolBar)
              {
                      JButton button=null ;
                      button = new JButton();
                      button.setFont(new Font("Lucida Sans Regular",Font.PLAIN,8));
      button.setText("\u062a\u0641\u0627\u062d\u0020\u0623\u062d\u0645\u0631\u0020\u0643\u0628\u064a\u0631");
                      button.addActionListener(new ActionListener()
                      {

                      public void actionPerformed(ActionEvent e)
                      {
                              displayResult("Action for first button");
                      }
                      });


                      toolBar.add(button);
                      button = new JButton();
                      button.setFont(new Font("Lucida Sans Regular",Font.PLAIN,8));
      button.setText("\u05d6\u05d5\u0020\u05e9\u05e0\u05d4\u0020\u05d9\u05e4\u05d4\u0020\u0054\u0048\u0045\u0020\u0059\u0045\u0041\u0052\u0020\u0031\u0039\u0035\u0038");
                      button.addActionListener(new ActionListener()
                      {
                      public void actionPerformed(ActionEvent e)
                      {
                              displayResult("Action for second button");
                      }
                      });
                      toolBar.add(button);
                      button = new JButton();
                      button.setFont(new Font("Lucida Sans Regular",Font.PLAIN,8));
      button.setText("\u006c\u0069\u006d\u0065\u0020\u0069\u0073\u0020\u0067\u0072\u0065\u0065\u006e\u05d7\u05d5\u05de\u05d5\u05e1\u0020\u05d9\u05e7\u05e8");
                      button.setToolTipText("\u006c\u0069\u006d\u0065\u0020\u05d7\u05d5\u05de\u05d5\u05e1\u0020\u05d9\u05e7\u05e8\u0069\u0073\u0020\u0067\u0072\u0065\u0065\u006e");
                      button.addActionListener(new ActionListener()
                      {
                      public void actionPerformed(ActionEvent e)
                      {
                              displayResult("Action for third button");
                      }
                      });

                      toolBar.add(button);
                      button = new JButton();
      button.setText("\u062a\u0641\u0627\u062d\u0020\u0623\u062d\u0645\u0631\u0020\u0643\u0628\u064a\u0631");
                      button.setFont(new Font("Lucida Sans Regular",Font.PLAIN,8));
                      button.addActionListener(new ActionListener()
                      {
                      public void actionPerformed(ActionEvent e)
                      {
                              displayResult("Action for third button");
                      }
                      });


              }

              protected void displayResult(String actionDescription)
              {
                      textArea.append(actionDescription + newline);
              }
      }
      ----------------

      WorkAround:
      ======================================================================

            rraysunw Richard Ray (Inactive)
            jbenavrasunw Jonathan Benavraham (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: