Repository navigation
Fix IDA freezing on live function queries - #54
Merged
Merged
Conversation
With Live Function Queries on, moving to another function froze IDA for good. A stack dump of the hung IDA 9.4 showed the main thread inside ida_kernwin.register_timer, called by run_request from the live query that the cursor-settle timer's callback had started, with all request workers idle. Registering an IDA timer inside another timer's callback does not return. It only happened when no delivery timer was running yet, which is why fetching data from a button never hung. Workers now wake the main thread through a queued Qt signal on an object created there, and the backend drains the result queue in that slot. No request registers an IDA timer any more; the nested-dialog guard and close() keep their behaviour. Tests: the backend fixture's register_timer raises, a regression test starts a request inside a timer callback, and a PySide6 test checks that a wake from a worker runs the callback on the main thread. The GUI integration now lets IDA's view hook and settle timer start the refresh after jumpto instead of calling refresh_widget directly, which is the path that hung. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
CI runs IDA without a disassembly view, so the view-hook path never ran there. Starting the refresh inside a real IDA timer callback covers the pattern that hung: run_request called from a timer. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Collaborator
Author
|
Checked by hand in IDA 9.4 on Linux: with |
r0ny123
pushed a commit
to r0ny123/mcrit-plugin
that referenced
this pull request
Oct 15, 2026
Fixes IDA freezing for good on live function queries, introduced in 2.1.0 (familiary#54). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With Live Function Queries on, moving to another function (e.g. double clicking one in a list) could freeze IDA 2.1.0 for good.
Cause. A
py-spy dumpof the hung IDA 9.4 shows the main thread stuck inida_kernwin.register_timer:All four
mcrit-request-*workers were idle and waiting for work, so no Python lock was involved. The cursor-settle timer's callback started the live query, andrun_requestregistered IDA's result-delivery timer from inside it. That call never returns. It only happened when no delivery timer was running yet, which is why fetching data from a button never hung. Both timers came with #41.Fix.
IdaBackendno longer uses an IDA timer to deliver results. Each worker wakes the main thread through a queued Qt signal (_main_thread_waker, created on the main thread), and_deliverdrains the result queue in that slot. The nested-dialog guard andclose()work as before. The cursor-settle timer itself is unchanged; its callback now starts a request without registering anything.Tests
register_timernow raises, so no test can pass by registering an IDA timer. A new regression test starts a request inside a timer callback._navigate_tonow lets IDA's view hook and settle timer start the refresh afterjumpto, instead of callingrefresh_widgetdirectly. This is the path that hung, and it was never exercised before.CHANGELOG.mdhas aFixedentry, andAGENTS.mdnow describes the new delivery mechanism.🤖 Generated with Claude Code