diff options
| author | blasty <blasty@local> | 2026-07-24 00:51:14 +0200 |
|---|---|---|
| committer | blasty <blasty@local> | 2026-07-24 00:51:14 +0200 |
| commit | 9b68b6ea6976720e57e95ba27335031ed7ee6109 (patch) | |
| tree | cb0e29ca5bfc9b5e8ab0393333ed1fdbf0af6843 /experiments | |
| parent | nav: baseline horizontal scroll at 0 when jumping to a target column (diff) | |
| download | ida-tui-9b68b6ea6976720e57e95ba27335031ed7ee6109.tar.gz ida-tui-9b68b6ea6976720e57e95ba27335031ed7ee6109.tar.xz ida-tui-9b68b6ea6976720e57e95ba27335031ed7ee6109.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 'experiments')
0 files changed, 0 insertions, 0 deletions
