debugger icon indicating copy to clipboard operation
debugger copied to clipboard

Crash in Python script

Open xusheng6 opened this issue 8 months ago • 2 comments

The script

from binaryninja import load
from binaryninja.debugger import DebuggerController

with load("/bin/true") as bv:
    dc = DebuggerController(bv)

crashes with:

Exception ignored in: <function DebuggerController.__del__ at 0x10998ade0>
Traceback (most recent call last):
  File "/Users/xxxxx/build-relwithdebinfo/out/binaryninja.app/Contents/Resources/python/binaryninja/debugger/debuggercontroller.py", line 1585, in __del__
TypeError: 'NoneType' object is not callable

xusheng6 avatar Mar 27 '25 08:03 xusheng6

The crash happens at https://github.com/Vector35/debugger/blob/58537bf244fa9d252a166ec61c78cb169eaa2e60/api/python/debuggercontroller.py#L1583-L1585

xusheng6 avatar Mar 27 '25 08:03 xusheng6

  1. This has nothing to do with the context manager
  2. This has nothing to do with the Python version
  3. The debugger unit test has some very similar code, and it just passes fine

xusheng6 avatar Mar 27 '25 08:03 xusheng6