summaryrefslogtreecommitdiffstats
path: root/idatui/launch.py
diff options
context:
space:
mode:
authorblasty <peter@haxx.in>2026-07-24 00:51:14 +0200
committerblasty <peter@haxx.in>2026-07-24 00:51:14 +0200
commitb043a2857a817ff551749b2c32ed9bcb0aa42085 (patch)
tree3339edb188be21d2c87d8eddd18568cb13f1a3ef /idatui/launch.py
parentnav: baseline horizontal scroll at 0 when jumping to a target column (diff)
downloadida-tui-b043a2857a817ff551749b2c32ed9bcb0aa42085.tar.gz
ida-tui-b043a2857a817ff551749b2c32ed9bcb0aa42085.tar.xz
ida-tui-b043a2857a817ff551749b2c32ed9bcb0aa42085.zip
robust: survive a lost server connection instead of crashing; auto-reconnect
Leaving the TUI idle could let the analysis server go away (idle exit, killed, box slept). The next action's worker then raised IDAConnectionError, which Textual escalated to a fatal app exit (exit_on_error) — the whole TUI crashed with a traceback. Now IdaTui._handle_exception intercepts a WorkerFailed whose cause is IDAConnectionError and, instead of dying, runs a reconnect: * show a "connection lost — reconnecting…" overlay; * _reconnect() restarts the supervisor if it's down (_ensure_server), makes a fresh client, re-opens the binary (open_path) or re-resolves the sole session, restarts the keepalive, and swaps in the new client/Program; * _after_reconnect rebuilds the function index and refreshes the current view with the new program; on failure it leaves a message and retries on the next action. A re-entry guard avoids stacking attempts when many in-flight calls fail at once. Any other exception still crashes as before. Also harden _status() to never throw (query_one can miss #status during a screen transition), so a status update can't take down a worker. Verified: injecting IDAConnectionError into a nav worker -> no crash, overlay shown, new Program swapped in, overlay cleared, post-reconnect calls work. Full pilot suite green.
Diffstat (limited to 'idatui/launch.py')
0 files changed, 0 insertions, 0 deletions