[1.4] game exits with 0xC0000005 / Access violation [stack overflow]

Started by evilmike74, July 17, 2023, 09:24:11 PM

Previous topic - Next topic

evilmike74

I am playing with a lot of mods, and after many of ours playing on a savegame, it now crashes each time about 5 to 10 seconds (time is stable but depends on how fast i speed the game up, roughly 5 seconds at fasted speed).

The crash handler (if there is one) does not catch this crash. I am unable to track this down to a specific mod. The log doesn't show anything suspicius (to me).

So, I tried catching the uncaught .Net exception with Visual Studio:
Exception thrown at 0x00007FFCA4DAAD67 (ntdll.dll) in RimWorldWin64.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.

The stack shows no mod (if mods would normally be listed, I do not know):
    ntdll.dll!RtlDosApplyFileIsolationRedirection_Ustr()    Unknown    Symbols loaded.
    ntdll.dll!LdrpApplyFileNameRedirection␞()    Unknown    Symbols loaded.
    ntdll.dll!LdrpPreprocessDllName()    Unknown    Symbols loaded.
    ntdll.dll!LdrpFindLoadedDll()    Unknown    Symbols loaded.
    ntdll.dll!LdrGetDllHandleEx()    Unknown    Symbols loaded.
    ntdll.dll!LdrGetDllHandle␞()    Unknown    Symbols loaded.
    KernelBase.dll!GetModuleHandleW␞()    Unknown    Symbols loaded.
    GameOverlayRenderer64.dll!00007ffc3f4f9172()    Unknown    No symbols loaded.
    GameOverlayRenderer64.dll!00007ffc3f4fa7e0()    Unknown    No symbols loaded.
    GameOverlayRenderer64.dll!00007ffc3f4fab79()    Unknown    No symbols loaded.
    [Inline Frame] mono-2.0-bdwgc.dll!try_load_library_from_system_directory(const wchar_t * const name=0x00007ffbecc8ceb0) Line 205    C++    Symbols loaded.
    [Inline Frame] mono-2.0-bdwgc.dll!try_get_module(const `anonymous-namespace'::module_id) Line 239    C++    Symbols loaded.
    [Inline Frame] mono-2.0-bdwgc.dll!try_get_first_available_module(const `anonymous-namespace'::module_id * const) Line 272    C++    Symbols loaded.
    [Inline Frame] mono-2.0-bdwgc.dll!try_get_proc_address_from_first_available_module(const char * const) Line 290    C++    Symbols loaded.
    mono-2.0-bdwgc.dll!try_get_function(const `anonymous-namespace'::function_id id, const char * const name=0x00007ffbecc8d4d8, const `anonymous-namespace'::module_id * const first_module_id, const `anonymous-namespace'::module_id * const last_module_id=0x00007ffbecc8d4d8) Line 327    C++    Symbols loaded.
    [Inline Frame] mono-2.0-bdwgc.dll!try_get_SetThreadStackGuarantee() Line 378    C++    Symbols loaded.
    mono-2.0-bdwgc.dll!__acrt_SetThreadStackGuarantee(unsigned long * stack_size_in_bytes=0x000000a229a14248) Line 754    C++    Symbols loaded.
>    mono-2.0-bdwgc.dll!_resetstkoflw() Line 58    C++    Symbols loaded.
    00000210511c1945()    Unknown    No symbols loaded.

I see that its going through GameOverlayRenderer64.dll - not sure if that's a bug in / related to some Steam API usage and triggered by maybe an achievement. Please note, the Steam overlay is disabled.

I saved a dmp file but it is too large (6.8GB) to attach here even zipped (630MB).
The save is 2.8MB zipped and also too large to attach.

I attached the payler.log for 3 stages:
1. start of Rimworld with loading of all mods: started.zip
2. loading of the gamesave up to paused state: loaded.zip
3. start the timer to run the game: run.zip
Though, it looks like (using Notepat++ in tail mode) nothing is written to player.log around the moment it crashes. The last entry is maybe from 5 seconds before.

Let me know if you want me to provide you with the dmp file.
Any help, comments, questions are apricated :)

evilmike74

If i forgot, this is the current 1.4 version - regular steam release without any Beta selected.

Searching the internet I found one hit that sound a little similar.
There seems to be a Stack overflow just before it crashes (another test, addresses differ from above):
Exception thrown at 0x00000235F06BDEAC in RimWorldWin64.exe: 0xC00000FD: Stack overflow (parameters: 0x0000000000000001, 0x0000005211CA3FE0).
Exception thrown at 0x00007FFCA4DAAD67 (ntdll.dll) in RimWorldWin64.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.
The stack overflow is not caught by Visual Studio, it gets only the Access Violation afterwards. Or its one exception is embedded in the other?

evilmike74

Anyone knows how to drilldown the stackoverflow, meaning a way to identify the methods that recurse. Seems I have no symbols for the stack trace. Is there some extended debug trace I can enable?