Skip to content

Instrument Ghidra GUI with Pyhidra : FrontEndTool.setActiveProject crash with Active Workspace cannot be null #7398

Closed Answered by VincentDary
VincentDary asked this question in Q&A
Discussion options

You must be logged in to vote

Finally solved using only GhidraProject and closing program to avoid warning message in the GUI.

import threading
import time
import os
import shutil
import pathlib
import pyhidra
import jpype


def is_ghidra_gui_up() -> bool:
    try:
        if jpype.isJVMStarted():
            from ghidra.framework import Application
            from ghidra.framework.main import AppInfo
            if Application.isInitialized() and AppInfo.getFrontEndTool():
                return True
    except:
        pass
    return False


################################################################################
# Setup ghidra GUI
###########################################################################…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by VincentDary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant