Bug 574560

Summary: Insulate widget disposal from exceptions in user listeners
Product: [Eclipse Project] Platform Reporter: Alexandr Miloslavskiy <alexandr.miloslavskiy>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: alexandr.miloslavskiy
Version: 4.21   
Target Milestone: ---   
Hardware: PC   
OS: All   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=562233
Whiteboard:

Description Alexandr Miloslavskiy CLA 2021-06-30 03:41:39 EDT
When user listeners throw exceptions on dispose paths (such as SWT.Dispose) listeners, this interrupts SWT logic. This in turn causes SWT to believe that widgets are alive while they are in fact destroyed in the OS already. This causes JVM to crash and/or hangs or other misbehavior.

Bug 562233 has set grounds for insulating SWT from listeners. Now the same approach should be extended to more code, for example to all 'Widget.disposeChildren()' overrides.