Project: JDT
Bug 124000 SWTException: Invalid thread access, in OverviewRuler.redraw
Reported: 2006-01-16 13:16:24 | Status: resolved fixed

build I20060110 + latest UI and Text from HEAD I saw the following in the log of my target eclipse, shortly after launching it. It had restored some Java editors from the previous session. Opening a Java editor after the IDE is up does not cause this. !ENTRY org.eclipse.core.runtime 4 2 2006-01-16 13:10:38.935 !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.runtime". !STACK 0 org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:3283) at org.eclipse.swt.SWT.error(SWT.java:3206) at org.eclipse.swt.SWT.error(SWT.java:3177) at org.eclipse.swt.widgets.Widget.error(Widget.java:427) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:323) at org.eclipse.swt.widgets.Control.internal_new_GC(Control.java:1176) at org.eclipse.swt.graphics.GC.<init>(GC.java:132) at org.eclipse.swt.graphics.GC.<init>(GC.java:99) at org.eclipse.jface.text.source.OverviewRuler.redraw(OverviewRuler.java:704) at org.eclipse.jface.text.source.OverviewRuler.access$1(OverviewRuler.java:698) at org.eclipse.jface.text.source.OverviewRuler$InternalListener.textChanged(OverviewRuler.java:81) at org.eclipse.jface.text.TextViewer.updateTextListeners(TextViewer.java:2378) at org.eclipse.jface.text.TextViewer.invalidateTextPresentation(TextViewer.java:3007) at org.eclipse.ui.texteditor.AbstractTextEditor.handlePreferenceStoreChanged(AbstractTextEditor.java:3371) at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.handlePreferenceStoreChanged(AbstractDecoratedTextEditor.java:1112) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.handlePreferenceStoreChanged(JavaEditor.java:2534) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.handlePreferenceStoreChanged(CompilationUnitEditor.java:1777) at org.eclipse.ui.texteditor.AbstractTextEditor$PropertyChangeListener.propertyChange(AbstractTextEditor.java:574) at org.eclipse.ui.texteditor.ChainedPreferenceStore.firePropertyChangeEvent(ChainedPreferenceStore.java:163) at org.eclipse.ui.texteditor.ChainedPreferenceStore.handlePropertyChangeEvent(ChainedPreferenceStore.java:430) at org.eclipse.ui.texteditor.ChainedPreferenceStore.access$0(ChainedPreferenceStore.java:407) at org.eclipse.ui.texteditor.ChainedPreferenceStore$PropertyChangeListener.propertyChange(ChainedPreferenceStore.java:68) at org.eclipse.jdt.internal.ui.text.PreferencesAdapter.firePropertyChangeEvent(PreferencesAdapter.java:105) at org.eclipse.jdt.internal.ui.text.PreferencesAdapter$PropertyChangeListener.propertyChange(PreferencesAdapter.java:41) at org.eclipse.core.runtime.Preferences$1.run(Preferences.java:519) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Preferences.firePropertyChangeEvent(Preferences.java:522) at org.eclipse.core.internal.preferences.PreferenceForwarder.preferenceChange(PreferenceForwarder.java:101) at org.eclipse.core.internal.preferences.EclipsePreferences$2.run(EclipsePreferences.java:746) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.internal.preferences.EclipsePreferences.firePreferenceEvent(EclipsePreferences.java:749) at org.eclipse.core.internal.preferences.EclipsePreferences.put(EclipsePreferences.java:762) at org.eclipse.jdt.internal.core.JavaModelManager.setOptions(JavaModelManager.java:3497) at org.eclipse.jdt.core.JavaCore.setOptions(JavaCore.java:4317) at org.eclipse.jdt.launching.JavaRuntime.detectDefaultVM(JavaRuntime.java:1618) at org.eclipse.jdt.launching.JavaRuntime.getDefaultVMInstall(JavaRuntime.java:444) at org.eclipse.jdt.internal.launching.JREContainerInitializer.resolveVM(JREContainerInitializer.java:101) at org.eclipse.jdt.internal.launching.JREContainerInitializer.initialize(JREContainerInitializer.java:51) at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:1741) at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:1171) at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:1467) at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:2144) at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:2052) at org.eclipse.jdt.internal.core.JavaProject.buildStructure(JavaProject.java:332) at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:235) at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:503) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:247) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:233) at org.eclipse.jdt.internal.core.JavaProject.getJavaProjectElementInfo(JavaProject.java:1618) at org.eclipse.jdt.internal.core.JavaProject.newNameLookup(JavaProject.java:2527) at org.eclipse.jdt.internal.core.SearchableEnvironment.<init>(SearchableEnvironment.java:60) at org.eclipse.jdt.internal.core.SearchableEnvironment.<init>(SearchableEnvironment.java:74) at org.eclipse.jdt.internal.core.CancelableNameEnvironment.<init>(CancelableNameEnvironment.java:26) at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process(CompilationUnitProblemFinder.java:146) at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process(CompilationUnitProblemFinder.java:227) at org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.makeConsistent(ReconcileWorkingCopyOperation.java:144) at org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.executeOperation(ReconcileWorkingCopyOperation.java:69) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:720) at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:779) at org.eclipse.jdt.internal.core.CompilationUnit.reconcile(CompilationUnit.java:1100) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy$1.run(JavaReconcilingStrategy.java:97) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:785) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:82) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.initialReconcile(JavaReconcilingStrategy.java:172) at org.eclipse.jdt.internal.ui.text.CompositeReconcilingStrategy.initialReconcile(CompositeReconcilingStrategy.java:114) at org.eclipse.jdt.internal.ui.text.JavaCompositeReconcilingStrategy.initialReconcile(JavaCompositeReconcilingStrategy.java:120) at org.eclipse.jface.text.reconciler.MonoReconciler.initialProcess(MonoReconciler.java:103) at org.eclipse.jdt.internal.ui.text.JavaReconciler.initialProcess(JavaReconciler.java:328) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:170)

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/PreferencesAdapter.java