<AWT Dev> RFR: 8263490: [macos] Crash occurs on JPasswordField with activated InputMethod

Toshio Nakamura tnakamura at openjdk.java.net
Sat Mar 13 03:51:05 UTC 2021


On Fri, 12 Mar 2021 23:34:08 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

>> Marked as reviewed by dmarkov (Reviewer).
>
> As far as I understand the JPasswordField is affected because it disables InputMethods by default? I wonder why in this case we even try to run something in the native code?

I agree that disabling IM completely on JPasswordField is the fundamental fix, but the current macOS can still activate the prediction candidate feature even if the target component doesn't accept non ASCII characters. Then, the feature may call native codes.

I'd like to prevent crash this time. Also, the other IM related native codes in AWTView.m have similar checks, and only attributedSubstringForProposedRange lacks them.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2959


More information about the awt-dev mailing list