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

Freeze on Clear Type

Open utkonos opened this issue 1 year ago • 2 comments

Version and Platform (required):

  • Binary Ninja Version: 4.0.4958
  • OS: macOS
  • OS Version: 14.4.1
  • CPU Architecture: x64

Bug Description: Using the right click menu in the Variables pane to clear a type causes a beachball freeze requiring an OS force quit.

Steps To Reproduce:

  1. Open this file: f169750c922fd27298748f97c1a9e2b8442fb4d2d5d85f35f61528c4df6b3718
  2. Goto: 0x404d90
  3. Select "__saved_ebx"
  4. Right click "Change Type"
  5. No need to actually change type, just click "Accept"
  6. In variables pane, select "__saved_ebx"
  7. Right click "Clear"
  8. Select "Type"
  9. Beachball freeze

Expected Behavior: Clear variable type

Video: The beachball mouse cursor is not captured by the screen capture software, but I dragged the force quit dialog into view to show that the process was frozen. https://github.com/Vector35/binaryninja-api/assets/2775739/0bed81aa-dba6-430e-8d7b-2b97b2c77b42

utkonos avatar Apr 11 '24 22:04 utkonos

Can confirm. Looks like there is deadlock creating the Undo Actions for the Clear action.

Details: The UI is in a worker thread, waiting on the main thread to commit the undo actions, while holding the analysis lock due to running inside an analysis completion event. The main thread is waiting on the analysis lock since the undo action being committed needs to describe itself, so the main thread cannot complete main thread actions...

CouleeApps avatar Apr 11 '24 22:04 CouleeApps

V35 folks should search for sealants antonymy assuaged paraskiing incuse to find the binary

xusheng6 avatar Apr 17 '24 03:04 xusheng6

This is fixed in >= 4.1.5394 by having the analysis completion event spawn a main thread task to clear the type, instead of doing it directly in the event.

CouleeApps avatar May 31 '24 18:05 CouleeApps