From f8d1cf556689c87596867fa3a2be77ce41d59b9f Mon Sep 17 00:00:00 2001 From: dragonmacher <48328597+dragonmacher@users.noreply.github.com> Date: Thu, 2 Oct 2025 18:50:11 -0400 Subject: [PATCH] GP-6040 - Fixed stack trace in table add/remove job under heavy analysis --- .../table/threaded/CoalescingAddRemoveStrategy.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Ghidra/Framework/Docking/src/main/java/docking/widgets/table/threaded/CoalescingAddRemoveStrategy.java b/Ghidra/Framework/Docking/src/main/java/docking/widgets/table/threaded/CoalescingAddRemoveStrategy.java index 31ed1cf671..f765c8ecac 100644 --- a/Ghidra/Framework/Docking/src/main/java/docking/widgets/table/threaded/CoalescingAddRemoveStrategy.java +++ b/Ghidra/Framework/Docking/src/main/java/docking/widgets/table/threaded/CoalescingAddRemoveStrategy.java @@ -259,9 +259,10 @@ public class CoalescingAddRemoveStrategy implements TableAddRemoveStrategy return data; } - // Copy to a new list those items that are not marked for removal. This saves a list move - // time a remove takes place - List newList = new ArrayList<>(data.size() - toRemove.size()); + // Copy to a new list those items that are not marked for removal. This saves a potential + // list move operation every time a remove takes place. + // Note: sometimes the items passed here in the toRemove set may not actually be in the data + List newList = new ArrayList<>(); for (int i = 0; i < data.size(); i++) { if (monitor.isCancelled()) { return newList;