Bug 107031 - [content assist] SWTException in code assist
Summary: [content assist] SWTException in code assist
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.1   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: 3.1.1   Edit
Assignee: Platform-Text-Inbox CLA Friend
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-15 11:21 EDT by Tom Hofmann CLA Friend
Modified: 2005-09-06 12:51 EDT (History)
0 users

See Also:


Attachments
CompletionProposalPopup.diff (759 bytes, patch)
2005-08-15 11:26 EDT, Tom Hofmann CLA Friend
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Hofmann CLA Friend 2005-08-15 11:21:43 EDT
3.2M1-gtk

The fix for bug 31427 can cause an SWTError (Widget disposed) under gtk. The
error is not noticable in the UI, but I found the following stack trace below in
the log (no steps).

Already fixed in HEAD, but since the fix went into the 3.1.1 stream, we should
consider backporting the trivial fix as well. Will attach a patch.

org.eclipse.swt.SWTException: Widget is disposed
	at org.eclipse.swt.SWT.error(SWT.java:3240)
	at org.eclipse.swt.SWT.error(SWT.java:3163)
	at org.eclipse.swt.SWT.error(SWT.java:3134)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:424)
	at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:355)
	at org.eclipse.swt.widgets.Table.getSelectionIndex(Table.java:1369)
	at
org.eclipse.jface.text.contentassist.CompletionProposalPopup.getSelectedProposal(CompletionProposalPopup.java:437)
	at
org.eclipse.jface.text.contentassist.CompletionProposalPopup.verifyKey(CompletionProposalPopup.java:841)
	at
org.eclipse.jface.text.contentassist.ContentAssistant$InternalListener.verifyKey(ContentAssistant.java:630)
	at
org.eclipse.jface.text.TextViewer$VerifyKeyListenersManager.verifyKey(TextViewer.java:414)
	at
org.eclipse.swt.custom.StyledTextListener.handleEvent(StyledTextListener.java:55)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1036)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1060)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1045)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:912)
	at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:5122)
	at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:4857)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1036)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1060)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1045)
	at org.eclipse.swt.widgets.Widget.sendIMKeyEvent(Widget.java:1122)
	at org.eclipse.swt.widgets.Control.gtk_commit(Control.java:1851)
	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1370)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:3438)
	at org.eclipse.swt.internal.gtk.OS._gtk_im_context_filter_keypress(Native Method)
	at org.eclipse.swt.internal.gtk.OS.gtk_im_context_filter_keypress(OS.java:4345)
	at org.eclipse.swt.widgets.Control.filterKey(Control.java:1428)
	at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:1957)
	at org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java:564)
	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1380)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:3438)
	at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
	at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:4795)
	at org.eclipse.swt.widgets.Display.eventProc(Display.java:1063)
	at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
	at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:1176)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2566)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1734)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1698)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
	at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
	at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.eclipse.core.launcher.Main.invokeFramework(Main.java:338)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:282)
	at org.eclipse.core.launcher.Main.run(Main.java:977)
	at org.eclipse.core.launcher.Main.main(Main.java:952)
Comment 1 Tom Hofmann CLA Friend 2005-08-15 11:26:29 EDT
Created attachment 26108 [details]
CompletionProposalPopup.diff

patch against CompletionProposalPopup.java

Running the filter before getting the selected proposal may hide the popup
completely if the user has typed in text that does not fit any proposal. In
this case, we cannot access the proposal table, but should simply return null,
similar to what we do if the index is not valid.
Comment 2 Dani Megert CLA Friend 2005-08-17 05:48:09 EDT
Verified fix.
Approving for 3.1.1.
Second verification by Markus.

Released into R3_1_maintenance.
Comment 3 Tobias Widmer CLA Friend 2005-09-06 12:51:10 EDT
Verified in 3.1.1 maintenance branch