Vector35 / binaryninja-api

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

Crash on tab close after moving function out of component #5730

Closed D0ntPanic closed 2 months ago

D0ntPanic commented 2 months ago

Unfortunately this crash doesn't reliably occur and I've only been able to repro it on one box. Even there, it doesn't repro under the debugger or under ASAN.

ASSERT failure in QPersistentModelIndex::~QPersistentModelIndex: "persistent model indexes corrupted", file /Users/rwagner/projects/binaryninja/qt-build/build/src/qt/qtbase/src/corelib/itemmodels/qabstractitemmodel.cpp, line 839

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x1927faa60 __pthread_kill + 8 1 libsystem_pthread.dylib 0x192832c20 pthread_kill + 288 2 libsystem_c.dylib 0x19273fa30 abort + 180 3 libQt6Core_debug.6.6.1.dylib 0x10b7590a0 qAbort() + 16 4 libQt6Core_debug.6.6.1.dylib 0x10b78a43c void qt_message_fatal<QString&>(QtMsgType, QMessageLogContext const&, QString&) + 32 5 libQt6Core_debug.6.6.1.dylib 0x10b77c650 qt_message(QtMsgType, QMessageLogContext const&, char const, char) + 436 6 libQt6Core_debug.6.6.1.dylib 0x10cce98ac QMessageLogger::fatal(char const, ...) const + 364 7 libQt6Core_debug.6.6.1.dylib 0x10cce7b64 qt_assert_x(char const, char const, char const, int) + 400 8 libQt6Core_debug.6.6.1.dylib 0x10c806b8c QAbstractItemModelPrivate::removePersistentIndexData(QPersistentModelIndexData) + 552 9 libQt6Core_debug.6.6.1.dylib 0x10c806930 QPersistentModelIndexData::destroy(QPersistentModelIndexData) + 236 10 libQt6Core_debug.6.6.1.dylib 0x10c807194 QPersistentModelIndex::~QPersistentModelIndex() + 244 11 libQt6Core_debug.6.6.1.dylib 0x10c807210 QPersistentModelIndex::~QPersistentModelIndex() + 28 12 libQt6Widgets_debug.6.6.1.dylib 0x109baf5ec QHashPrivate::Node<QPersistentModelIndex, QHashDummyValue>::~Node() + 28 13 libQt6Widgets_debug.6.6.1.dylib 0x109baf5c0 QHashPrivate::Node<QPersistentModelIndex, QHashDummyValue>::~Node() + 28 14 libQt6Widgets_debug.6.6.1.dylib 0x109baf4e4 QHashPrivate::Span<QHashPrivate::Node<QPersistentModelIndex, QHashDummyValue>>::freeData() + 364 15 libQt6Widgets_debug.6.6.1.dylib 0x109baf368 QHashPrivate::Span<QHashPrivate::Node<QPersistentModelIndex, QHashDummyValue>>::~Span() + 28 16 libQt6Widgets_debug.6.6.1.dylib 0x109baf33c QHashPrivate::Span<QHashPrivate::Node<QPersistentModelIndex, QHashDummyValue>>::~Span() + 28 17 libQt6Widgets_debug.6.6.1.dylib 0x109baf2e8 QHashPrivate::Data<QHashPrivate::Node<QPersistentModelIndex, QHashDummyValue>>::~Data() + 240 18 libQt6Widgets_debug.6.6.1.dylib 0x109baf1e8 QHashPrivate::Data<QHashPrivate::Node<QPersistentModelIndex, QHashDummyValue>>::~Data() + 28 19 libQt6Widgets_debug.6.6.1.dylib 0x109bcd8a4 QHash<QPersistentModelIndex, QHashDummyValue>::clear() + 256 20 libQt6Widgets_debug.6.6.1.dylib 0x109b66968 QSet::clear() + 24 21 libQt6Widgets_debug.6.6.1.dylib 0x109cffa7c QTreeView::setModel(QAbstractItemModel) + 1284 22 libbinaryninjaui.1.dylib 0x1101f8ed8 ComponentTreeView::setModel(QAbstractItemModel) + 1356 (componenttree.cpp:2497) 23 libbinaryninjaui.1.dylib 0x110205728 ComponentTree::~ComponentTree() + 436 (componenttree.cpp:2900) 24 libbinaryninjaui.1.dylib 0x1102058e4 ComponentTree::~ComponentTree() + 28 (componenttree.cpp:2899) 25 libbinaryninjaui.1.dylib 0x110205970 ComponentTree::~ComponentTree() + 28 (componenttree.cpp:2899) 26 libQt6Core_debug.6.6.1.dylib 0x10bc8bf88 QObjectPrivate::deleteChildren() + 768 27

D0ntPanic commented 2 months ago

This bug is also present in 4.0.4911

bpotchik commented 2 months ago

Possibly fixed on fix_component_removal_crash

D0ntPanic commented 2 months ago

Confirmed fixed. Fixed in 4.1.5738.