Community
Participate
Working Groups
When opening Key Preferences Page from workbench preferences, Eclipse creates a following log entry: ------------- !MESSAGE Failed to execute runnable (java.lang.StackOverflowError) !STACK 0 org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.StackOverflowError) at org.eclipse.swt.SWT.error(SWT.java:2367) ... ------------- The key preferences page eventually opens, but when attempting to change selected category from the category dropdown, eclipse ends up with a stack overflow error. Same happend with other dropdown boxes as well. The stack trace: ------------- *** Stack trace of contained exception *** !ENTRY org.eclipse.ui 4 0 Aug 29, 2003 12:37:57.480 !MESSAGE java.lang.StackOverflowError !STACK 0 java.lang.StackOverflowError at org.eclipse.swt.events.SelectionEvent.<init>(SelectionEvent.java:92) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:88) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:953) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:977) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:958) at org.eclipse.swt.widgets.Combo.gtk_changed(Combo.java:745) at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1174) at org.eclipse.swt.widgets.Display.windowProc(Display.java:2344) at org.eclipse.swt.internal.gtk.OS.gtk_entry_set_text(Native Method) at org.eclipse.swt.widgets.Combo.setText(Combo.java:1216) at org.eclipse.swt.widgets.Combo.select(Combo.java:1050) at org.eclipse.ui.internal.commands.KeysPreferencePage.setCommandId(KeysPreferencePage.java:1270) at org.eclipse.ui.internal.commands.KeysPreferencePage.setCommandsForCategory(KeysPreferencePage.java:1285) at org.eclipse.ui.internal.commands.KeysPreferencePage.update(KeysPreferencePage.java:1353) at org.eclipse.ui.internal.commands.KeysPreferencePage.selectedComboCommand(KeysPreferencePage.java:1160) at org.eclipse.ui.internal.commands.KeysPreferencePage.access$2(KeysPreferencePage.java:1159) at org.eclipse.ui.internal.commands.KeysPreferencePage$3.widgetSelected(KeysPreferencePage.java:637) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89) ..... --------------
I also get this error. I'm attaching the full error log I get from starting eclipse to eclipse crashing. This was with eclipse 3.0M3 build ID 200308281813 running on RH Linux 9. The sequence of events from the user's perspective is: 1. Start Eclipse 2. Select Window->Preferences in the menu bar. 3. Go to the Workbench/Keys preferences. 4. Open the "Category: " combo and select "Search". 5. *boom* (A dialog box appears giving the choice between exiting or trying to continue.) This is 100% reproducible.
Created attachment 5907 [details] The full error log. Knock yourself out. Here's the log.
*** Bug 42387 has been marked as a duplicate of this bug. ***
Created attachment 5988 [details] Patch to KeysPreferencePage The problem is caused by multiple invocations of update(). The root cause is that the select(int) and setItems(Object[]) methods on the combo boxes are being called during the update ... which triggers another update. The problem is further complicated by other things, like GTK not updating the selection index until the call to select(int) completes successfully. This patch modifies the update method so that the method can only appear once on the stack at any time. The entry and exit to the method are controlled by a flag. This way the method can only be executing once in the system at any point in time. The update method is not thread-safe anyway, so no synchronized blocks have been added.
chris: review/apply.
*** Bug 42432 has been marked as a duplicate of this bug. ***
Grant has committed a fix to SWT that fixes this problem as well. Waiting on his response. This patch may not be necessary.
The swt fix is adequate for fixing this (actually it wasn't me that committed the fix). I tested it by self-hosting the M3 build with swt's current HEAD contents. If you wish you can verify that the change at your level is not needed by getting tonight's nightly build.
cool. i'd prefer not to apply the patch if possible. (safer fix would be to wrap update in a try-finally block to make sure that flag will be set false in case of runtime exception..) our update method should never be reentrant anyway, this was an swt problem. doug please close when swt fix is confirmed..
update: the nightly Eclipse build (0905) failed to compile. will check later....
*** Bug 42286 has been marked as a duplicate of this bug. ***
This bug was fixed by SWT. *** This bug has been marked as a duplicate of 42465 ***