agung-m / sshtunnel-ng

SSH Tunnel NG - A user-friendly, fast, reliable, and cross-platform SSH tunnel manager
Apache License 2.0
16 stars 1 forks source link

Connection throws SWT invalid thread access #2

Closed Balls0fSteel closed 3 months ago

Balls0fSteel commented 9 months ago

So I don't know where I am messing up.

1) I added a new target. I specified IP, port, key file. 2) I clicked Connect All and the green bar just keeps going on.

So I opened cmd to check the output:

Sep 17, 2023 10:23:25 PM org.programmerplanet.sshtunnel.ui.SessionConnectionMonitor run
WARNING: Connection monitor is now running..
Sep 17, 2023 10:23:29 PM org.programmerplanet.sshtunnel.model.ConnectionManager connect
INFO: Connecting session: Session (main: root@1.2.3.4)
Exception in thread "Thread-2" org.eclipse.swt.SWTException: Invalid thread access
        at org.eclipse.swt.SWT.error(Unknown Source)
        at org.eclipse.swt.SWT.error(Unknown Source)
        at org.eclipse.swt.SWT.error(Unknown Source)
        at org.eclipse.swt.widgets.Widget.error(Unknown Source)
        at org.eclipse.swt.widgets.Widget.checkWidget(Unknown Source)
        at org.eclipse.swt.widgets.Dialog.checkParent(Unknown Source)
        at org.eclipse.swt.widgets.Dialog.<init>(Unknown Source)
        at org.eclipse.swt.widgets.MessageBox.<init>(Unknown Source)
        at org.programmerplanet.sshtunnel.ui.DefaultUserInfo.promptYesNo(DefaultUserInfo.java:79)
        at com.jcraft.jsch.Session.checkHost(Session.java:929)
        at com.jcraft.jsch.Session.connect(Session.java:359)
        at org.programmerplanet.sshtunnel.model.ConnectionManager.connect(ConnectionManager.java:120)
        at org.programmerplanet.sshtunnel.ui.SshTunnelComposite$9.run(SshTunnelComposite.java:622)
        at java.lang.Thread.run(Unknown Source)

OS: Windows 11 Pro x86_64 22H2 22621.2283 Java:

java version "1.8.0_381"
Java(TM) SE Runtime Environment (build 1.8.0_381-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.381-b09, mixed mode)

Let me know if I can provide anything else.

Ps.: Feel free to delete the other "issue" I opened. I started typing, pressed numpad enter and it posted my ticket. Sorry.

agung-m commented 3 months ago

Thanks for reporting this with the stack trace. The commit 9d34e99 fixed this, and will be released in v0.6.