<AWT Dev> RFR: 8257242: [macOS] Java app crashes while switching input methods

Prasanta Sadhukhan psadhukhan at openjdk.java.net
Mon Nov 30 13:30:05 UTC 2020


It seems the patch for https://bugs.openjdk.java.net/browse/JDK-8248532 causes a crash, as it attempts to call a method selector on a class for an instance method (- keyboardInputSourceChanged). It was not observed in 10.14 but seen in 10.15 or later.
It resulted in crash as we are passing [AWTView class] as an instance to the notification observer but notification function keyboardInputSourceChanged is not a member function.
Modified the code to make that function a class-level function so that it does not crash.
mucommander.app, JDK-8214578 testcase worked with this change.

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

Commit messages:
 - 8257242: [macOS] Java app crashes while switching input methods

Changes: https://git.openjdk.java.net/jdk/pull/1517/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1517&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8257242
  Stats: 8 lines in 2 files changed: 3 ins; 3 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1517.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1517/head:pull/1517

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


More information about the awt-dev mailing list