You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[search_debug_actions] long-running queries block the game's main thread #6
rimworld/search_debug_actionsblocks the game's main thread for a long time when searching with broad keywords (e.g. Recalculate), which causes:
Game freeze/hang: animation and input become unresponsive, frame rate collapses, and system-level AppHang detection can be triggered;
MCP-side request timeout at 30s (tools/call timeout of 30000ms), leaving the tool call stuck;
Other main-thread-based debug features in-game (UnityExplorer, debug menu, etc.) are likewise unavailable during the search.
I have tried writing a similar solution (reinventing the wheel), which solved this problem to some extent. Here is a document for your reference. issue-search-debug-actions.en.md
Fixed by #10 (thanks @beverage), merged for the next release.
The cause was that search opened every generated submenu (childGetter), such as the per-def spawn lists and the quest generators, which test-run quest scripts. Search now walks only the static tree; generated submenus are listed with expandable=true and their entries become searchable once something opens them, for example list_debug_action_children on Actions\Spawn thing.... The time-budgeted breadth-first walk from 2.2.0 stays as a guard.
Measured on RimWorld 1.6 with DLCs and 30 mods: Recalculate 16 ms on the main menu, Toggle Job Logging and Generate quest 16-17 ms in a colony, 2,193 nodes searched. After opening Spawn thing... (1,407 entries, 30 ms) a search covers 3,600 nodes in 32 ms.
@Timer80, you asked for a note on your repository once this was fixed; I'll leave that to you to pick up from here.
Activity
pardeike commentedon Oct 7, 2026
Fixed by #10 (thanks @beverage), merged for the next release.
The cause was that search opened every generated submenu (
childGetter), such as the per-def spawn lists and the quest generators, which test-run quest scripts. Search now walks only the static tree; generated submenus are listed withexpandable=trueand their entries become searchable once something opens them, for examplelist_debug_action_childrenonActions\Spawn thing.... The time-budgeted breadth-first walk from 2.2.0 stays as a guard.Measured on RimWorld 1.6 with DLCs and 30 mods:
Recalculate16 ms on the main menu,Toggle Job LoggingandGenerate quest16-17 ms in a colony, 2,193 nodes searched. After openingSpawn thing...(1,407 entries, 30 ms) a search covers 3,600 nodes in 32 ms.@Timer80, you asked for a note on your repository once this was fixed; I'll leave that to you to pick up from here.