RFR: 8240506: TextFieldSkin/Behavior: misbehavior on switching skin [v2]

Jeanette Winzenburg fastegal at openjdk.java.net
Wed Jul 7 09:48:20 UTC 2021


> The issue is about memory leaks and side-effects (like NPEs) when switching skins. 
> 
> Details (copied from issue for convenience):
> 
> memory leak in TextInputControlBehavior:
> - listener accidentally added twice (removed once)
> - keyPad mappings not properly installed/disposed
> 
> memory leak TextFieldBehavior:
> - listeners to scene/focusOwner property not removed,
> 
> memory leak in TextInputControlSkin:
> - event handlers related to inputMethods not removed
> 
> issues in TextFieldSkin:
> - memory leak due to behavior leaking
> - memory leaks due to manually added change/invalidation listeners that are not removed
> - memory leaks due to not removing children with strong references to skin
> - side-effects (f.i. NPEs) due to listeners/bindings that are still active after dispose
> 
> Fix was to properly install/remove those listeners/handlers. Added tests that failed/passed before/after the fix, respectively, also added tests passing before that must pass after the fix.

Jeanette Winzenburg has updated the pull request incrementally with one additional commit since the last revision:

  addressed review issues

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

Changes:
  - all: https://git.openjdk.java.net/jfx/pull/534/files
  - new: https://git.openjdk.java.net/jfx/pull/534/files/2adf136f..df1ebc09

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jfx&pr=534&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jfx&pr=534&range=00-01

  Stats: 5 lines in 2 files changed: 0 ins; 1 del; 4 mod
  Patch: https://git.openjdk.java.net/jfx/pull/534.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/534/head:pull/534

PR: https://git.openjdk.java.net/jfx/pull/534


More information about the openjfx-dev mailing list