binaryninja-api icon indicating copy to clipboard operation
binaryninja-api copied to clipboard

analysis fails to complete when load is called from some contexts

Open jim-carciofini opened this issue 1 year ago • 1 comments

Version and Platform (required):

  • Binary Ninja Version: 4.0.4958 (ddff9339) and dev version 4.1.5144
  • OS: macOS
  • OS Version: 13.6.6 (22G630)
  • CPU Architecture: M2

Bug Description: When calling load from the GUI event thread or a worker thread, analysis fails to complete.

Steps To Reproduce: See attached code fragment. It will add 4 menu items to the Plugins menu. Two exhibit the bug. Two show load working properly. The attached example binary was used, but I do not believe there is anything particular about this binary that causes the problem. I have seen the same behavior on other bins.

Expected Behavior: After load() and calling bv.update_analysis_and_wait() analysis should be complete and all function info should be available.

Screenshots: None

Additional Information: load-bug.zip

jim-carciofini avatar Apr 19 '24 19:04 jim-carciofini

I believe the load should not be called from the UI. It is meant for headless processing of files.

Waiting for a second eye on the issue to triage it

xusheng6 avatar Apr 23 '24 07:04 xusheng6