It looks that is the bug in the GTK or Eclipse SWT library.
During window close process method org.eclipse.widgets.Display.removeWidget() calls native method org.eclipse.swt.internal.gtk.OS._g_object_get_qdata() which causes segmentation fault (it not cause Java exception due we are in native code).
Display.removeWidget() source code:
Widget removeWidget (long /*int*/ handle) {
if (handle == 0) return null;
lastWidget = null;
Widget widget = null;
int index = (int)/*64*/ OS.g_object_get_qdata (handle, SWT_OBJECT_INDEX) - 1;
if (0 <= index && index < widgetTable.length) {
widget = widgetTable [index];
widgetTable [index] = null;
indexTable [index] = freeSlot;
freeSlot = index;
OS.g_object_set_qdata (handle, SWT_OBJECT_INDEX, 0);
}
return widget;
}
It looks that is the bug in the GTK or Eclipse SWT library. widgets. Display. removeWidget( ) calls native method org.eclipse. swt.internal. gtk.OS. _g_object_ get_qdata( ) which causes segmentation fault (it not cause Java exception due we are in native code). removeWidget( ) source code: get_qdata (handle, SWT_OBJECT_INDEX) - 1; object_ set_qdata (handle, SWT_OBJECT_INDEX, 0);
During window close process method org.eclipse.
Display.
Widget removeWidget (long /*int*/ handle) {
if (handle == 0) return null;
lastWidget = null;
Widget widget = null;
int index = (int)/*64*/ OS.g_object_
if (0 <= index && index < widgetTable.length) {
widget = widgetTable [index];
widgetTable [index] = null;
indexTable [index] = freeSlot;
freeSlot = index;
OS.g_
}
return widget;
}
native method implementation: _1g_1object_ 1get_1qdata) ENTER(env, that, _1g_1object_ 1get_1qdata_ FUNC); g_object_ get_qdata( (GObject *)arg0, (GQuark)arg1); EXIT(env, that, _1g_1object_ 1get_1qdata_ FUNC);
JNIEXPORT jintLong JNICALL OS_NATIVE(
(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
{
jintLong rc = 0;
OS_NATIVE_
rc = (jintLong)
OS_NATIVE_
return rc;
}