Project: SWT
Bug 48492 Eclipse crashes on GTK (linux) while Cell Editor in Property View loosing focus
Reported: 2003-12-11 10:22:09 | Status: resolved fixed

During implementation of custom contents for properties view (IPropertySource for specific selection) we found that eclipse crashes on GTK (Linux) in some special conditions: 0. In our IPropertySource implementation we have editable text property. 1. Open CellEditor for the editable property 2. Change it's value 3. Click to some other property in properties view of to the properties view background. We found that after step 3. The following sequence of calls lead us to the crash: 1. Cell Editor receive focuslost event and start "applyEditorValue()" process 2. PropertySheetEntry is trying to refresh property sheet contents (refreshFromRoot() method) by looking for appropriate IPropertySource and trying to collect valid IPropertyDescriptors from this IPropertySource instance by calling IPropertySource.getPropertyDescriptors() 3. Eclipse crashes sometimes later if our instance of IPropertySoruce return empty array (IPropertyDescriptors [0]) during this call. The same sequence works correctly on Windows. The following trace present in console on setting org.eclipse.swt.graphics.Device.DEBUG = true: java.lang.Error at org.eclipse.swt.graphics.Device.logProc(Device.java:539) at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(Native Method) at org.eclipse.swt.widgets.Display.eventProc(Display.java:635) at org.eclipse.swt.internal.gtk.OS.gtk_main_iteration(Native Method) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1638) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:858) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:291) at org.eclipse.core.launcher.Main.run(Main.java:747) at org.eclipse.core.launcher.Main.main(Main.java:583) Gtk-ERROR **: file gtkrbtree.c: line 1189 (_gtk_rbtree_find_offset): assertion failed: (tree) aborting...

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java