Community
Participate
Working Groups
Typical crash log: ---------------- Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code) C [libgdk-3.so.0+0x45420] gdk_window_get_frame_extents+0x0 Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j org.eclipse.swt.internal.gtk.GDK._gdk_window_get_root_origin(J[I[I)V+0 J 30379 c1 org.eclipse.swt.widgets.Shell.getBoundsInPixels()Lorg/eclipse/swt/graphics/Rectangle; (143 bytes) @ 0x00007fbfb7ae3484 [0x00007fbfb7ae2fa0+0x00000000000004e4] J 35492 c1 org.eclipse.swt.widgets.Shell.setEnabled(Z)V (320 bytes) @ 0x00007fbfb74ed444 [0x00007fbfb74ec720+0x0000000000000d24] <...> J 40811 c2 org.eclipse.swt.widgets.EventTable.sendEvent(Lorg/eclipse/swt/widgets/Event;)V (584 bytes) @ 0x00007fbfbfa9a684 [0x00007fbfbfa9a560+0x0000000000000124] J 12270 c2 org.eclipse.swt.widgets.Display.runDeferredEvents()Z (109 bytes) @ 0x00007fbfbee98fc8 [0x00007fbfbee98ba0+0x0000000000000428] J 12304 c2 org.eclipse.swt.widgets.Display.readAndDispatch()Z (73 bytes) @ 0x00007fbfbeea7f2c [0x00007fbfbeea7a80+0x00000000000004ac] <...> siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x0000000000000018 ---------------- I will provide more information soon.
Created attachment 282482 [details] Repro snippet The problem here is: 1) When Exception occurs, it falls through into native-java glue `callback()` 2) `callback()` returns 0 to GTK. 3) For `delete-event`, 0 means "proceed with other handlers". 4) Default handler destroys Shell, but SWT is not aware of that. 5) Trying to access Shell causes use of already freed pointer.
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/182120
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/182320
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/182320 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=aec661287354ebd74f607d83b584b162c8047520
(In reply to Eclipse Genie from comment #4) > Gerrit change > https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/182320 was > merged to [master]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/ > ?id=aec661287354ebd74f607d83b584b162c8047520 Thanks Alexandr for this fix, it should definitely added to stability of Eclipse/SWT based applications. Please raise separate bug to cover below mentioned part copying the patch comment: "This patch only insulates some paths while others (such as various 'Widget.disposeChildren()') remain for future patches." Resolving now.
Thanks for reviewing! > Please raise separate bug to cover below mentioned part Created Bug 574560
Verified in Build id: I20210707-1800