Vector35 / binaryninja-api

Public API, examples, documentation and issues for Binary Ninja
https://binary.ninja/
MIT License
897 stars 200 forks source link

Incorrect value for "ghinja.ghidra_install_path" in ~/Library/Application Support/Binary Ninja/settings.json Causes Crash on Launch #5864

Open leaky-hub opened 3 weeks ago

leaky-hub commented 3 weeks ago

Version and Platform (required):

Bug Description: Prerequisite: Ghinja plugin is enabled. The ghinja plugin requires a valid value / path for "ghinja.ghidra_install_path" in settings.json in order for the application to launch correctly. Users that move the location of Ghidra and do not update the value / path will encounter a crash on launch.

Steps To Reproduce:

  1. Install the Ghinja plugin and have Ghidra installed / downloaded
  2. Close Binary Ninja
  3. After entering the initial location of analyzeHeadless.bat, move the Ghidra directory (e.g. from downloads to documents).
  4. Launch Binary Ninja
  5. Observe the warning to enter location of analyzeHeadless.bat: image
  6. Hit 'OK' and observe the "Binary Ninja quit unexpectedly." error: image

Expected Behavior: Users should be able to enter the new location of "analyzeHeadless.bat" with validation and / or if location is invalid, Binary Ninja should launch without crashing so the user can re-enter the correct path in the plugin settings.

Additional Information Users can fix this by going into ~/Library/Application Support/Binary Ninja/settings.json and readjusting the value of "ghinja.ghidra_install_path" to the correct one: image

xusheng6 commented 2 weeks ago

This is an issue in https://github.com/Martyx00/ghinja, which is third-party plugin that we do not control

plafosse commented 2 weeks ago

Please file an issue on the ghinja plugin repository. We will look into the crash as we shouldn't be crashing regardless.