tiltedphoques / TiltedEvolution

Skyrim and Fallout 4 mod to play online!
https://wiki.tiltedphoques.com/tilted-online/
Other
1.06k stars 222 forks source link

Fix game exit crash when under ModOrganizer2, only Address Library #642

Closed rfortier closed 8 months ago

rfortier commented 8 months ago

… and STR mods are loaded

Under MO2, there's a bug caused when calling RealGetModuleFileNameW on XAudio2_7.dll, it crashes in usvfs. This only happens during the game shutdown paths when the last few threads are exiting. This PR just avoids that bug.

TODO: Further analysis of what is under MO2 USVFS and what is needed.

rfortier commented 8 months ago

Some additional color commentary. This isn't the greatest fix, but XAudio2_7.dll (a vanilla DirectX component) provokes a usvfs crash at exit time when running under ModOrganizer2. Even with no mods, the only things loaded are Address Library and STR. It isn't even necessary to load a game, just run the launcher and select quit.

The DLL is opaque. We just need a couple more threads to exit. So chalk this up to another Bethesda Band-Aid.