Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SWT "Invalid thread access" in PomEdits #1885

Open
jukzi opened this issue Nov 4, 2024 · 3 comments
Open

SWT "Invalid thread access" in PomEdits #1885

jukzi opened this issue Nov 4, 2024 · 3 comments

Comments

@jukzi
Copy link

jukzi commented Nov 4, 2024

happened when i try to fix a Problem marker in \eclipse.platform.images\org.eclipse.images\pom.xml:17, however i could not reproduce it a second time.
image

eclipse.buildId=4.34.0.I20241017-2140
java.version=21.0.2
java.vendor=Eclipse Adoptium
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -data file:/C:/Users/jkubitz/platform-2024-09-23/ws/

org.eclipse.text
Error
Mon Nov 04 13:06:19 CET 2024
Problems occurred when invoking code from plug-in: "org.eclipse.text".

org.eclipse.swt.SWTException: Invalid thread access
	at org.eclipse.swt.SWT.error(SWT.java:4922)
	at org.eclipse.swt.SWT.error(SWT.java:4837)
	at org.eclipse.swt.SWT.error(SWT.java:4808)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:500)
	at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:420)
	at org.eclipse.swt.custom.StyledText.getLinePixel(StyledText.java:3866)
	at org.eclipse.swt.custom.StyledText.handleTextChanging(StyledText.java:6118)
	at org.eclipse.swt.custom.StyledText$5.textChanging(StyledText.java:5400)
	at org.eclipse.jface.text.DefaultDocumentAdapter.fireTextChanging(DefaultDocumentAdapter.java:360)
	at org.eclipse.jface.text.DefaultDocumentAdapter.documentAboutToBeChanged(DefaultDocumentAdapter.java:277)
	at org.eclipse.jface.text.AbstractDocument.fireDocumentAboutToBeChanged(AbstractDocument.java:628)
	at org.eclipse.jface.text.projection.ProjectionDocument.delayedFireDocumentAboutToBeChanged(ProjectionDocument.java:762)
	at org.eclipse.jface.text.projection.ProjectionDocument.masterDocumentAboutToBeChanged(ProjectionDocument.java:723)
	at org.eclipse.jface.text.projection.ProjectionDocumentManager.fireDocumentEvent(ProjectionDocumentManager.java:124)
	at org.eclipse.jface.text.projection.ProjectionDocumentManager.documentAboutToBeChanged(ProjectionDocumentManager.java:137)
	at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument._fireDocumentAboutToChange(BasicStructuredDocument.java:393)
	at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.fireDocumentAboutToChanged(BasicStructuredDocument.java:1124)
	at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.internalReplaceText(BasicStructuredDocument.java:1916)
	at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.replaceText(BasicStructuredDocument.java:2426)
	at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.replaceText(BasicStructuredDocument.java:2411)
	at org.eclipse.wst.sse.core.internal.text.JobSafeStructuredDocument.replaceText(JobSafeStructuredDocument.java:137)
	at org.eclipse.wst.xml.core.internal.provisional.format.NodeFormatter.replace(NodeFormatter.java:662)
	at org.eclipse.wst.xml.core.internal.provisional.format.NodeFormatter.insertBeforeNode(NodeFormatter.java:600)
	at org.eclipse.wst.xml.core.internal.provisional.format.NodeFormatter.formatIndentationBeforeNode(NodeFormatter.java:191)
	at org.eclipse.wst.xml.core.internal.provisional.format.ElementNodeFormatter.formatNode(ElementNodeFormatter.java:115)
	at org.eclipse.wst.xml.core.internal.provisional.format.NodeFormatter.format(NodeFormatter.java:77)
	at org.eclipse.wst.sse.core.internal.format.AbstractStructuredFormatProcessor.formatNode(AbstractStructuredFormatProcessor.java:414)
	at org.eclipse.m2e.core.ui.internal.editing.PomEdits.format(PomEdits.java:439)
	at org.eclipse.m2e.core.ui.internal.editing.LifecycleMappingOperation.createPluginExecution(LifecycleMappingOperation.java:196)
	at org.eclipse.m2e.core.ui.internal.editing.LifecycleMappingOperation.process(LifecycleMappingOperation.java:157)
	at org.eclipse.m2e.core.ui.internal.editing.PomEdits$CompoundOperation.process(PomEdits.java:663)
	at org.eclipse.m2e.core.ui.internal.editing.PomEdits.performOnDOMDocument(PomEdits.java:504)
	at org.eclipse.m2e.editor.internal.lifecycle.LifecycleMappingResolution.performIgnore(LifecycleMappingResolution.java:98)
	at org.eclipse.m2e.editor.internal.lifecycle.LifecycleMappingResolution.fix(LifecycleMappingResolution.java:74)
	at org.eclipse.m2e.core.ui.internal.markers.EditorAwareMavenProblemResolution.fix(EditorAwareMavenProblemResolution.java:59)
	at org.eclipse.m2e.core.ui.internal.markers.MavenProblemResolution.run(MavenProblemResolution.java:147)
	at org.eclipse.m2e.core.ui.internal.markers.MavenProblemResolution.run(MavenProblemResolution.java:118)
	at org.eclipse.ui.internal.genericeditor.markers.MarkerInformationControl$1$1.run(MarkerInformationControl.java:141)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

and

eclipse.buildId=4.34.0.I20241017-2140
java.version=21.0.2
java.vendor=Eclipse Adoptium
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -data file:/C:/Users/jkubitz/platform-2024-09-23/ws/

org.eclipse.wst.sse.core
Error
Mon Nov 04 13:06:19 CET 2024
Problems occurred when invoking code from plug-in: "org.eclipse.wst.sse.core".

org.eclipse.swt.SWTException: Invalid thread access
	at org.eclipse.swt.SWT.error(SWT.java:4922)
	at org.eclipse.swt.SWT.error(SWT.java:4837)
	at org.eclipse.swt.SWT.error(SWT.java:4808)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:500)
	at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:420)
	at org.eclipse.swt.widgets.Scrollable.getVerticalBar(Scrollable.java:317)
	at org.eclipse.swt.custom.StyledText.reset(StyledText.java:7787)
	at org.eclipse.swt.custom.StyledText.handleTextSet(StyledText.java:6155)
	at org.eclipse.swt.custom.StyledText$5.textSet(StyledText.java:5408)
	at org.eclipse.jface.text.DefaultDocumentAdapter.fireTextSet(DefaultDocumentAdapter.java:332)
	at org.eclipse.jface.text.DefaultDocumentAdapter.resumeForwardingDocumentChanges(DefaultDocumentAdapter.java:371)
	at org.eclipse.jface.text.TextViewer.enabledRedrawing(TextViewer.java:5025)
	at org.eclipse.jface.text.TextViewer.enabledRedrawing(TextViewer.java:5012)
	at org.eclipse.jface.text.TextViewer.setRedraw(TextViewer.java:5094)
	at org.eclipse.jface.text.TextViewer.setRedraw(TextViewer.java:5068)
	at org.eclipse.jface.text.TextViewer$RewriteTarget.setRedraw(TextViewer.java:1017)
	at org.eclipse.jface.text.TextViewer$DocumentRewriteSessionListener.documentRewriteSessionChanged(TextViewer.java:1423)
	at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument$1.run(BasicStructuredDocument.java:2973)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.fireDocumentRewriteSessionEvent(BasicStructuredDocument.java:2971)
	at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.internalStopRewriteSession(BasicStructuredDocument.java:2853)
	at org.eclipse.wst.sse.core.internal.text.JobSafeStructuredDocument.stopRewriteSession(JobSafeStructuredDocument.java:237)
	at org.eclipse.m2e.core.ui.internal.editing.PomEdits.performOnDOMDocument(PomEdits.java:509)
	at org.eclipse.m2e.editor.internal.lifecycle.LifecycleMappingResolution.performIgnore(LifecycleMappingResolution.java:98)
	at org.eclipse.m2e.editor.internal.lifecycle.LifecycleMappingResolution.fix(LifecycleMappingResolution.java:74)
	at org.eclipse.m2e.core.ui.internal.markers.EditorAwareMavenProblemResolution.fix(EditorAwareMavenProblemResolution.java:59)
	at org.eclipse.m2e.core.ui.internal.markers.MavenProblemResolution.run(MavenProblemResolution.java:147)
	at org.eclipse.m2e.core.ui.internal.markers.MavenProblemResolution.run(MavenProblemResolution.java:118)
	at org.eclipse.ui.internal.genericeditor.markers.MarkerInformationControl$1$1.run(MarkerInformationControl.java:141)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

@jukzi
Copy link
Author

jukzi commented Nov 4, 2024

Can be reproduced by using the hover-quickfix (NOT the Prolems marker quickfix):
image

@nitind
Copy link

nitind commented Nov 14, 2024

Is there an example pom that can cause the Problem that you QuickFix to trigger this error?

@jukzi
Copy link
Author

jukzi commented Nov 14, 2024

Is there an example pom that can cause the Problem that you QuickFix to trigger this error?

\eclipse.platform.images\org.eclipse.images\pom.xml in the Platform workspace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants