Vector35 / Vector35/blob_extractor
Exception on calling ctypes callback function
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 29
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
When using the plugin, I'm getting this error most of the time (I'm not quite sure what the condition is):
[ScriptingProvider] Exception ignored on calling ctypes callback function <function _ThreadActionContext.__init__.<locals>.<lambda> at 0x7f73a5efcfe0>:
[ScriptingProvider] Traceback (most recent call last):
[ScriptingProvider] File "/home/whitequark/Applications/binaryninja/plugins/../python/binaryninja/scriptingprovider.py", line 70, in <lambda>
[ScriptingProvider] self.callback = ctypes.CFUNCTYPE(None, ctypes.c_void_p)(lambda ctxt: self.execute())
[ScriptingProvider] File "/home/whitequark/Applications/binaryninja/plugins/../python/binaryninja/scriptingprovider.py", line 78, in execute
[ScriptingProvider] self.func()
[ScriptingProvider] File "/home/whitequark/.binaryninja/repositories/official/plugins/Vector35_blobextractor/sidebar.py", line 347, in <lambda>
[ScriptingProvider] execute_on_main_thread(lambda: self._handleExtractResults(fileReports, tempDir))
[ScriptingProvider] File "/home/whitequark/.binaryninja/repositories/official/plugins/Vector35_blobextractor/sidebar.py", line 294, in _handleExtractResults
[ScriptingProvider] self.filesTreeModel.removeRows(0, self.filesTreeModel.rowCount())
[ScriptingProvider] RuntimeError: Internal C++ object (TreeModel) already deleted.
I'm using BN version 5.0.7265-dev Ultimate (bc6ea9d2) on Debian trixie amd64. I can't seem to easily reproduce the conditions which causes this, but it's probably related to navigating away from the blob extractor sidebar while an extraction is running.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with python/binaryninja/scriptingprovider.py around the ctypes callback and plugins/Vector35_blobextractor/sidebar.py around _handleExtractResults and execute_on_main_thread. Try extracting while navigating away from the blob extractor sidebar, then inspect how the deleted TreeModel is handled. Done means the reported callback exception no longer occurs in that scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100