Project: JDT
Bug 241495 Invalid thread access when applying "Fix project setup..." quickfix
Reported: 2008-07-21 02:56:06 | Status: resolved fixed

Build ID: I20080617-2000 Steps To Reproduce: 1. Create a .java file that has an unresolved import statement for some org.eclipse.* class 2. Click on the marker to quick-fix it, then select the "Fix project setup..." quickfix 3. In the "Project Setup Fixes" dialog, select the correct bundle and click OK 4. Observe the error dialog "A problem occurred while applying the project setup fix. Invalid thread access" More information: Stack trace from error log: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:403) at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:758) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:755) at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2483) at org.eclipse.jdt.internal.ui.wizards.buildpaths.ClasspathFixSelectionDialog.openClasspathFixSelectionDialog(ClasspathFixSelectionDialog.java:98) at org.eclipse.jdt.internal.ui.text.correction.ReorgCorrectionsSubProcessor$ClasspathFixCorrectionProposal.apply(ReorgCorrectionsSubProcessor.java:256) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertProposal(CompletionProposalPopup.java:928) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertSelectedProposalWithMask(CompletionProposalPopup.java:874) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$27(CompletionProposalPopup.java:870) at org.eclipse.jface.text.contentassist.CompletionProposalPopup$5.widgetDefaultSelected(CompletionProposalPopup.java:652) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:113) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1158) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3401) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3033) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) 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.equinox.launcher.Main.invokeFramework(Main.java:549) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1236) Caused by: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:3777) at org.eclipse.swt.SWT.error(SWT.java:3695) at org.eclipse.swt.SWT.error(SWT.java:3666) at org.eclipse.swt.widgets.Widget.error(Widget.java:446) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:385) at org.eclipse.swt.custom.StyledText.getLinePixel(StyledText.java:3718) at org.eclipse.swt.custom.StyledText.handleTextChanging(StyledText.java:5455) at org.eclipse.swt.custom.StyledText$6.textChanging(StyledText.java:4850) at org.eclipse.jface.text.DefaultDocumentAdapter.fireTextChanging(DefaultDocumentAdapter.java:392) at org.eclipse.jface.text.DefaultDocumentAdapter.documentAboutToBeChanged(DefaultDocumentAdapter.java:309) at org.eclipse.jface.text.AbstractDocument.fireDocumentAboutToBeChanged(AbstractDocument.java:641) at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1148) at org.eclipse.core.internal.filebuffers.SynchronizableDocument.replace(SynchronizableDocument.java:151) at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1176) at org.eclipse.core.internal.filebuffers.SynchronizableDocument.replace(SynchronizableDocument.java:137) at org.eclipse.text.edits.ReplaceEdit.performDocumentUpdating(ReplaceEdit.java:82) at org.eclipse.text.edits.TextEdit.traverseDocumentUpdating(TextEdit.java:898) at org.eclipse.text.edits.TextEdit.traverseDocumentUpdating(TextEdit.java:891) at org.eclipse.text.edits.TextEditProcessor.executeDo(TextEditProcessor.java:188) at org.eclipse.text.edits.TextEdit.dispatchPerformEdits(TextEdit.java:738) at org.eclipse.text.edits.TextEditProcessor.performEdits(TextEditProcessor.java:156) at org.eclipse.text.edits.TextEdit.apply(TextEdit.java:710) at org.eclipse.text.edits.TextEdit.apply(TextEdit.java:734) at org.eclipse.pde.internal.ui.util.PDEModelUtility.generateModelEdits(PDEModelUtility.java:357) at org.eclipse.pde.internal.ui.util.PDEModelUtility.modifyModel(PDEModelUtility.java:294) at org.eclipse.pde.internal.ui.correction.java.JavaResolutionFactory$RequireBundleManifestChange.perform(JavaResolutionFactory.java:128) at org.eclipse.ltk.core.refactoring.PerformChangeOperation$1.run(PerformChangeOperation.java:260) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800) at org.eclipse.ltk.core.refactoring.PerformChangeOperation.executeChange(PerformChangeOperation.java:308) at org.eclipse.ltk.internal.ui.refactoring.UIPerformChangeOperation.executeChange(UIPerformChangeOperation.java:109) at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:225) at org.eclipse.jdt.internal.ui.wizards.buildpaths.ClasspathFixSelectionDialog$2.run(ClasspathFixSelectionDialog.java:110) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) Session data: eclipse.buildId=I20080617-2000 java.version=1.5.0_01 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=solaris, ARCH=sparc, WS=gtk, NL=en_US Command-line arguments: -os solaris -ws gtk -arch sparc

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ClasspathFixSelectionDialog.java