mandiant / Ghidrathon

The FLARE team's open-source extension to add Python 3 scripting to Ghidra.
Apache License 2.0
701 stars 54 forks source link

Ghidrathon and pyqt5 #108

Open anselor opened 2 weeks ago

anselor commented 2 weeks ago

I'm attempting to integrate an existing Python/PyQt tool as a Ghidra script plugin. When I launch a PyQt based dialog what I'm observing is that about half of the time the dialog runs correctly and half of the time I get a black window and then everything freezes. I tried just doing a simple message box alert and I get the same intermittent lock ups. I'm curious if anyone else has tried this or has any thoughts on what might be the issue.

williballenthin commented 2 weeks ago

My guess is that there's a deadlock somewhere between the Python GIL and the main threads for both Ghidra and Qt. I'm not sure what it will take to spawn windows from two GUI frameworks, since they'll each have their own event loops that will try to own everything.

Hopefully Im wrong though, since I haven't tried this myself.