Jump to content

[Skyrim] Plugin Preloader + Crash fixes by meh321 and Sheson


alt3rn1ty

Recommended Posts

Just to widen the audience on this one

 

http://forum.step-project.com/topic/9768-crash-fixes-by-meh321/

 

( Recommend reading at least the first few pages there - Sheson has participated in the first three pages of that topic and tentatively endorses the plugin, and has contributed by helping meh321 with developing the Plugin Preloader idea )

 

Plugin Preloader is a couple of .dll which is manually installed ( Version 3 released today )

 

Crash fixes ( now at Version 10 ) is an SKSE plugin, it has an accompanying ini and a preload.txt file which should also be installed in SKSE \ Plugins

 

The latter was developed first, the former was developed with Sheson's help later

 

 

Shesons memory fix :

 

If you alter a setting in Crash fixes ini, change "UseOSAllocators=0" to "UseOSAllocators=1"

 

You can also disable Shesons memory fix in the SKSE.ini - After enabling UseOSAllocators the same job is being done by Crash fixes

 

But you dont have to use the above, if Shesons memory fix in SKSE is perfect for your setup then keep it and dont use the UseOSAllocators setting.

 

 

Now have a look at Crash fixes ini to see what else it is doing ( load it up in notepad ++ )

 

Actively being developed

 

Feedback to meh321 on Nexus will probably be the best way to go. Opening this topic really just as a news topic, but feel free to discuss as an alternative to none step members.

 

Crash fixes ( once you have edited its ini ( if you need to ) ) .. will install as a BAIN by Wrye Bash which will recognise it as an SKSE plugin ( Note : Because it contains a .txt file to mark it as a preload .dll target, right click and choose "Skip Overrides" so that Wrye Bash installs the .txt file aswell as the plugin and ini )

Link to comment
Share on other sites

For anyone trying Plugin Pre-loader prior to v3 - It now uses one less .dll ( so the original extra d3dx9_42_.dll is no longer needed )

 

 

I am trying it, loading the game seems to be a little quicker for me than it was when using SKSE implementation of Sheson memory fix ..

 

.. Otherwise .. No clue. Ordinarily I do not get any CTDs at all, probably due to being habitually not heavily modded, so I have no behaviour to compair it with.

 

I certainly have not gained any problems in the little time I have been using it, and the little load speed increase for me is indicative of improvements at least.

Link to comment
Share on other sites

I would assume because intercepting crash data and preventing the game from actually crashing carries certain risks, and always will. Much like weOCPS for Oblivion which took a few years before people finally realized it was leading to subtly corrupted saved while being used.

 

It may SEEM like the game crashes for no good reason, but IMO it's better to just let it and be guaranteed you won't have a problem reloading than it is to intercept it and pray you never do later.

 

The memory heap replacer is a different matter. It proved to be safe to use the one for Oblivion, so who knows. I'd only actually bother with it if the game was pushing by running out of resources or something. Otherwise I think the SKSE memory patch is sufficient for most folks.

Link to comment
Share on other sites

I know the weOCPS mod, or is it an OBSE plugin I dunno, is not compatible with OblivionXP, which show what opinion I have about a Plugin Preloader tool or whatever one would call it.

 

Why complicate a thing that works in SKSE with a Plugin Preloader tool is beyond me, but like the other said the memory fix in SKSE should be enough for most modded players.

Link to comment
Share on other sites

I would assume because intercepting crash data and preventing the game from actually crashing carries certain risks, and always will. Much like weOCPS for Oblivion which took a few years before people finally realized it was leading to subtly corrupted saved while being used.

 

It may SEEM like the game crashes for no good reason, but IMO it's better to just let it and be guaranteed you won't have a problem reloading than it is to intercept it and pray you never do later.

 

The memory heap replacer is a different matter. It proved to be safe to use the one for Oblivion, so who knows. I'd only actually bother with it if the game was pushing by running out of resources or something. Otherwise I think the SKSE memory patch is sufficient for most folks.

 

:) now I remember when I have seen something similar in the past, thanks Arthmoor I will keep it in mind, and when I get off shifts again will go check out some old settings from that, and streamline and a few others ( pretty sure there was also something similar for the earlier fallout games ) .. See if there are any similarities, and what if anything may be suggested as a bad setting in Crash Fixes

 

At the moment I am not sure if it is actually "fixing" the underlying cause of crashes in some cases ( I am not the best person in the world to be looking into it really, I dont get any CTDs, and am not competent enough at the level required to look into such things ) ..

 

.. or as you say just preventing them. I did have a brief thought along the lines as you suggest when I started looking into it, but Shesons collaboration into the project gave me more confidence to give it a go.

 

 

The Plugin PreLoader / Crash Fixes "Sheson fix" is certainly working better than the SKSE implementation for me, as noted in the OP, so if I used nothing else ( all other settings can be turned off ) I would still use this as a preference to SKSE implementation of the Sheson fix ( I still use SKSE obviously for enabling the amazing Script Extender plugins our community produces ).

 

And if there are definite settings which would correspond with the troublesome settings for weOCPS, then they would be best pointed out to the author :

Does anyone know what weOCPS did specifically that turned out to be bad practice ?

Or was everything it did bad practice ?

 

Is there correlation between the two games ? ( Skyrim being even more of a technical minefield than Oblivion was I should imagine avoiding upsetting the applecart with things like this would be much harder to achieve )

 

Or is this Crash fixes more like Oblivion Stutter Remover ( OSR ) ?, addressing things like heap settings, hooking hash tables and criticals, dynamic resizing and scheduling resolution etc etc

 

 

According to the changelog the author is binning ideas which in hindsight ( community feedback ) turned out to be bad voodoo

 

I am of a similar opinion at the moment though that I do not really need it, just testing it out to see if I can give anything useful back to the author .. I doubt if I will achieve anything though, and after about a year of trying it out will just get rid of it as not being necessary in my case. I am not convinced I even need the Sheson fix, the game so long as its not heavily modded runs fine for hours on end in my experience ( during Skyrims lifetime that equates to testing the same modded setup ( primarily just with Unofficial Patches and between 10-30 other carefully chosen mods ) on four different laptops and a desktop, all of which went through a couple of OS changes along the way x32 and x64 bit ).

At the moment I am only trying this setup out on my personal laptop, all other machines are vanilla game plus a few mods / replacers as usual, and performing very well sans any kind of fixes.

I strongly believe that if you need any of these fixes .. You are just being greedy in the mod department

= Much simpler solution .. Weed the garden and start again :)

 

I think the cycle is the same for all bethesda games

At the beginning - Major problems - Bugthesda involved in fixing the game

Community respond with lots of fix ideas - Many of which are valid hoovered up by Unofficial patches

Bethesda bugger off to next money spinner, Unofficial Patch starts to mature

xEdit matures, and cleaning Official plugins and mods of UDRs and ITMs solves even more problems

Technical fixes start to appear in response to everyone still believing earlier problems are still a thing ( due to wanting to keep the same mods installed which are part of the problem ) .. But some are very accomplished code

 

Then the community start to realise about 6 years down the line :

Vanilla game with most recent official patch and game ini's regenerated is actually not bad,

plus unofficial patches

plus cleaning bethesdas dirty edits with xEdit

plus moderate load order of clean mods ( and no history of bad practices creating them )

== Stability and a good game experience

 

Thats just my opinion though :).

Link to comment
Share on other sites

I think weOCPS was just suppressing exceptions, this one actually fixes the bugs in the game code judging by it's description.

Link to comment
Share on other sites

Thanks Zilav, reading the ini it looks to me more like code fixes than just prevention / supression

 

The ini for anyone who has not downloaded and had a good read is available as the mods readme ..

 

http://www.nexusmods.com/skyrim/mods/72725/?tab=9&navtag=http%3A%2F%2Fwww.nexusmods.com%2Fskyrim%2Fajax%2Fmodreadme%2F%3Fid%3D72725&pUp=1

 

This one in particular tweaked my curiosity ..

 

; Info: If your scripts use more than 65535 different strings then the save game will be corrupt and not possible to load.
; This fixes it by changing the save file format slightly if string count is higher than 65520. That means if you
; have this option enabled and your save game would have become corrupt it changes format instead and vanilla game
; or save game tools will not be able to open it! Opposite is true as well, if the count goes below 65520 after
; and you save again then the format reverts to vanilla.
; TLDR: Fix for https://forums.nexusmods.com/index.php?/topic/3924850-corrupt-saves-strcount-0xffff-ctd-on-load/
; Address: Around 30 different parts of code had to be patched.
StringCount32=1

 

and

 

; Info: Crash happens in DDB0A0, seems to be used in some havok animated object's vtables.
; Normally these crashes are fixed by aligning allocated memory with 16 bytes. But
; this one isn't because it can be used on static memory locations which aren't using
; Skyrim's allocator at all, this means that memory isn't guaranteed to be 16 byte aligned.
; Address: DDB0B2
; Solution: Use movups instruction instead of movaps.
UnallocatedMovaps=1

 

the guy is working with dis / assembler, which in my book elevates him to IanPatt's field of knowledge

 

And of course this mods implementation of Sheson fix

 

; Info: Completely disable Skyrim's memory allocator and use regular C malloc. That means memory blocks will not exist anymore
; and game will not crash at some arbitrary limit. Theoretically it should also be faster (especially loading screens)
; and eliminate most ILS or freezing issues.
; IMPORTANT!!: You NEED custom plugin loader to run this so CrashFixPlugin.dll gets loaded before the game initializes!
; Here is the link to "SKSE Plugin Preloader": http://www.nexusmods.com/skyrim/mods/75795/?
; When this is enabled then Safety Load and SSME/SKSE memory patch are not needed, but they don't cause any trouble if you do have them.
UseOSAllocators=0

 

Set to 1 and use the Plugin Pre-loader aswell as Crash fixes to get the latter working

 

I can concur that memory allocation and loading is not just theoretically faster, it is faster

 

And the ini is obviously just the tip of the iceberg when it comes to the code being injected

Link to comment
Share on other sites

As far as the string fix goes, I doubt you're going to run into a case where you'd actually need to worry about that. Since that one changes the format of the save game files, I am automatically wary of it. That seems like an awfully heavy handed thing to do for a relatively small problem that not many people actually encounter.

Link to comment
Share on other sites

Correct me if I am wrong, Arthmoor, but I believe it is saying that it only changes the save file format IF the string count is higher than 65520. If it is lower, I believe it does not change the file format.

Therefore unless you have the issue in question, there will be no change.

Link to comment
Share on other sites

Which is a bit paradoxical. If you don't have the issue, why would you use this at all?

 

The other CTD fixes seem like such specific things as to be unnecessary for the average mod user and would result in a lot of placebo reports about how it magically fixed something that was never actually broken in their games. Much like weOCPS was.

 

Despite the popular perception, Skyrim is pretty darn stable and doesn't typically crash without a good reason behind it, like corrupt models or something. Allowing that kind of thing to get bypassed is dangerous because you then have no idea if that data is getting saved somewhere.

 

And I am a bit uncomfortable with the quoted sections of the guy's ini file that were in a STEP post that essentially looked like "I don't know why this does this, but let's bypass it anyway". I'm sorry, but that's just not confidence inspiring.

Link to comment
Share on other sites

Which is a bit paradoxical. If you don't have the issue, why would you use this at all?

Again, correct me if I am wrong, but I believe string count increases as you play the game. If it was static, loading any save would not work off the get-go with a crazy mod list.

However, only when the strings passed the limit would the save fail to load with this issue. So it may not be needed, but if your mod list is crazy enough that you need this "fix", I can see the usefulness. And if you end up not needing it, no harm done, as it does not change the file format at all.

The other CTD fixes seem like such specific things as to be unnecessary for the average mod user and would result in a lot of placebo reports about how it magically fixed something that was never actually broken in their games. Much like weOCPS was.

Despite the popular perception, Skyrim is pretty darn stable and doesn't typically crash without a good reason behind it, like corrupt models or something. Allowing that kind of thing to get bypassed is dangerous because you then have no idea if that data is getting saved somewhere.

Fair enough, that makes total sense to me.

And I am a bit uncomfortable with the quoted sections of the guy's ini file that were in a STEP post that essentially looked like "I don't know why this does this, but let's bypass it anyway". I'm sorry, but that's just not confidence inspiring.

Agreed, but at least he is upfront about it! ;-)

I don't want to debate you, Arthmoor, because I don't have a leg to stand on. You have forgotten more about the inner workings of Bethesda games than I will ever know.

However, take a step back and look at what the mod can actually do:

Every one of these "fixes" can be turned off in the .ini file. Therefore, you could run with just the SKSE Preloader and the string count fix, if you wanted (the latter of which won't affect you unless you need it). Or just turn the Preloader on.

Or you could turn all of them on. Or only the ones you felt comfortable with. It is completely modular, which makes this mod particularly great, IMO.

What you say about the fixes having unknown consequences does make sense. A lot more testing is definitely needed on those. But the Preloader and the string count fix do actually seem like phenomenal advancements.

Just my two cents, anyway. :-P

Link to comment
Share on other sites

Right, but the NEED for the string fix is frankly limited to some, shall we say, adult material found on Lover's Lab. The only other thing I have seen it reported as an issue with in more mainstream content is DynDOLOD. Sheson already fixed that though, so I am confident in my opinion that most people don't need it.

 

So IMO the only potentially useful thing that leaves behind is the change to the memory allocation routines. For Oblivion those showed up in a separate OBSE plugin called Oblivion Stutter Remover. It had several options for addressing the memory heap replacement and for allowing it to work alongside patched 4GB executeables. I'd much rather see the malloc replacers in their own plugin rather than tied to the extra code of the others even if the others can be turned off. Leave the CTD fixing stuff in its own thing.

Link to comment
Share on other sites

Right, but the NEED for the string fix is frankly limited to some, shall we say, adult material found on Lover's Lab. The only other thing I have seen it reported as an issue with in more mainstream content is DynDOLOD. Sheson already fixed that though, so I am confident in my opinion that most people don't need it.

Well...I agree that most people don't need it, but I disagree that it is only LL mods that can cause the issue. Reports of this have been found with some of the crazier mod lists over on the STEP forum. SR:LE Extended had an issue with this (that is Neovalen's SR:LE guide PLUS a whole ton of other mods in a guide by Darth_mathias).

See this thread: http://forum.step-project.com/topic/10257-srle-extended-string-count-testing/

DynDOLOD seems to have added about 3500-4000 strings before Sheson fixed it. However, there are many other mods with large string counts.

Some other popular mods with large string counts:

Legacy of the Dragonborn = ~3500-4000 strings added

Interesting NPCs = ~3000-3500 strings added

Vilja = ~1000-1500 strings added

And there are many more. So while I agree that most people (I'd even say the vast majority) will not need this--you would have to run a pretty crazy mod list to ever see this issue--it does affect more than just LL mods.

So IMO the only potentially useful thing that leaves behind is the change to the memory allocation routines. For Oblivion those showed up in a separate OBSE plugin called Oblivion Stutter Remover. It had several options for addressing the memory heap replacement and for allowing it to work alongside patched 4GB executeables. I'd much rather see the malloc replacers in their own plugin rather than tied to the extra code of the others even if the others can be turned off. Leave the CTD fixing stuff in its own thing.

I agree, it would be nice to see the SKSE Preloader be fully functional by itself, without relying on Crash Fixes. As you know, to have the malloc replacer work you currently need to have both Crash Fixes and the Preloader installed.

Link to comment
Share on other sites

Right, but the NEED for the string fix is frankly limited

 

An option to only enable the malloc patch would be nice, as long as it's not enabled by default. A few fixes may be of limited need, but I've been using Crash Fixes way before the memory fix was added and it's been giving me great results.

 

This can't be placebo. A year ago I had developed an autosave mod because I was so frustrated with those crashes in my game. Then a few weeks ago I went to playtest some mod I've been developing for Requiem along with CWO. It was never a question if the game would crash in large battles with my setup. It was a matter of how often. And with Crash Fixes it simply didn't crash a single time.

 

Then I went to play a normal game and I was reminded of the days I was playing Skyrim without crashes about 2 years ago, before that cursed official update ruined everything.

Link to comment
Share on other sites

Correct me if I am wrong, Arthmoor, but I believe it is saying that it only changes the save file format IF the string count is higher than 65520. If it is lower, I believe it does not change the file format.

Therefore unless you have the issue in question, there will be no change.

 

Thats how I understand that one too

 

It only changes string count from 16 bit to 32 bit as required, and back again to 16 bit when its not needed anymore. It doesnt change the whole save format, just parts of it, but possibly anything else which looks at saves like a save game manager will probably throw a fit .. Depends how in depth any third party save manager goes I suppose, just copy / moving saves / profile management will not be an issue.

 

 

DynDOLOD seems to have added about 3500-4000 strings before Sheson fixed it

 

Yep I remember occasional incidents of crash reports with earlier DynDOLOD, and nobody including Sheson could account for why or reliably reproduce the problem, until markdf associated the string count and Sheson fixed it

 

 

I agree, it would be nice to see the SKSE Preloader be fully functional by itself, without relying on Crash Fixes. As you know, to have the malloc replacer work you currently need to have both Crash Fixes and the Preloader installed.

 

My bold - Thats the wrong way around, Crash fixes relies on Plugin Preloader to enable its malloc fix. Without Plugin Preloader the fix would not work, because block allocation has to be replaced before the game loads.

Link to comment
Share on other sites

My bold - Thats the wrong way around, Crash fixes relies on Plugin Preloader to enable its malloc fix. Without Plugin Preloader the fix would not work, because block allocation has to be replaced before the game loads.

Err...yeah. What I meant to say was it would be nice if the malloc fix was in a single, separate mod from Crash Fixes, with no dependencies.

Basically rip the malloc fix out of Crash Fixes and bundle it with the Preloader.

But I am happy to have the feature, regardless of how it is packaged! :-)

Link to comment
Share on other sites


I'd much rather see the malloc replacers in their own plugin rather than tied to the extra code of the others even if the others can be turned off. Leave the CTD fixing stuff in its own thing.

 

Did anyone ever ask sheson to to remove the dependency of the original SKSE.ini from all the extra code that comes along with the script extender?  IMO, just using the malloc and preloader with all the crash fixes options turned off is the exact same thing in principle.

Link to comment
Share on other sites

Memory alignment is important, I would be inclined to think that fix works as it should.

 

Just to note that Stutter Remover's heap replacer doesn't work correctly with the games memory management routines (cell purging) as they are completely bypassed and this is what causes crashes when it's used.

 

NVAC also adds structured exception handling, works with Oblivion, Fallout 3, New Vegas and Skyrim and I've never experienced it corrupting a save in more than 2 years of use and thousands of hours of play.

 

As Arthmoor has mentioned above, most crashes are caused by bad models (even bethesda's are broken sometimes) which is traceable by enabling the games error log in the script extenders.

Link to comment
Share on other sites

  • 10 months later...
On 22/05/2016 at 2:18 PM, alt3rn1ty said:

Just to widen the audience on this one

 

http://forum.step-project.com/topic/9768-crash-fixes-by-meh321/

 

I installed crash fixes and plugin preloader, double-checked the files in skse/plugins and in the root skyrim folder and I still get an error message saying "Error: "UseOSAllocators" option could not be applied because the game has already initialized! Either disable that option or follow these steps: 1. Download and install "http://www.nexusmods...im/mods/75795/?" - SKSE Plugin Preloader. 2. Make sure you installed it correctly to Skyrim root directory and not Data."

when I set UseOSAllocators=1

I've done this before without this error... I don't seem to be able to fix it short of setting UseOSAllocators=0, but the guide I'm following tells me to leave it on.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...