Bug 1410

Summary: Fix NEWT PointerIcon Lifecycle (destroy and clean references @ closing)
Product: [JogAmp] Newt Reporter: Sven Gothel <sgothel>
Component: coreAssignee: Sven Gothel <sgothel>
Status: RESOLVED FIXED    
Severity: critical CC: xerxes
Priority: P4    
Version: 2.4.0   
Hardware: All   
OS: all   
Type: DEFECT SCM Refs:
d5ba4cae824087879a4857e20961a95da04eaebb d693425e2e74a5e4a80c3fde552ffc7d757330f1 75afd5c6be7f68b32fbe9e5d319d888888b30719 de13e49aadd4b4df09eb1ab37c84cda404586ba5
Workaround: ---

Description Sven Gothel 2019-12-06 02:01:06 CET
Commit d5ba4cae824087879a4857e20961a95da04eaebb clarified and simplified the lifecycle of a PointerImpl instance, i.e. drop its resurrection in 
PointerImpl.validateHandle() in favor of a hard exception.

This caused detection of subsequent PointerImpl lifecycle issues,
as instances were not fully destroyed on Display closing and 
references not null'ed in Display and Screen instances.
Comment 1 Sven Gothel 2019-12-06 02:02:24 CET
d5ba4cae824087879a4857e20961a95da04eaebb

NEWT: Align DisplayImpl.createPointerIcon(..) behavior; PointerIconImpl.validatedHandle() shall not create native resource.
    
    Semantic cleanup for clarity and equal behavior
    
    Align DisplayImpl.createPointerIcon(..) behavior
    - return null handle of createPointerIconImplChecked(..) shall be accepted,
      no exception for neither of the two creation methods.
    
    PointerIconImpl.validatedHandle() shall not create native resource.
    - throws exception if handle is null (about to be used)
    - no native creation shall happen here.
    
    Display.PointerIcon.validate(): Removed, not used.
Comment 2 Sven Gothel 2019-12-06 02:08:50 CET
d693425e2e74a5e4a80c3fde552ffc7d757330f1
PointerIcon new instances are always valid ..
    
Move native handle check to pre-destruction call in
PointerIconImpl.destroyOnEDT(..), unifying single destruction and all.

+++

75afd5c6be7f68b32fbe9e5d319d888888b30719
Fix regression of commit NEWT DisplayImpl/PointerIcon: Don't use blocking isNative...
    
This bug never allowed a PointerIconImpl to be destroyed via PointerIconImpl.destroy()

+++

de13e49aadd4b4df09eb1ab37c84cda404586ba5
Fix NEWT PointerIcon Lifecycle (destroy and clean references @ closing)
Fixed as described in comment 0.
Comment 3 Sven Gothel 2019-12-06 03:37:58 CET
validated via unit tests