RaiMan / SikuliX1

SikuliX version 2.0.0+ (2019+)
https://sikulix.github.io
MIT License
2.79k stars 357 forks source link

Using SikuliX1 from a SWT thread #618

Open adriancostin6 opened 8 months ago

adriancostin6 commented 8 months ago

TL;DR: Deadlock on Linux GTK when calling SikuliX1 API functions from SWT application context: either main or separate thread. Screen and SWT Display seem to hate each other. 😀

Long story short, I am trying to use SikuliX1 from a SWT GUI thread, either directly, or via syncExec (starting a different thread), and I am running into a deadlock between the SWT event loop, and SikuliX1 features (mostly screen.selectRegion for now, but expecting more problems). It seems to get stuck somewhere in the OverlayCapture, or in the AWT getRGBPixelsImpl native method.

Question is, can I make SikuliX1 and the SWT event loop play nice with each other?