eclipse-tm4e / tm4e

TextMate support in Eclipse IDE
https://projects.eclipse.org/projects/technology.tm4e
Eclipse Public License 2.0
93 stars 56 forks source link

Cannot open Maven pom.xml editor: IllegalThreadStateException at org.eclipse.tm4e.core.model.TMModel.startTokenizerThread(TMModel.java:249) #590

Closed minduch closed 1 year ago

minduch commented 1 year ago

Win11, Eclipse 2023-09 M3 [clean install from Eclipse for Java + more], JustJ Java 17.0.8

Cannot open Maven pom.xml file, and it looks like it's a problem in org.eclipse.tm4e...

Screenshot 2023-08-26 171211
java.lang.IllegalThreadStateException
    at java.base/java.lang.Thread.start(Thread.java:793)
    at org.eclipse.tm4e.core.model.TMModel.startTokenizerThread(TMModel.java:249)
    at org.eclipse.tm4e.core.model.TMModel.addModelTokensChangedListener(TMModel.java:223)
    at org.eclipse.tm4e.ui.text.TMPresentationReconciler$InternalListener.textChanged(TMPresentationReconciler.java:332)
    at org.eclipse.jface.text.TextViewer.updateTextListeners(TextViewer.java:2789)
    at org.eclipse.jface.text.TextViewer.invalidateTextPresentation(TextViewer.java:3409)
    at org.eclipse.jface.text.TextViewer.initializeWidgetContents(TextViewer.java:3457)
    at org.eclipse.jface.text.TextViewer.setVisibleDocument(TextViewer.java:3496)
    at org.eclipse.jface.text.source.projection.ProjectionViewer.setVisibleDocument(ProjectionViewer.java:700)
    at org.eclipse.jface.text.source.projection.ProjectionViewer.executeReplaceVisibleDocument(ProjectionViewer.java:755)
    at org.eclipse.jface.text.source.projection.ProjectionViewer.replaceVisibleDocument(ProjectionViewer.java:743)
    at org.eclipse.jface.text.source.projection.ProjectionViewer.reinitializeProjection(ProjectionViewer.java:1221)
    at org.eclipse.jface.text.source.projection.ProjectionViewer.catchupWithProjectionAnnotationModel(ProjectionViewer.java:937)
    at org.eclipse.jface.text.source.projection.ProjectionViewer.processCatchupRequest(ProjectionViewer.java:857)
    at org.eclipse.jface.text.source.projection.ProjectionViewer$AnnotationModelListener.processModelChanged(ProjectionViewer.java:122)
    at org.eclipse.jface.text.source.projection.ProjectionViewer$AnnotationModelListener.modelChanged(ProjectionViewer.java:114)
    at org.eclipse.jface.text.source.AnnotationModel.fireModelChanged(AnnotationModel.java:592)
    at org.eclipse.jface.text.source.AnnotationModel$InternalModelListener.modelChanged(AnnotationModel.java:256)
    at org.eclipse.jface.text.source.AnnotationModel.fireModelChanged(AnnotationModel.java:592)
    at org.eclipse.jface.text.source.AnnotationModel.fireModelChanged(AnnotationModel.java:558)
    at org.eclipse.jface.text.source.projection.ProjectionAnnotationModel.modifyAnnotations(ProjectionAnnotationModel.java:188)
    at org.eclipse.ui.internal.genericeditor.folding.IndentFoldingStrategy.reconcile(IndentFoldingStrategy.java:315)
    at org.eclipse.ui.internal.genericeditor.folding.IndentFoldingStrategy.initialReconcile(IndentFoldingStrategy.java:520)
    at org.eclipse.ui.internal.genericeditor.folding.IndentFoldingStrategy.lambda$0(IndentFoldingStrategy.java:165)
    at org.eclipse.jface.text.source.AnnotationModel.addAnnotationModelListener(AnnotationModel.java:449)
    at org.eclipse.ui.internal.genericeditor.folding.IndentFoldingStrategy.projectionEnabled(IndentFoldingStrategy.java:160)
    at org.eclipse.jface.text.source.projection.ProjectionViewer.fireProjectionEnabled(ProjectionViewer.java:475)
    at org.eclipse.jface.text.source.projection.ProjectionViewer.enableProjection(ProjectionViewer.java:523)
    at org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation(ProjectionViewer.java:1375)
    at org.eclipse.ui.internal.genericeditor.ExtensionBasedTextEditor$1.doOperation(ExtensionBasedTextEditor.java:118)
    at org.eclipse.ui.internal.genericeditor.ExtensionBasedTextEditor.createPartControl(ExtensionBasedTextEditor.java:179)
    at org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:227)
    at org.eclipse.ui.forms.editor.FormEditor.addPage(FormEditor.java:331)
    at org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:203)
    at org.eclipse.ui.forms.editor.FormEditor.addPage(FormEditor.java:313)
    at org.eclipse.m2e.editor.pom.MavenPomEditor.addFallbackEditors(MavenPomEditor.java:361)
    at org.eclipse.m2e.editor.pom.MavenPomEditor.addPages(MavenPomEditor.java:337)
    at org.eclipse.ui.forms.editor.FormEditor.createPages(FormEditor.java:143)
    at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:333)
    at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:158)
    at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPartControl(CompatibilityEditor.java:96)
    at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:365)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
    at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:971)
    at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:936)
    at org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:142)
    at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:386)
    at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:313)
    at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:202)
    at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:91)
    at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:60)
    at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:42)
    at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:132)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:995)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:659)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:763)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:728)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:712)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.lambda$0(PartServiceImpl.java:105)
    at org.eclipse.e4.ui.services.internal.events.UIEventHandler.lambda$0(UIEventHandler.java:38)
    at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:183)
    at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:133)
    at org.eclipse.swt.widgets.Display.syncExec(Display.java:4803)
    at org.eclipse.e4.ui.workbench.swt.DisplayUISynchronize.syncExec(DisplayUISynchronize.java:34)
    at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38)
    at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:205)
    at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:203)
    at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151)
    at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:133)
    at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:75)
    at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:44)
    at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:55)
    at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:63)
    at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:424)
    at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElementGen(ElementContainerImpl.java:170)
    at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:188)
    at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:661)
    at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:625)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:796)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.java:401)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1270)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3233)
    at org.eclipse.ui.internal.WorkbenchPage.lambda$11(WorkbenchPage.java:3123)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3121)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3091)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3082)
    at org.eclipse.ui.ide.IDE.openEditor(IDE.java:548)
    at org.eclipse.ui.ide.IDE.openEditor(IDE.java:508)
    at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:367)
    at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:172)
    at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:288)
    at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:254)
    at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274)
    at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:252)
    at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:366)
    at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$3.open(PackageExplorerPart.java:550)
    at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
    at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:801)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
    at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
    at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:798)
    at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1121)
    at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:296)
    at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:331)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4274)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4072)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:342)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
    at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:645)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:342)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:552)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:171)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:651)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:588)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1459)
fbricon commented 1 year ago

duplicate of https://github.com/eclipse/tm4e/issues/578

minduch commented 1 year ago

I fixed it by adding a repo to https://download.eclipse.org/tm4e/snapshots and installing the TextMate Core 0.6.1.202308132047 and TextMate Language Pack 0.2.1.202306132134.

Thanks.