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

Cut/Copy/Paste keys cause VM crash

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.3.1
    • 1.4.0
    • client-libs
    • None
    • ladybird
    • sparc
    • solaris_7

        Pressing the Cut/Copy/Paste keys on a Sun keyboard causes a VM crash.
        This started happening in Merlin-beta build 15 (they work fine in build 14).
        The putbacks for this build can be seen at:

        http://javaweb.eng/cgi-bin/jdk-histories.cgi?bfile=/java/jdk/1.4/ws/MASTER/j2se&stime=0.05.18.00&etime=0.05.24.00

        A full stack trace is below. Below the stack trace is the application I ran.

        java full version "1.4.0beta-b15"
        params= KEY_PRESSED,keyCode=65485,Copy
        KeyChar: ? = 65535 Action Key
        keyText= Copy

        SIGSEGV 11* segmentation violation
            si_signo [11]: SIGSEGV 11* segmentation violation
            si_errno [0]: Error 0
            si_code [1]: SEGV_MAPERR [addr: 0xC]

                stackpointer=fa761958

        Full thread dump Classic VM (1.4.0beta-b15, green threads):
            "Screen Updater" (TID:0xfbcbbf28, sys_thread_t:0x485fb8, state:CW) prio=4
                at java.lang.Object.wait(Native Method)
                at java.lang.Object.wait(Object.java:420)
                at sun.awt.ScreenUpdater.nextEntry(ScreenUpdater.java:76)
                at sun.awt.ScreenUpdater.run(ScreenUpdater.java:96)
            "AWT-EventQueue-0" (TID:0xfbcbc0e0, sys_thread_t:0x479830, state:CW) prio=6
                at java.lang.Object.wait(Native Method)
                at java.lang.Object.wait(Object.java:420)
                at java.awt.EventQueue.getNextEvent(EventQueue.java:275)
                at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:125)
                at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:117)
                at java.awt.EventDispatchThread.run(EventDispatchThread.java:96)
            "AWT-Shutdown" (TID:0xfbcc5da0, sys_thread_t:0x40fe10, state:CW) prio=5
                at java.lang.Object.wait(Native Method)
                at java.lang.Object.wait(Object.java:420)
                at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:262)
                at java.lang.Thread.run(Thread.java:488)
            "AWT-Motif" (TID:0xfbcb9270, sys_thread_t:0x218a40, state:R) prio=5
                at sun.awt.motif.MToolkit.run(Native Method)
                at java.lang.Thread.run(Thread.java:488)
            "Finalizer" (TID:0xfbc98528, sys_thread_t:0x6afc0, state:CW) prio=8
                at java.lang.Object.wait(Native Method)
                at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:108)
                at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:123)
                at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:162)
            "Reference Handler" (TID:0xfbc98300, sys_thread_t:0x66cd0, state:CW) prio=10
                at java.lang.Object.wait(Native Method)
                at java.lang.Object.wait(Object.java:420)
                at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:110)
            "Signal dispatcher" (TID:0xfbc98330, sys_thread_t:0x62608, state:CW) prio=5
            "Thread-0" (TID:0xfbcbb778, sys_thread_t:0x25cd0, state:CW) prio=5
        Monitor Cache Dump:
            java.awt.EventQueue@FBCB90D8/FBDB4170: <unowned>
                Waiting to be notified:
                    "AWT-EventQueue-0" (0x479830)
            java.lang.Object@FBCA83A8/FBD16B58: <unowned>
                Waiting to be notified:
                    "AWT-Shutdown" (0x40fe10)
            java.lang.ref.ReferenceQueue$Lock@FBC98540/FBCCE3E0: <unowned>
                Waiting to be notified:
                    "Finalizer" (0x6afc0)
            sun.awt.ScreenUpdater@FBCBBF28/FBDEC3C8: <unowned>
                Waiting to be notified:
                    "Screen Updater" (0x485fb8)
            java.lang.ref.Reference$Lock@FBC98310/FBCCDF10: <unowned>
                Waiting to be notified:
                    "Reference Handler" (0x66cd0)
            java.lang.Class@FBCA8890/FBD18458: owner "AWT-Motif" (0x218a40) 1 entry
        Registered Monitor Dump:
            utf8 hash table: <unowned>
            JNI pinning lock: <unowned>
            JNI global reference lock: <unowned>
            BinClass lock: <unowned>
            Class linking lock: <unowned>
            System class loader lock: <unowned>
            Code rewrite lock: <unowned>
            Heap lock: <unowned>
            Monitor cache lock: owner "AWT-Motif" (0x218a40) 1 entry
            Dynamic loading lock: <unowned>
            Monitor IO lock: <unowned>
            User signal monitor: <unowned>
                Waiting to be notified:
                    "Signal dispatcher" (0x62608)
            Child death monitor: <unowned>
            I/O monitor: <unowned>
            Alarm monitor: <unowned>
                Waiting to be notified:
                    <unknown thread> (0x26ba0)
            Thread queue lock: owner "AWT-Motif" (0x218a40) 1 entry
                Waiting to be notified:
                    "Thread-0" (0x25cd0)
            Monitor registry: owner "AWT-Motif" (0x218a40) 1 entry

        SIGABRT 6* abort (generated by abort(3) routine)
            si_signo [6]: SIGABRT 6* abort (generated by abort(3) routine)
            si_errno [0]: Error 0
            si_code [0]: SI_USER [pid: 28906, uid: 38734]
                stackpointer=fa761958

        Full thread dump Classic VM (1.4.0beta-b15, green threads):
            "Screen Updater" (TID:0xfbcbbf28, sys_thread_t:0x485fb8, state:CW) prio=4
                at java.lang.Object.wait(Native Method)
                at java.lang.Object.wait(Object.java:420)
                at sun.awt.ScreenUpdater.nextEntry(ScreenUpdater.java:76)
                at sun.awt.ScreenUpdater.run(ScreenUpdater.java:96)
            "AWT-EventQueue-0" (TID:0xfbcbc0e0, sys_thread_t:0x479830, state:CW) prio=6
                at java.lang.Object.wait(Native Method)
                at java.lang.Object.wait(Object.java:420)
                at java.awt.EventQueue.getNextEvent(EventQueue.java:275)
                at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:125)
                at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:117)
                at java.awt.EventDispatchThread.run(EventDispatchThread.java:96)
            "AWT-Shutdown" (TID:0xfbcc5da0, sys_thread_t:0x40fe10, state:CW) prio=5
                at java.lang.Object.wait(Native Method)
                at java.lang.Object.wait(Object.java:420)
                at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:262)
                at java.lang.Thread.run(Thread.java:488)
            "AWT-Motif" (TID:0xfbcb9270, sys_thread_t:0x218a40, state:R) prio=5
                at sun.awt.motif.MToolkit.run(Native Method)
                at java.lang.Thread.run(Thread.java:488)
            "Finalizer" (TID:0xfbc98528, sys_thread_t:0x6afc0, state:CW) prio=8
                at java.lang.Object.wait(Native Method)
                at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:108)
                at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:123)
                at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:162)
            "Reference Handler" (TID:0xfbc98300, sys_thread_t:0x66cd0, state:CW) prio=10
                at java.lang.Object.wait(Native Method)
                at java.lang.Object.wait(Object.java:420)
                at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:110)
            "Signal dispatcher" (TID:0xfbc98330, sys_thread_t:0x62608, state:CW) prio=5
            "Thread-0" (TID:0xfbcbb778, sys_thread_t:0x25cd0, state:CW) prio=5
        Monitor Cache Dump:
            java.awt.EventQueue@FBCB90D8/FBDB4170: <unowned>
                Waiting to be notified:
                    "AWT-EventQueue-0" (0x479830)
            java.lang.Object@FBCA83A8/FBD16B58: <unowned>
                Waiting to be notified:
                    "AWT-Shutdown" (0x40fe10)
            java.lang.ref.ReferenceQueue$Lock@FBC98540/FBCCE3E0: <unowned>
                Waiting to be notified:
                    "Finalizer" (0x6afc0)
            sun.awt.ScreenUpdater@FBCBBF28/FBDEC3C8: <unowned>
                Waiting to be notified:
                    "Screen Updater" (0x485fb8)
            java.lang.ref.Reference$Lock@FBC98310/FBCCDF10: <unowned>
                Waiting to be notified:
                    "Reference Handler" (0x66cd0)
            java.lang.Class@FBCA8890/FBD18458: owner "AWT-Motif" (0x218a40) 1 entry
        Registered Monitor Dump:
            utf8 hash table: <unowned>
            JNI pinning lock: <unowned>
            JNI global reference lock: <unowned>
            BinClass lock: <unowned>
            Class linking lock: <unowned>
            System class loader lock: <unowned>
            Code rewrite lock: <unowned>
            Heap lock: <unowned>
            Monitor cache lock: owner "AWT-Motif" (0x218a40) 1 entry
            Dynamic loading lock: <unowned>
            Monitor IO lock: <unowned>
            User signal monitor: <unowned>
                Waiting to be notified:
                    "Signal dispatcher" (0x62608)
            Child death monitor: <unowned>
            I/O monitor: <unowned>
            Alarm monitor: <unowned>
                Waiting to be notified:
                    <unknown thread> (0x26ba0)
            Thread queue lock: owner "AWT-Motif" (0x218a40) 1 entry
                Waiting to be notified:
                    "Thread-0" (0x25cd0)
            Monitor registry: owner "AWT-Motif" (0x218a40) 1 entry

        Abort
        echawkes@gradgrind:/home/echawkes/tests/4115484( 211 )%


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

        public class MyKeyTest extends Applet implements KeyListener, ActionListener
        {
            public static void main(String[] args)
            {
                Frame frame = new Frame("MyKeyTest");
                Panel p = new Panel();
                MyKeyTest applet = new MyKeyTest();
                applet.init();

                p.add("Center", applet);
                frame.add(p);

                //Color bkgColor = new Color(0x548dc6); // 0xRRGGBB color;
                //frame.setBackground(bkgColor);
                frame.setBackground(Color.orange);

                frame.pack();
                frame.setSize(450, 200);

                frame.show();
                applet.start();
            }


            public void init()
            {
                TextField tf = new TextField("User Outpuy\bt Window\n", 30);
                Label l = new Label("Enter Characters");

                // If we use Helvetica, the bottoms of g, q, p, j get cut off
                //Font f = new Font("Helvetica", Font.PLAIN, 14);
                Font f = new Font("Courier", Font.PLAIN, 14);
                tf.setFont(f);

                tf.addKeyListener(this);
                tf.addActionListener(this);

                add(l, FlowLayout.LEFT);
                add(tf, FlowLayout.CENTER);
            }

            public void start()
            {
            }

            public void keyPressed(KeyEvent evt)
            {
                printKey(evt);
            }

            public void keyTyped(KeyEvent evt)
            {
                printKey(evt);
            }

            public void keyReleased(KeyEvent evt)
            {
                printKey(evt);
                System.out.print("\n");
            }

            public void actionPerformed(ActionEvent evt)
            {
                System.out.print("\n");
                System.out.print("Action Event\n");
                System.out.println(evt.toString());
                System.out.print("\n");
            }

            protected void printKey(KeyEvent evt)
            {
                switch(evt.getID())
                {
                  case KeyEvent.KEY_TYPED:
                    break;
                  case KeyEvent.KEY_PRESSED:
                    break;
                  case KeyEvent.KEY_RELEASED:
                    break;
                  default:
                    System.out.println("Other Event ");
                    return;
                }

                System.out.print("params= " + evt.paramString() + " \n" +
                  "KeyChar: " + evt.getKeyChar() + " = " + (int) evt.getKeyChar());
                if (evt.isActionKey())
                    System.out.print(" Action Key");
                System.out.print("\n");

                System.out.println("keyText= " + evt.getKeyText(evt.getKeyCode())
                  + "\n");
            }
        }

              dmikhalksunw Denis Mikhalkin (Inactive)
              ehawkessunw Eric Hawkes (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: