Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lag/stalls when filtering tree on macOS #52

Open
charliebruce opened this issue Dec 31, 2023 · 1 comment
Open

Lag/stalls when filtering tree on macOS #52

charliebruce opened this issue Dec 31, 2023 · 1 comment

Comments

@charliebruce
Copy link

charliebruce commented Dec 31, 2023

Description
I see a long (30-60+ second?) UI lockup when the filter in the Symbol Tree is short, eg a single character or a couple (I test with "m" or "ma"). After this delay, the tree is filtered as expected. With the filter entered, renaming a label will cause the same sort of lag to appear.

I also notice:

  • "Unexpected error processing job: GTreeFilterTask" in the main window
  • "Expanding nodes..." progress bar stalls
  • This only seems to happen when searching the first couple of characters - after this, the filter is responsive.

I initially thought that this was a Ghidra bug, but when I was filling out the bug report I realised that with this extension disabled, the issue went away.

I only see this issue on macOS, it works perfectly on Windows.

To Reproduce

  1. Open Code Browser with a reasonably large executable. (This can be seen both in an executable that does and doesn't use EE, as long as this plugin is enabled)
  2. Click on "Filter" box
  3. Type any single letter or short sequence, eg "m" or "ma"
  4. Observe that the UI stalls for 30-60 seconds and that the below error appears in the log
  5. Rename a label
  6. Observe that the UI again stalls until a timeout is hit

Environment

  • OS: macOS Sonoma 14.1.2
  • Java Version: openjdk 21.0.1 2023-10-17
  • Ghidra Version: 11.0
  • Ghidra Origin: installed from brew package manager
  • Extensions: ghidra-emotionengine-reloaded - v2.1.12

Log

2023-12-30 | 19:09:07 | ERROR | (Swing) Timed-out waiting to run a Swing task--potential deadlock!
-- | -- | -- | --
  |   |   | Threads State:
  |   |   | java.lang.Throwable
2023-12-30 | 19:09:07 | ERROR | (AbstractWorker) Unexpected error processing job: GTreeFilterTask java.lang.RuntimeException: Timed-out waiting to run a Swing task--potential deadlock!
  |   |   | at ghidra.util.Swing.runNow(Swing.java:177)
  |   |   | at docking.widgets.tree.GTreeTask.runOnSwingThread(GTreeTask.java:45)
  |   |   | at docking.widgets.tree.tasks.GTreeExpandAllTask.expandPath(GTreeExpandAllTask.java:90)
  |   |   | at docking.widgets.tree.tasks.GTreeExpandAllTask.expandNode(GTreeExpandAllTask.java:80)
  |   |   | at docking.widgets.tree.tasks.GTreeExpandAllTask.expandNode(GTreeExpandAllTask.java:84)
  |   |   | at docking.widgets.tree.tasks.GTreeExpandAllTask.expandNode(GTreeExpandAllTask.java:84)
  |   |   | at docking.widgets.tree.tasks.GTreeExpandAllTask.run(GTreeExpandAllTask.java:45)
  |   |   | at docking.widgets.tree.GTreeFilterTask.expandInSameTask(GTreeFilterTask.java:77)
  |   |   | at docking.widgets.tree.GTreeFilterTask.run(GTreeFilterTask.java:58)
  |   |   | at ghidra.util.worker.AbstractWorker$JobCallback.process(AbstractWorker.java:133)
  |   |   | at ghidra.util.worker.AbstractWorker$JobCallback.process(AbstractWorker.java:123)
  |   |   | at generic.concurrent.ConcurrentQ$CallbackCallable.call(ConcurrentQ.java:658)
  |   |   | at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
  |   |   | at generic.concurrent.FutureTaskMonitor.run(FutureTaskMonitor.java:76)
  |   |   | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
  |   |   | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
  |   |   | at java.base/java.lang.Thread.run(Thread.java:1583)
  |   |   | Caused by: ghidra.util.exception.UnableToSwingException: Timed-out waiting for Swing thread lock in 20 SECONDS
  |   |   | at ghidra.util.Swing.waitFor(Swing.java:256)
  |   |   | at ghidra.util.Swing.runNow(Swing.java:235)
  |   |   | at ghidra.util.Swing.runNow(Swing.java:163)
@chaoticgd
Copy link
Owner

I should've probably posted this when you first filed the bug, but the reason I haven't responded is because I don't have any idea how to fix this. I'll keep this open in case anyone else has the same issue, or in case someone finds a solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants