Closed N3X15 closed 3 years ago
does it happen with rimatomics on its own?
looked through my files and the texture thats width=4 height=125 is Textures\Rimatomics\UI\ReactorUI\tempGaugeVert, its an old graphic that i dont use anymore in 1.2 but the texture file is still there for the old versions, you could try deleting that file and see if it still crashes but on a different texture, which would mean its something like a driver issue or running out of memory, or someone playing silly buggers with some harmony patching to graphics classes
Yeah, it's still causing the initial D3D11 issue. Haven't yet reached the point on my save where it just keels over and dies, but the D3D error kind of guarantees it eventually.
Modlist is literally just:
[Mod list length: 4] Harmony [https://steamcommunity.com/sharedfiles/filedetails/?id=2009463077] Core [https:// no link (local mod)] Rimatomics [https://steamcommunity.com/sharedfiles/filedetails/?id=1127530465] Royalty [Official DLC] [https:// no link (local mod)]
so i just checked my log and i also have the d3d error for failed to create 2D texture, which means that's normal, everyone has it and probably unrelated to the crash, i just changed the size of the texture by a few pixels and the error stopped, i pushed it to the git master so you can copy that one in to clear that error and carry on searching for the cause, i haven't had anyone else report a crash like this before
All right, back to the hunt I guess. Thanks for looking into it.
I recently started having issues where I'd start a save and shortly after a pawn entered a map (either a trader or a raid), the game would just crash to desktop. Compounding the problem is the fact that it would leave no corresponding Player.log messages, only a Windows Event Log entry which, as you know, is completely useless on Unity.
Been debugging this for about a week, trying to figure out what was going on, but had trouble pinning down which mod caused it until today.
The root of the problem seems to be a fairly innocuous debug message during initial startup (BEFORE loading a save) about DirectX 11 failing to create a 2D texture. I did some googling, and it seems that error 80070057 is E_INVALIDARG, suggesting incorrect arguments are being fed to DX11.
I did some experimentation with adding Debug.Log to the constructor of Texture2D in UnityEngine.CoreModule using dnSpy, so I could at least get a stacktrace of the offending calls, but it overwhelmed the logger. I ended up restoring the DLL to its original state and validating the game core files via steam.
So, I cleared my modlist and spent the last two or three days slowly adding mods back into it to see which one triggered the error.
RimAtomics drew the short straw. I confirmed it was the problem by restoring my original mod list, sans RimAtomics. The game runs without crashing, and doesn't present the error above.
tl;dr
Technical Info
Windows 10
RimWorld 1.2.2753
RimAtomics redownloaded from Steam as of Nov 5 2020 @ 3:33PM PST
nVidia GeForce RTX 2070 (4095MB)
Intel Core i7 4790K
32GB system RAM
Attempts at Mitigation
Not sure you'll be able to fix this, since it appears to be a Unity bug, but I can't really investigate further. Maybe you'll have better insights on this than I.