Skyrim Memory Patch - fixing ILS, uGrids CTD, freezes

any kind of mods
Post Reply
  • Author
  • Message
Offline
User avatar
*blah-blah-blah maniac*
Posts: 17427
Joined: 27 Dec 2011, 08:53
Location: Rather not to say

Re: Skyrim Memory Patch - fixing ILS, uGrids CTD, freezes

nafeasonto
Windows can't allocate too big blocks. On WinXP i can't even allocate any block above ~650 mb size.
_________________
i9-9900k, 64Gb RAM, RTX 3060 12Gb, Win7

Offline
Posts: 29
Joined: 18 Jan 2014, 04:27

Re: Skyrim Memory Patch - fixing ILS, uGrids CTD, freezes

nafeasonto wrote: Question: If I try to set 1GB for each block, the game won't load. If I do 1024, and 768, the game loads then crashes at the title screen.

Anyone figure out the correct "stepping" for the limits?

It seems the only stables number I can get is 768/768. Any higher and the game won't even load, or the game crashes when the title screen comes on.

Also thanks for the INI edit coding, makes things a lot quicker to test.
Although only my personal experience, and with everyone having different hardware etc... here is what i have seen via testing, i have been using 256 jumps until i crash and then winding back from there, down by 128, then 64 then 32 etc...

I cannot go above 768Mb, on first memory block, no matter what the second is set to I CTD at the main menu.
The second block i can go up to 1024Mb, any higher and the game will not even launch :D

So i can run 768/1024, interestingly i can launch the game running any combination up to those limits, from 256/1024 to 768/256 no problem the instant i step outside of that I see issues, if the first memory is incorrect i will be allowed to launch the game but CTD at the menu, and the second memory will not even launch the game if its too high, however if i leave the first memory at 256 i do see ILS and other such issues during gameplay so technically my minimum is 512/256 and max is 768/1024, at this point in time i see no benefit running over 768/512, however i think this would have lot to do with mod choices etc...

Hope this helps :D

Offline
Posts: 4
Joined: 19 Jan 2014, 07:41

Re: Skyrim Memory Patch - fixing ILS, uGrids CTD, freezes

sheson wrote:
Psychor wrote:
sheson wrote:
Psychor wrote:Well this fix the opposite effect for me. :shock:
I guess the issue was that the default allocations were not enough?
I have one question though - your code comment states "//1st block, request 512MB (0x0300) instead of 256MB (0x0200)." Isn't 0x0200 512MB and 0x0100 256MB?
Good to hear it works

1) yes it seems you have so many mods and stuff it even needs more than my anticipated value of 512MB fits all. So raising the first block seemed to help. You could use VMMap to verify how large the first block actually needs to be. I will update my OP with a more detailed description about this soon.
There is no use in pre-allocating more space than the game will later need.
Only raise the second block if skyrim doesn't start or in fact does ILS (only really high ugrids or insane number of mods/stuff in mods) while the first block is large enough.

2) You are correct, however in this case this is part of magic that this fix actually works so easily. The value is a base value to set things up, including but not limited to the size of the first block. Calculations later in the code turn the default value of 0x200 into 0x10000000 for the allocation. So it needs to be 0x100 more than what you would expect.
Thanks for the explaination. A more detailed guide on how to use VMMap would be appreciated.

I tried lowering the allocation for SafeWrite32(0x00a4e6be+1, 0x40000000) - I tried 0x10000000, 0x20000000 and 0x30000000 but I ran into issues with each. In the end the follow code is what I had to use for things to be stable and for me to disable SafeteyLoad and ShowRaceMenu Precache Killer:

Code: Select all

SafeWrite32(0x00687e87+2, 0x00000400);
SafeWrite32(0x00a4e6be+1, 0x40000000);
SafeWrite8(0x004bd832+1, 0x11);
I use Mod Organizer with about 100+ entries. I do use a lot of high resolution (2K and 4K) texture mods.

Offline
User avatar
Posts: 9
Joined: 19 Jan 2014, 04:37

Re: Skyrim Memory Patch - fixing ILS, uGrids CTD, freezes

Is there a difference on how to compile the skse loader for non-steam users?

Also, how many posts do I have to have in order to PM someone back?

Offline
User avatar
*blah-blah-blah maniac*
Posts: 17427
Joined: 27 Dec 2011, 08:53
Location: Rather not to say

Re: Skyrim Memory Patch - fixing ILS, uGrids CTD, freezes

ZerOxShadows
4-6 posts, don't remember exactly. Try again now, i removed you from newly registered.
_________________
i9-9900k, 64Gb RAM, RTX 3060 12Gb, Win7


Offline
Posts: 39
Joined: 08 Jan 2014, 14:59
Location: Lyon, France

Re: Skyrim Memory Patch - fixing ILS, uGrids CTD, freezes

ZerOxShadows wrote:Is there a difference on how to compile the skse loader for non-steam users?

Also, how many posts do I have to have in order to PM someone back?
I will try to answer to ZerOxShadows's question.

I had the same problem as you, because i do not use steam to run Skyrim.
So, when i first tried the sheson's fix, it did not work, even if my skse.ini was correctly written.

The solution i found (not probaby the best, but it works) is the following =>
in Visual Studio, open the file called main.cpp for the skse_loader.exe build.

In this file, change the code of the main function, just after the line
"bool injectionSucceeded = false;" (row 249):

Code: Select all

   // inject the dll
	if(procHookInfo.procType == kProcType_Steam || procHookInfo.procType == kProcType_Normal)
	{
		std::string	steamHookDllPath = runtimeDir + "\\skse_steam_loader.dll";
		injectionSucceeded = InjectDLLThread(&procInfo, steamHookDllPath.c_str(), true);

		if(procHookInfo.procType == kProcType_Normal)
		{
			injectionSucceeded = InjectDLL(&procInfo, dllPath.c_str(), &procHookInfo);
		}
	} 
	else
	{
		HALT("impossible");
	}
instead of the old code:

Code: Select all

   // inject the dll
	switch(procHookInfo.procType)
	{
		case kProcType_Steam:
		{
			std::string	steamHookDllPath = runtimeDir + "\\skse_steam_loader.dll";

			injectionSucceeded = InjectDLLThread(&procInfo, steamHookDllPath.c_str(), true);
		}
		break;

		case kProcType_Normal:
			if(InjectDLL(&procInfo, dllPath.c_str(), &procHookInfo))
			{
				injectionSucceeded = true;
			}
			break;

		default:
			HALT("impossible");
	}
Then, rebuild the skse_loader.exe. Now, skse_loader will load skse_team_loader.dll even if you do not uses steam to run Skyrim.

Hope it will help... ;)

And, yes, Sheson, you dit it !!! Thks a lot !!! Before the fix, i used to have CTD near Falkreath or Helgen. Now, they are gone.
Last edited by thalixte on 20 Jan 2014, 21:15, edited 2 times in total.

Offline
User avatar
Posts: 9
Joined: 19 Jan 2014, 04:37

Re: Skyrim Memory Patch - fixing ILS, uGrids CTD, freezes

ENBSeries wrote:ZerOxShadows
4-6 posts, don't remember exactly. Try again now, i removed you from newly registered.
Great! Thanks, Boris!
thalixte wrote:
ZerOxShadows wrote:Is there a difference on how to compile the skse loader for non-steam users?

Also, how many posts do I have to have in order to PM someone back?
Sorry Boris, but let me answer to ZerOxShadows's question.

I had the same problem as you, because i do not use steam to run Skyrim.
So, when i first tried the sheson's fix, it did not work, even if my skse.ini was correctly written.

The solution i found (not probaby the best, but it works) is the following =>
in Visual Studio, open the file called main.cpp for the skse_loader.exe build.

In this file, change the code of the main function, just after the line
"bool injectionSucceeded = false;" (row 249):

Code: Select all

   // inject the dll
	if(procHookInfo.procType == kProcType_Steam || procHookInfo.procType == kProcType_Normal)
	{
		std::string	steamHookDllPath = runtimeDir + "\\skse_steam_loader.dll";
		injectionSucceeded = InjectDLLThread(&procInfo, steamHookDllPath.c_str(), true);
	} 
	else
	{
		HALT("impossible");
	}
or, more simply, just put:

Code: Select all

   std::string	steamHookDllPath = runtimeDir + "\\skse_steam_loader.dll";
   injectionSucceeded = InjectDLLThread(&procInfo, steamHookDllPath.c_str(), true);
instead of the old code:

Code: Select all

   // inject the dll
	switch(procHookInfo.procType)
	{
		case kProcType_Steam:
		{
			std::string	steamHookDllPath = runtimeDir + "\\skse_steam_loader.dll";

			injectionSucceeded = InjectDLLThread(&procInfo, steamHookDllPath.c_str(), true);
		}
		break;

		case kProcType_Normal:
			if(InjectDLL(&procInfo, dllPath.c_str(), &procHookInfo))
			{
				injectionSucceeded = true;
			}
			break;

		default:
			HALT("impossible");
	}
Then, rebuild the skse_loader.exe. Now, skse_loader will load skse_team_loader.dll even if you do not uses steam to run Skyrim.

Hope it will help... ;)
Thanks for the reply, thalixte. I myself use a Steam version of Skyrim but someone asked me if I'd be willing to compile a loader for those that don't use Steam.

Offline
Posts: 39
Joined: 08 Jan 2014, 14:59
Location: Lyon, France

Re: Skyrim Memory Patch - fixing ILS, uGrids CTD, freezes

ZerOxShadows wrote:Thanks for the reply, thalixte. I myself use a Steam version of Skyrim but someone asked me if I'd be willing to compile a loader for those that don't use Steam.
OK. I see what you mean. I have myself bought the game, but i do not want to use steam to launch a game. Too bad i experimented it only one time with Half Life 2, and i was not convinced by the principle. And i dislike those applications that spy the folders of your PC (but maybe i am too paranoïd).

Offline
User avatar
Posts: 64
Joined: 11 Sep 2013, 22:34

Re: Skyrim Memory Patch - fixing ILS, uGrids CTD, freezes

I updated the OP
  • Added How much memory to pre-allocate section
  • Added Recommended section and note about precache killer
Post Reply