Vector35 / Vector35/binaryninja-api

Binary ninja crashes when using custom BinaryView plugin

Open
#7,011 1 comment 0 reactions 1 assignee View on GitHub

@plafosse is already working on this.

Since Jul 1, 2025.

State: Awaiting Triage
Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

Description

Version and Platform (required):

  • Binary Ninja Version: 5.0.7648 Personal, e79b961f
  • OS: macos
  • OS Version: 15.5
  • CPU Architecture: arm64

Bug Description:

Binary ninja crashes when attempting to save the database.

Steps To Reproduce:

I wrote a (Python) BinaryView plugin which loads a custom executable format: creating segments and sections, performing relocations and handling win32 API imports. When clicking save I get prompted to chose between writing back the modified file or saving an analysis database. After selecting analysis database and picking a file name binary ninja crashes.

Expected Behavior:

No crashes when saving the database.

Screenshots:

Additional Information:

Stack trace from the Apple crash report:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libbinaryninjacore.1.dylib 0x115fa38b8 0x115400000 + 12204216
1 libbinaryninjacore.1.dylib 0x11583c650 0x115400000 + 4441680
2 libbinaryninjacore.1.dylib 0x115840040 0x115400000 + 4456512
3 libbinaryninjacore.1.dylib 0x115bc371c 0x115400000 + 8140572
4 QtCore 0x10474e8dc QObject::event(QEvent*) + 104
5 QtGui 0x103de118c QGuiApplication::event(QEvent*) + 728
6 QtWidgets 0x1036b1be4 QApplication::event(QEvent*) + 684
7 QtWidgets 0x1036b345c QApplicationPrivate::notify_helper(QObject*, QEvent*) + 336
8 QtWidgets 0x1036b4424 QApplication::notify(QObject*, QEvent*) + 508
9 QtCore 0x104707ec4 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 200
10 QtCore 0x104708fec QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 528
11 libqcocoa.dylib 0x10178be68 QCocoaEventDispatcherPrivate::processPostedEvents() + 360
12 libqcocoa.dylib 0x10178a404 QCocoaEventDispatcher::processEvents(QFlagsQEventLoop::ProcessEventsFlag) + 732
13 libbinaryninjaui.1.dylib 0x102fa9eb4 ProgressTask::wait() + 300
14 binaryninja 0x10013746c 0x100044000 + 996460
15 binaryninja 0x100139100 0x100044000 + 1003776
16 binaryninja 0x10013930c 0x100044000 + 1004300
17 libbinaryninjaui.1.dylib 0x102d287fc UIActionHandler::executeAction(QString const&, UIActionContext const&) + 300
18 libbinaryninjaui.1.dylib 0x102d287ac UIActionHandler::executeAction(QString const&, UIActionContext const&) + 220
19 libbinaryninjaui.1.dylib 0x102d287ac UIActionHandler::executeAction(QString const&, UIActionContext const&) + 220
20 libbinaryninjaui.1.dylib 0x102d287ac UIActionHandler::executeAction(QString const&, UIActionContext const&) + 220
21 libbinaryninjaui.1.dylib 0x102d287ac UIActionHandler::executeAction(QString const&, UIActionContext const&) + 220
22 libbinaryninjaui.1.dylib 0x102d63b2c 0x102ce8000 + 506668
23 QtCore 0x104756814 void doActivate(QObject*, int, void**) + 1392
24 QtGui 0x10411e9e8 QAction::activate(QAction::ActionEvent) + 368
25 QtCore 0x10474eb0c QObject::event(QEvent*) + 664
26 QtWidgets 0x1036b345c QApplicationPrivate::notify_helper(QObject*, QEvent*) + 336
27 QtWidgets 0x1036b4424 QApplication::notify(QObject*, QEvent*) + 508
28 QtCore 0x104707ec4 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 200
29 QtCore 0x104708fec QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 528
30 libqcocoa.dylib 0x10178be68 QCocoaEventDispatcherPrivate::processPostedEvents() + 360
31 libqcocoa.dylib 0x10178d0c0 QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void*) + 476
32 CoreFoundation 0x198669cd4 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 28
33 CoreFoundation 0x198669c68 __CFRunLoopDoSource0 + 172
34 CoreFoundation 0x1986699d4 __CFRunLoopDoSources0 + 232
35 CoreFoundation 0x198668628 __CFRunLoopRun + 840
36 CoreFoundation 0x198667c58 CFRunLoopRunSpecific + 572
37 HIToolbox 0x1a40fc27c RunCurrentEventLoopInMode + 324
38 HIToolbox 0x1a40ff31c ReceiveNextEventCommon + 216
39 HIToolbox 0x1a428a484 _BlockUntilNextEventMatchingListInModeWithFilter + 76
40 AppKit 0x19c58fab4 _DPSNextEvent + 684
41 AppKit 0x19cf2e5b0 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 688
42 AppKit 0x19c582c64 -[NSApplication run] + 480
43 libqcocoa.dylib 0x10178a998 QCocoaEventDispatcher::processEvents(QFlagsQEventLoop::ProcessEventsFlag) + 2160
44 QtCore 0x104711984 QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) + 596
45 QtCore 0x1047086ec QCoreApplication::exec() + 216
46 binaryninja 0x10010265c 0x100044000 + 779868
47 dyld 0x1981deb98 start + 6076

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.