Jump to content
  • 0

Common CTDs, Freezes, ILS and memory issues


hishutup

Question

 

 

Basic requirements to follow this FAQ

Use the following utilities and have some idea of what they do.

  • ENBoost: This extension moves the DX9 texture cache to a different 64 bit process. This reduces the chance of filling up the 32 bit process with textures causing random CTDs.
  • Crash Fixes: This is an SKSE plugin that helps catch some issues that cause skyrim to CTD, freeze or hang. 
  • Some form of memory fix:
    • SSME: Made redundant by SKSE memory tweaks.
    • SKSE memory tweaks: This changes the initial heap size to make it larger. This avoids the issue where skyrim will not increase the heap causing it to CTD, freeze or hang. This method requires some input for the correct size. This can be found by using Memory Blocks Log. This is a workaround to an issue.
    • Crash Fixes OSAllocators: This is a fix for the same issue that SKSE memory tweaks workarounds. This is a true fix but has its share of issues.
    • Crash Fixes CustomMemoryBlocks: This is a fix to some of the issues caused by OSAllocators. By breaking the heap into smaller blocks, the memory can be allocated and freed as needed. This method requires some input by observing how high you need to set the blocks size. This can be viewed in the console if the toggle is enabled.

 

Info that is typically useless:

  • Papyrus logs: These are NOT crash logs. Typically, the last entry could be several minutes before you even experience a crash. Any useful info is typically debugging code in scripts, this is usually removed/disabled before a mod is released. This is a very helpful tool to modders, but not to users.
  • Windows logs: These are rarely of any use to a user.

 

Issues caused by SKSE memory tweaks:

Problem: I randomly CTD.

Solution: Check the size against the memory blocks log. If the last element is close to the max size then you may need to increase heap 1 by some amount(~128 MB increments is accurate enough). Heap 2 doesnt need to be increased as it spawns more like it should.

 

Issues caused by Crash Fixes OSAllocators:

Problem: I get "Skyrim has failed to allocate memory"

Solution: This is caused by memory fragmentation and there isn't really a solution for this. Its suggest to use the custom memory blocks instead.

 

Issues caused by Crash Fixes CustomMemoryBlocks:

Problem: Stuff isn't loading in as expected.

Solution: Check to make sure the size is appropriate.

 

How to read and interpret Crash Fixes crash log:

I don't know, I'm curious myself. The hex given isn't a formid, its a memory location by my understanding.

 

 

 

 

 

This is the easiest solution to the memory issue.

 

Install this manually into the "Skyrim" folder(with the TESV.exe)

SKSE Plugin Preloader

Install this manually by moving the SKSE folder into the "Skyrim\Data\" folder

Crash fixes

 

Then open the "Skyrim\Data\SKSE\Plugins\CrashFixPlugin.ini"

Modify the "UseOSAllocators=0" to "UseOSAllocators=1"

Save.

 

You should be good now.

 

I'd recommend removing the old methods of heap modification, ENBoost is fine.

 

[spoiler=Old Post]

I made this sticky because there is a sudden up-rise in CTD relating to the memory tweaks not working. It is flooding The General forum and has kind of spread to the memory blocks log mod topic

 

If you are curious how the memory tweaks work, there is an amazing post by keith over here.

 

There are several reasons for one to CTD or freeze but the most common one is that the SSME/Memory Patch 3.0/SKSE memory tweaks are not applying for some reason.

NOTE: SSME is no longer needed and should be removed and replaced with the SKSE Memory Tweaks.

Safety load is also not needed anymore and may cause unexpected issues.

 

 

First, please copy and paste the following into your SKSE.ini file

Make sure your ini is located as such ...\Skyrim\Data\SKSE\SKSE.ini

If you follow STEP check this out.

[General]
ClearInvalidRegistrations=1

[Memory]
DefaultHeapInitialAllocMB=768
ScrapHeapSizeMB=256

To find out if your memory tweaks are working correctly, download and install Memory Blocks Log.

Run the game through MO, I would recommend fully loading into the game but the main menu will suffice. After which close out of the game and open MO again if it closed on you. Go to the overwrite folder and navigate to the "SKSE\plugins\" folder and open up the memoryblockslog.log.

 

Your log should look similar to this:

logging of blocks enabled
logging max values only
Timer disabled
Block1 Block2
512MB 256MB

However, people that experience a lot of crashing will have something like the following:

logging of blocks enabled
logging max values only
Timer disabled
Block1 Block2
256MB 256MB

The most common "fix" is to open the "Modify Executables" window by clicking the gears on  the top part of MO and select the SKSE executable and add the Argument 

-forcesteamloader

It should then look something like this.

ForceSteamLoader.png

After which, click the modify button and then relaunch the game through MO then close it and make the comparison again. 

 

If your results did not change then make a post below, otherwise search for topics that already exist in the General forum. If your particular issue does not already exist then make a new topic and there will be someone to answer your questions.

 

  • +1 3
Link to comment
Share on other sites

Recommended Posts

  • 0

Although I suppose it was worth testing out of curiosity, setting DisableDriverMemoryManager to true is not a good idea. It's even more of a hack than other elements of ENB, and was only added to help out AMD users a while back. The NVidia drivers have been perfectly fine for many versions now.

 

Really at step 2, the next thing to try was to increase DefaultHeapInitialAllocMB even higher, because the actual usage hit that limit, and that's what causes a CTD. The whole point of setting DefaultHeapInitialAllocMB is to make sure the usage never reaches the initial allocation, because Skyrim's routine for allocating more memory for the Block 1 heap is flawed and causes an exception error (aka, CTD).

 

So, you simply need to raise DefaultHeapInitialAllocMB again. Try setting it to 1024, but keep ReservedMemorySizeMb set to 256, and try test both with EnableCompression set to true and then false.

 

After a quick look through your mod list, there's only one thing I can think of which would lead to such high Block 1 heap usage right from the start of the game: uGridsToLoad in Skyrim.ini set higher than 5.

 

The reason why the uGridsToLoad setting is directly related to the Block 1 heap is because that heap is used to cache data related to all cells around the player, at the radius set by the uGridsToLoad setting. Raise uGridsToLoad above the default value of 5, and a lot more data needs to be cached in the Block 1 heap. In fact, if you use the tb console command to toggle cell borders you will see yellow lines showing the edge of each cell. With uGridsToLoad at the default of 5, the game caches data for the cell you are in, and 2 more cells in every direction, which makes a grid that is 25 cells (5 x 5). Now raise uGrids to 7 and you've almost doubled the number of cells (49), and the data to be cached could even be more than doubled in any particular spot because some cells have more data to cache than others. Set uGrids to 9 and it means 81 cells have to be cached.

 

 

When you cross one of those borders, data for an entire row of cells needs to "flushed" (marked as available to use) and then data for a new row of cells is cached into the Block 1 heap. Because of this, you will almost always see the Block 1 heap related CTD happen when you are crossing a cell border. One notorious spot is on the road out of Riverwood heading west, on the way to the standing stones. There's a spot right in the middle of the road where you can cross diagonally past the corner of a cell, which forces the flush of data for 9 cells (2 sides of the 5 x 5 grid) and loading of "new" data for another 9 cells. Before the Sheson memory patch fix, people with a significant number of mods that add spawns and other element would pretty much always crash at that spot.

 

So yeah, a higher uGridsToLoad setting is the first thing that comes to mind when I see a high Block 1 heap usage so soon after starting a new game / loading a save.

  • +1 1
Link to comment
Share on other sites

  • 0

Ho Lee Crappola.

 

I was all set to respond saying "well actually I am running with ugrids 5" but when I opened the INI to copy it into a reply... yep, it was on 7. :O_o:

 

(Not 100% sure how that happened because I swore off upping the ugrids years ago -- my best guess is a few weeks ago I ended up having to restore my INIs from a backup, and it would appear the backup was one from before I switched down to Ugrids 5. Doh!)

 

Anyway, I set it back down to 5 and made the change to DefaultHeapInitialAllocMB=1024 that you suggested and tried some more stability testing. No crashes after doing a TCL + TGM flight from Helgen up to just east of Castle Volkihar, with periodic opening of menus thrown in. The max memory usage was 764, so it was getting close to the 768 limit, but not over -- and flying around like that is pretty stressful on memory since you're loading cells and LODs frequently. 

 

At this point, I'm pretty sure it's playable.

 

Thanks a ton for your help, Keith. Way above and beyond the call of duty. 

Link to comment
Share on other sites

  • 0

 

Thanks a ton for your help, Keith. Way above and beyond the call of duty. 

 

Hey, no worries. I'm just glad I was able to pinpoint the reason in just a few posts.

 

I think you can go back to using DynDOLOD now to make up for the loss of uGrids at 7. DynDOLOD is much more memory efficient anyhow!

 

Happy Skyrim-ing!

Link to comment
Share on other sites

  • 0

Plant face in palm.......

 

I have spent probably 40+ hours troubleshooting the Riverwood CTD.  I finally stumble on this article.  Reading through, I realize I have not created an SKSE folder in MO for my skse.ini file and have it instead sitting right in the top directory.

 

Uggggh....

 

Thanks for this post.  Who knows how much longer I would have been working at this had I not finally made my way here.

 

The Memory Blocks Log is my new best friend in Skyrim.

Edited by jbvertexx
Link to comment
Share on other sites

  • 0

I'm not sure who updates the detailed instructions in STEP, but the SKSE instructions here (https://wiki.step-project.com/Skyrim_Script_Extender#Recommendations) could be clearer.

 

In the below instructions:

 

  • Open the SKSE folder or create one if one does not exist.
  • In the SKSE folder, create skse.ini and paste inside it the following:

I have looked at this probably a dozen times and always skipped right over "or create one if one does not exist."  I've assumed the "SKSE folder" was just the SKSE Mod folder in MO.

 

Having a specific step to create the SKSE Folder with the path explicitly stated (i.e. Mod Organizer\mods\skse 1 07 03\SKSE) I think would help ensure this isn't missed in the SKSE setup.

 

It would also benefit from having the user install and use the Memory Blocks Log to verify the patch is working correctly given how critical the patch is.

Edited by jbvertexx
  • +1 1
Link to comment
Share on other sites

  • 0

Firstly, thank you to everyone involved in helping the rest of us mod our game and enjoy some extra dragony goodness. 

 

This thread has been really helpful, but I was still stuck.  I had SKSE set up properly in MO, had the .ini file, etc, as laid out here.  I finally realised that the -forcesteamloader argument has to be in the executable you are actually using.  Blindingly obvious when I think about it, but it wasn't immediately clear to me.  Using the argument in Mod Organizer only helps if you are launching through MO.

 

So if anyone is following this and launching Skyrim through a desktop (or start menu) shortcut, right click on the shortcut, and press properties.  Look to where it says target, and add the forcesteamloader argument there.  Mine looks like this:

 

"D:\Documents\Skyrim Files\Mod Organizer\ModOrganizer.exe" "D:\Steam\SteamApps\common\skyrim\skse_loader.exe" -forcesteamloader

 

Hope this is useful to some. :)

Link to comment
Share on other sites

  • 0

Hoping for "yeah, I know that one, all you have to do is changing value X in your ini file"...  :;):

 

After installing STEP 2.2.9.2 and REGS 4.0.6 (modified) on top of it, I started the usual testing routine I do after installing a few mods. That means starting a new game, visiting as many places/things modified/added by the most recent mods as possible and playing at least three hours in a realistic way, not using cheats other than "tmm 1".

 

While all the tests before (after each (!) section of STEP aswell as five times during REGS installation) were without CTDs/freezes/infinite loading screens, this time, after finalizing the REGS installation, I encountered serious issues.

1) First, after creating a character using Alternate Start, I chose the owning property start in Whiterun. Everything worked fine until I left Breezehome, about one second after the loading screen was finished and I could already see Whiterun appearing, I crashed to the desktop. That CTD unfortunately is not replicable. Here's a video.

2) Then, after creating a second character, everything went fine and I've played for about three hours without any real issues. However, when I eventually was in Riverwood and tried to use the carriage (Better Fast Travel) to Whiterun, I ended up with an infinite loading screen. Noticeable:

- This was the first ILS I've ever encountered

- Better Fast Travel worked fine for the last ~12 hours of testing it

- I've waited for about 8 minutes to outrule a not gamebreaking but only annoying two minutes loading screen

- The smoke, text and objects usually visible during loading didn't show up

- My HDD LED didn't blink

- Music and effects were still playing

Here's a video

 

Now, unfortunately, I got no idea how to determine which mod/step during installation/whatever is causing my problems.

I've already checked if the SKSE memory thing is working using that Memory Log plugin. It correctly showed block sizes of 512 and 256 MB like written in the SKSE.ini and the maximum number on the left side, during swimming in the Solitude Docks (using Better Docks) was roughly 400 MB. So that shouldn't be the problem.

 

What confuses me is that the last section of REGS only contains quests and dungeons. The one located near Riverwood was already tested before and didn't cause issues and I've been to Whiterun before in the same testgame so that shouldn't be bugged either. So... could it be that both events were totally random and I was just lucky that I didn't encounter them in earlier test sessions? Cause that would make finding the cause way harder...

 

You can find details about my installation in my signature link (Benchmark...).

 

/edit

Another CTD after playing 30-60min, shortly after using a quick travel carriage from Heljarchen Hall (house not bought or built yet) to Rorikstead, immediately after I started walking in Rorikstead. Strange: the carriage obviously wasn't from Better Fast Travel but vanilla as a dialogue was missing and travelling was free. I was using the savegame that ended with the infinite loading bug described above, so the time was on top of the about 3 hours.

Edited by elwaps
Link to comment
Share on other sites

  • 0

Keep Memory Blocks Log active and enabled until you reproduce the crash to rule out this isn't the issue. What I found is that the amount allocated bounces around quite a bit depending on the area so mine was sitting around 450 to 500 and then at some point would bump above 512 and cause a semi-random crash. I increased it to 1024/512 and this fixed the seemingly random crashes. At that time I was using some 2K textures along with Interesting NPCs and a few other mods on top of STEP Extended.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Guidelines, Privacy Policy, and Terms of Use.