SWTException Invalid Thread Access for IF-Loop with "loose ends"


I happen to erratically and thus not reproducible encounter “SWTException Invalid Thread Access” when using any if loop (Knime and Community If-Nodes).

Based on what I experience I suppose the “loose ends”, i.e. a Table Creator, is or was already executed before the if-node was evaluated. Hence, resulting in a partially executed loop. As follows to examples.

I believe this is happening in larger quantities in the recent past as the setup had not changed but Knime got updated. In the past months to years the SWTException Invalid Thread Access was not thrown. Only when connecting all incoming data “branches” or manually re-executing after the IF was evaluated, the entire if-loop get properly disabled, though.

Example 1

Example 2

Manually re-executed to disable nodes

Edit: managed to get the exception log

BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments:  -os linux -ws gtk -arch x86_64

Sat May 14 11:31:30 CEST 2022
Unhandled event loop exception

org.eclipse.swt.SWTException: Widget is disposed
	at org.eclipse.swt.SWT.error(SWT.java:4889)
	at org.eclipse.swt.SWT.error(SWT.java:4804)
	at org.eclipse.swt.SWT.error(SWT.java:4775)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:555)
	at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:470)
	at org.eclipse.swt.widgets.Control.redraw(Control.java:4584)
	at org.knime.workbench.editor2.directannotationedit.FlatButton.lambda$0(FlatButton.java:388)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:5067)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4573)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1157)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	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:644)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156)
	at org.knime.product.rcp.KNIMEApplication.start(KNIMEApplication.java:183)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
	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(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1461)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1434)

Session Data
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments:  -os linux -ws gtk -arch x86_64

Any idea?

Many thanks in advance

Hi Mike,

apologies for the late reply. And thanks for grabbing the eclipse logs.
Figuring this one out probably is very hard without being able to reliably reproduce the issue, but what may help is the call stack from the KNIME log file, should the issue come up again. That may show more details on the error the node ran into before eclipse caught the exception. You can view the log via View → Open KNIME log.

Kind regards

1 Like

Hi Marvin,

same for me, too busy / quite distracted in the past to properly reply. Though, thanks for your feedback. Unfortunately I do not have access any more to the workflow since I started a new tenure lately. Given that it was difficult to replicate I only managed to pull that much information as shared before.

Assuming this isn’t enough I’d propose we close this thread.



Hi Mike,

thanks for following up, despite all that is going on on your side. Then let’s close this case for the time being.
All the best and good luck in your new position.

Kind regards

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.