mwilsnd / SkyrimSE-SmoothCam

A thirdperson camera mod for Skyrim Special Edition
78 stars 19 forks source link

Skyrim crashing on startup - possible incompatibility with other SKSE plugins? #36

Closed tr4wzified closed 2 years ago

tr4wzified commented 3 years ago

Skyrim SE fails to launch - seemingly related to a reasonable amount of SKSE plugins being active. The window pops up for a millisecond and then it crashes. Launches fine without SmoothCam installed. When disabling certain plugins like Mum's the Word, Alternate Conversation Camera, SSE Display Tweaks or Private Profile Redirector the game and mod work fine again. This doesn't apply to all plugins though, disabling mods such as 'No Attack Messages' or 'zxlice hitStop SSE - Script Free' has no effect on the crashing.

Went through every log in Documents/My Games/Skyrim Special Edition/SKSE/ and only found an error in SSEDisplayTweaks.log. I do see several mods mentioning the trampoline is filled 56B / 64B (87.5%) - dunno if this has something to do with it?

Full skse64.log

.NET Script Framework is picking up the crash: Crash_2020_12_6_21-10-30.txt -always crashing on the same memory address.

Using SmoothCam 1.3, Alternate Conversation Camera 2.4.4 (also happens though with my own compiled version including ACC+ changes and your crash fix), Address Library 2.0.

I've confirmed this is not the ASCII issue - I do not get a MO2 warning that the plugin failed to load, and I do when I put a file in SKSE/Plugins with a unicode character.

mwilsnd commented 3 years ago

The messages about local/branch trampolines you can likely ignore, they aren't overflowing, it's just a little bit of static space set aside in memory for some code patching plugin mods tend to do. In theory SKSE could run out of places to create new trampolines if you have a very large amount of plugins, but SKSE should throw an error if that were happening.

You appear to be crashing as the game tries to initialize d3d11. Additionally display tweaks is reporting D3D11CreateDeviceAndSwapChain failed with the error code DXGI_ERROR_UNSUPPORTED (0x887A0004) which is rather interesting as SmoothCam shouldn't be changing the swap chain descriptor. SmoothCam waits until you load a save or start a new game before it touches DirectX so I can't imagine what exactly is going on here and why removing the mod makes things work again. Even stranger the call stack doesn't have any code from SmoothCam running at all.

I ended up installing almost every plugin in your crash log (Including RivaTuner) and was unable to get a crash. It could just be some crazy conflict between like 37 different plugins that mix to form the perfect storm, or it could be stack corruption, or it could be RivaTuner, or maybe there is some awful bug that only shows up in SmoothCam if the DLL gets rebased (which looking at your crash log, it appears it was), all hard to say unfortunately.

You can try disabling RivaTuner (It comes included with software like MSI Afterburner), and if you made any changes to the display tweaks ini you can try reverting those.

Beyond that I'd try turning off as many plugins as possible that dont't cause the game to crash. Hopefully then you'll be left with a much smaller list of plugins, at which point finding the underlying cause might be a bit easier.

In the mean time I'll keep reverse engineering the code in your crash log call stack, though I imagine the crash is likely caused by failure to create the swap chain and rendering device.

tr4wzified commented 3 years ago

I ended up just disabling Private Profile Redirector, a plugin I don't really care about, game works fine now. It's a very odd issue - I can enable more plugins on top of the stack I had and the game would launch fine, but enabling SmoothCam made it crash on start again.

mwilsnd commented 2 years ago

Going to go ahead and close this, however you can try the new crash dump feature in 1.4 and see if it provides anything useful.