From c1a970b68f70d536d8196c07e9163c1ef41ed5c8 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Tue, 26 May 2026 16:52:30 -0400 Subject: [WARP] Fix race condition with sidebar deletion with analysis completion event callback --- plugins/warp/ui/plugin.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/warp/ui/plugin.cpp b/plugins/warp/ui/plugin.cpp index 93900ed9..fad46a98 100644 --- a/plugins/warp/ui/plugin.cpp +++ b/plugins/warp/ui/plugin.cpp @@ -9,6 +9,7 @@ #include #include +#include #include using namespace BinaryNinja; @@ -170,11 +171,13 @@ WarpSidebarWidget::WarpSidebarWidget(BinaryViewRef data) : SidebarWidget("WARP") this->setLayout(layout); // Do a full update if analysis has been done, otherwise we may persist old data and not have new data. - m_analysisEvent = new AnalysisCompletionEvent(m_data, [this]() { ExecuteOnMainThread([this]() { Update(); }); }); + m_analysisEvent = new AnalysisCompletionEvent(m_data, [this]() { + QMetaObject::invokeMethod(this, [this]() { Update(); }); + }); m_fetcher = WarpFetcher::Global(); m_callbackId = m_fetcher->AddCompletionCallback([this]() { - ExecuteOnMainThread([this]() { + QMetaObject::invokeMethod(this, [this]() { // Instead of doing a full update after fetching, we only want to make sure the current function has // up-to-date matches, since the other two tabs (all matches, container list) do not get populated with // additional information or manage their own updates (e.g. container source list). -- cgit v1.3.1