技能 2026-09-16 17:39 UTC
ghidra-rpcv0.2.0
版本【0.2.0】由提交人 guyru 提交,主要更新类型为:功能特性新增与扩展。提交说明:Fix GUI mode on Windows: unconditional 240s timeout on every project open。为项目引入了新的能力与模块支持。
Commit提交信息原文
Fix GUI mode on Windows: unconditional 240s timeout on every project open GuiContext._wait_for_project() polls AppInfo.getActiveProject() and matches it against the requested project via ProjectLocator.getLocation(). That method is URL-derived and on Windows returns a leading slash before the drive letter (/C:/test/, the file:///C:/test/ convention) — pathlib parses that as drive-relative (WindowsPath('C:test'), no root) rather than absolute, so it can never equal the expected absolute path. This made the match unconditionally False on Windows, for every project, every time: _wait_for_project always ran out its full 240s and raised, even when Ghidra had opened the exact right project within seconds. Confirmed on a real Windows VM by watching a normal, successfully-opened Ghidra project window while `status` still reported running: false. GUI mode was documented as merely "unverified" on Windows; it was actually broken outright. Fixed by GuiContext._normalize_project_location(), which strips the leading slash before comparing (no-op on POSIX). Verified end-to-end on the same VM: start, load, and goto all confirmed working against a live GUI session, including watching the Ghidra window actually navigate to a function on `goto`. Also fixes forward: a crashed GUI daemon can leave a zombie process holding the project lock (the JVM's Swing threads can keep a process alive after Python's main thread exits on error), which surfaced as a second, unrelated failure while diagnosing this — documented as a new gotcha rather than coded around, since it's an operational trap rather than a bug with a fix. Adds tests/test_gui_context.py (pure Python, no Ghidra needed, using a fake ProjectLocator) covering the path-normalization logic directly. Full integration suite (112 tests) still passes on Windows after this change. With this fix, Windows support is complete in both headless and GUI mode. CHANGELOG.md's Unreleased section is consolidated into one "Full Windows support" entry covering transport, daemon lifecycle, GUI mode, and CI, rather than scattered across separate Added/Fixed bullets.