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

Multiple calls to Choice.insert cause core dump

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.1.5
    • 1.1.3
    • client-libs
    • None
    • 1.1.5
    • sparc
    • solaris_2.5.1
    • Not verified



      Name: diC59631 Date: 09/26/97


      Calling java.awt.Choice.insert() 20 times causes
      a core dump on Solaris (but not windows).
      Sample program: (hit the "ADD" button 20 times)



      import java.awt.*;
      import java.awt.event.*;

      class ChoiceTest extends Frame implements ActionListener {

        Choice c;

        ChoiceTest() {
          setLayout(new FlowLayout());
          Button b = new Button("ADD");
          b.addActionListener(this);
          add(b);
          c = new Choice();
          c.add("Initial choice");
          add(c);
        }

        public static void main(String args[]) {
          ChoiceTest f = new ChoiceTest();
          f.setSize(500,500);
          f.setVisible(true);
        }

        public void actionPerformed(ActionEvent evt) {
          c.insert("new choice!", 0);
        }
      }



      Output:

      SIGBUS 10* bus error
          si_signo [10]: SIGBUS 10* bus error
          si_errno [0]: Error 0
          si_code [1]: BUS_ADRERR [addr: 0xdf80063b]
       
              stackbase=EE012000, stackpointer=EE011790
       
      Full thread dump:
          "AWT-Finalizer" (TID:0xee7039d0, sys_thread_t:0xedf81de0, state:CW) prio=9
              java.lang.Object.wait(Object.java)
              sun.awt.AWTFinalizer.run(AWTFinalizer.java:48)
          "AWT-Motif" (TID:0xee704bb8, sys_thread_t:0xedfb1de0, state:MW) prio=5
              java.lang.Thread.run(Thread.java)
          "AWT-Input" (TID:0xee704b98, sys_thread_t:0xedfe1de0, state:CW) prio=5
          "AWT-EventQueue-0" (TID:0xee704b80, sys_thread_t:0xee011de0, state:R) prio=5
       *current thread*
              java.awt.Choice.addItem(Choice.java:124)
              java.awt.Choice.add(Choice.java:109)
              java.awt.Choice.insert(Choice.java:162)
              ChoiceTest.actionPerformed(ChoiceTest.java:25)
              java.awt.Button.processActionEvent(Button.java:172)
              java.awt.Button.processEvent(Button.java:153)
              java.awt.Component.dispatchEventImpl(Component.java:1456)
              java.awt.Component.dispatchEvent(Component.java:1393)
              java.awt.EventDispatchThread.run(EventDispatchThread.java:63)
          "Finalizer thread" (TID:0xee700220, sys_thread_t:0xee2c1de0, state:CW) prio=1
          "Async Garbage Collector" (TID:0xee7001d8, sys_thread_t:0xee2f1de0, state:CW) prio=1
          "Idle thread" (TID:0xee700190, sys_thread_t:0xee3c1de0, state:R) prio=0
          "Clock" (TID:0xee7000d0, sys_thread_t:0xee3f1de0, state:CW) prio=12
          "main" (TID:0xee7000a8, sys_thread_t:0x40e30, state:CW) prio=5
      Monitor Cache Dump:
          <unknown key> (0xef513dc0): owner "AWT-EventQueue-0" (0xee011de0, 1 entry)
          <unknown key> (0xee2f1de0): <unowned>
              Waiting to be notified:
                  "Async Garbage Collector"
          sun.awt.AWTFinalizer@EE7039D0/EE750650: <unowned>
              Waiting to be notified:
                  "AWT-Finalizer"
          sun.awt.motif.MToolkit@EE704B00/EE74FCC8: owner "AWT-EventQueue-0" (0xee011de0, 1 entry)
              Waiting to enter:
                  "AWT-Motif"
              Waiting to be notified:
                  "AWT-Input"
          java.awt.Choice@EE703D88/EE74D530: owner "AWT-EventQueue-0" (0xee011de0, 3 entries)
      Registered Monitor Dump:
          Thread queue lock: <unowned>
              Waiting to be notified:
                  "main"
          Name and type hash table lock: <unowned>
          String intern lock: <unowned>
          JNI pinning lock: <unowned>
          JNI global reference lock: <unowned>
          BinClass lock: <unowned>
          Class loading lock: <unowned>
          Java stack lock: <unowned>
          Code rewrite lock: <unowned>
          Heap lock: <unowned>
          Has finalization queue lock: <unowned>
          Finalize me queue lock: <unowned>
              Waiting to be notified:
                  "Finalizer thread"
          Monitor IO lock: <unowned>
          Child death monitor: <unowned>
          Event monitor: <unowned>
          I/O monitor: <unowned>
          Alarm monitor: <unowned>
              Waiting to be notified:
                  "Clock"
          Sbrk lock: <unowned>
          Monitor cache expansion lock: <unowned>
          Monitor registry: owner "AWT-EventQueue-0" (0xee011de0, 1 entry)
      Thread Alarm Q:
          sys_thread_t 0xee2f1de0 [Timeout in 602 ms]
      Abort (core dumped)

      company - SRA , email - ###@###.###
      ======================================================================

            rkhansunw Robi Khan (Inactive)
            dindrigo Daniel Indrigo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: