<AWT Dev> RFR: 8248532: Every time I change keyboard language at my MacBook, Java crashes
Prasanta Sadhukhan
psadhukhan at openjdk.java.net
Sun Sep 6 08:38:27 UTC 2020
It seems the observer either needs to be removed when it is dealloced/destroyed (Otherwise Notification Centre would
send the notification to the destroyed object resulting in crash.)
and we need to do the below in dealloc, which solves the crash in my system.
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; [nc removeObserver:self]
But it is not done for LWCToolkit, so I changed the observer as is being done there, to make existing @implementation
class as observer
-------------
Commit messages:
- 8248532: Every time I change keyboard language at my MacBook, Java crashes
Changes: https://git.openjdk.java.net/jdk/pull/28/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=28&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8248532
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.java.net/jdk/pull/28.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/28/head:pull/28
PR: https://git.openjdk.java.net/jdk/pull/28
More information about the awt-dev
mailing list