Vector35 / binaryninja-api

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

analysis fails to complete when load is called from some contexts #5302

Open jim-carciofini opened 5 months ago

jim-carciofini commented 5 months ago

Version and Platform (required):

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

xusheng6 commented 5 months ago

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