UiPathBridge Thread is blocking shutdown of the JVM

Hello

I am running a completly separate and independant JavaFX application and the UiPathBridge Thread seeme to prevent the JVM to shutdown.

Below the threads of the JVM while the JavaFX is running

Below the threads of the JVM once the JavaFX application has exited

Since the UiPathBridge is a User thread and not a Daemon thread, the JVM never shutdowns, I am contraint to kill it by hand.

Regards

There is no place to declare such issue, so I put it in the Activities feedback.

Hi @fandre

Does this issue happen also outside the Eclipse environment?

Yes. Moreover, I rollback the change made by UiPath in C:\Program Files\Java\jdk1.8.0_181\jre\lib\accessibility.properties, and the problem disappears. IMHO, the UiPathBridgeThread should be a Deamon thread and not a User thread.

You can reproduce this issue with this Terminal Emulator: dm3270

A fast workaround is to remove the line from accessible.properties and pass it (via command line parameters) only to apps that are based on Swing / AWT. It is strange that the dm3270 app loads awt.dll and maybe that’s one reason why the above issue happens. I tested with other JavaFX apps, that don’t load awt.dll and I could not reproduce the problem.

Agreed on the fast workaround, but IMHO, this should be fixed in a short coming release of UiPath since the dm3270 apps will be delivred as part a software suite which will starts many time this dm3270 package, with the risk to saturate the JVM thread pool.

Interesting fact: loading the accessible bridge from oracle (Java Access Bridge | Power Users Knowledge Base | ALT Academy description) triggers the same behavior with dm application. However, in this case, the thread is a daemon thread (middle one in the picture):


I believe JavaFX apps should not try to load the extensions from lib\ext folder. In dm app case, here, dm3270/Screen.java at master · Neticoa/dm3270 · GitHub, they are using the Toolkit from awt only for a beep functionality, which I believe can be easily achieved without loading the awt.dll. When they call the getDefaultToolkit method, then the assistive technologies are loaded into the app (at the end of the method):

So, it looks like it’s not an UiPath specific stuff…

Similar issues:

https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8175977