边缘世界 RimWorld

边缘世界 RimWorld

TDS Bug Fixes - Continued
InvalidOperationException in EditWindow_Log due to concurrent modification of message queue
When opening the in-game log window, EditWindow_Log.DoMessagesListing throws:

System.InvalidOperationException: Collection was modified; enumeration operation may not execute.

Stack trace shows multiple mods patching the log window: HugsLib, RimThemes, and TDS Bug Fixes (transpiler). The exception occurs because the message queue is modified during enumeration.

Error excerpt:

Exception filling window for LudeonTK.EditWindow_Log:
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.Generic.Queue`1+Enumerator[T].MoveNext()
at LudeonTK.EditWindow_Log.DoMessagesListing (Rect listingRect)
- TRANSPILER Uuugggg.rimworld.TDS_Bug_Fixes.main: FixWindowDragInsteadOfReorderable

Steps to reproduce:

Enable TDS Bug Fixes along with HugsLib and RimThemes (common setup).

Play until log messages accumulate.

Open the log window while game is running.

Error occurs intermittently, especially if messages are being added at the same time.

Notes:

Likely fix: copy the queue to an array before enumerating, or add proper synchronization to prevent concurrent modifications during draw.

Other mods also patch the log window, but without safe enumeration, any external log entry will trigger this.
< >
正在显示第 1 - 1 条,共 1 条留言
Confirmed, having the same error.
It appeared after I added: Vanilla Armour Expanded, Vanilla Armour Expanded - Accessories, Vanilla Fishing Expanded and Vanilla Fishing Expanded - Fishing treasures AddOn to my list.
< >
正在显示第 1 - 1 条,共 1 条留言
每页显示数: 1530 50