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

[macos] Crash occurs on JPasswordField with activated InputMethod

XMLWordPrintable

    • b14
    • x86_64
    • os_x

        FULL PRODUCT VERSION :
        openjdk version "17-ea" 2021-09-14
        OpenJDK Runtime Environment (build 17-ea+13-1000)
        OpenJDK 64-Bit Server VM (build 17-ea+13-1000, mixed mode, sharing)

        ADDITIONAL OS VERSION INFORMATION :
        macOS Catalina or BigSur Japanese

        A DESCRIPTION OF THE PROBLEM :
        If Input Method is activated on JPasswordField, unexpected behaviors occur intermittently.
        - Crash
        - Exception was thrown
            "Apple AWT Internal Exception: java.lang.NullPointerException"

        This scenario is unusual, but I'd like to avoid crash.

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        0. Add Japanese Input Method to OS
        1. Launch sample JPasswordField dialog
        2. Activate Japanese Input Method
        3. Type some keys

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        Expected:
        Typed keys were input.

        Actual:
        Crash or exception thrown or normal(keys were input)

        REPRODUCIBILITY :
        Intermittent

        ---------- BEGIN SOURCE ----------
        import javax.swing.*;
        public class JPasswordFieldTest {
            public static void main(String[] args) {
                JFrame frame = new JFrame("Swing JPasswordField component");
                JPasswordField passwordField = new JPasswordField();
                frame.add(passwordField);
                frame.setSize(200, 50);
                frame.setVisible(true);
            }
        }
        ---------- END SOURCE ----------

              tnakamura Toshio Nakamura
              tnakamura Toshio Nakamura
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: