Jump to content
  • The forum downloads section will be removed on Jan 1st 2023. Players may still download mods that are currently hosted, but new submissions are no longer being accepted. Mod makers are advised to relocate their mods to alternative hosting solutions.

1 Screenshot

About This File

Fixes the memory spike which happens when large mods are enabled, which happens due to all mod assets being loaded to RAM regardless of them being used or not.

Most notably, this fixes the crash that may happen when large mods are enabled, due to the total RAM usage exceeding the available RAM (this is most notable in the Windows version of Don't Starve, since it is limited to using at most 2GB of RAM). This crash may present itself with one of the following errors (printed to log.txt):

Error processing render buffer command GenerateMap

or

ERROR: HWTexture::DeserializeTexture failed on MinimapBG. glGetError returned 0x505

or

out of memory

but may also happen silently, with the game simply crashing with no meaningful information printed to log.txt.

As a side effect, this fix also prevents the large slowdown in the game's startup time caused by having large mods enabled.


What's New in Version 0.6   See changelog

Released

  • Fixed an issue where mod recipe placers might be invisible.
  • Like 4
  • Thanks 1

User Feedback

Recommended Comments



It seems setting the LAA flag is enough, but I'm not a Windows guy. Ask @DeathDisciple :razz:.

But if you're not experiencing crashes, I don't see why you'd want to set the LAA flag yourself. It'll just get overriden by game updates anyway, so you're just giving yourself constant trouble for naught.

 

LAA is a linker flag they did not set when building DS, see msdn on LAA, so yeah there is no support for LAA needed on the app, the support either exists on OS level or does not (i.e. for it to do anything on 32bit systems you need to change boot spec to allow user processes to map more than 2GB memory, on 64bit systems it can go way higher depending on OS version so it works by default). When OS does support more than 2GB just setting the flag is enough.

 

But yeah, it is annoying to set it up after every bloody update, it shouldn't be needed with this mod activated.

 

this game is not updating so often :-)

and enabling is just 1 click

 

I'll keep doing that too, just because, It should've been on in the first place.

Link to comment
Share on other sites

I can't seem to repeat (or cause) any form of crash with adventure mode, nor do I see any form of memory spike, with hitd and a few other things going.

 

I have 850mb on survival mode, that jumps up to 930 when entering adv mode, just to fall down to 740. After death, it goes up to 880mb then drops back to 850 after it loads the survival back again.

 

Neither can I get any sort of crash on save/load in adventure mode.

 

Just tried the same with HitD+UA active, avg +100MB higher mem use, still no crashes and no memory spikes... if there were multiple reloadings without freeing memory, I guarantee hitd would crash on 4GB address space, but it doesn't hit even 1GB max use...

Link to comment
Share on other sites

maybe its depends on videomemory? my card have 4G

so maybe cards with 1G and less have to store textures in main memory and this cause such problems?

nah just tested. even without this mod: Video memory is like 420MB (260 is W7 Aero) and like + 100Mb(860MB) in memory for DS process.

Link to comment
Share on other sites

As far as I know all drivers store copies of textures in main memory too nowadays. A few years ago I was writing some shader performance/demonstration/test crap, I guess I could try to find the drive with it... but basically, the last nvidia driver that was not doing that was 10yrs old, no idea about ati etc.

 

Granted, I've stopped following the gpu pipelines/architectures since, so they might've changed their behavior in the meantime.

Link to comment
Share on other sites

I can't seem to repeat (or cause) any form of crash with adventure mode, nor do I see any form of memory spike, with hitd and a few other things going.

 

I have 850mb on survival mode, that jumps up to 930 when entering adv mode, just to fall down to 740. After death, it goes up to 880mb then drops back to 850 after it loads the survival back again.

 

Neither can I get any sort of crash on save/load in adventure mode.

 

Just tried the same with HitD+UA active, avg +100MB higher mem use, still no crashes and no memory spikes... if there were multiple reloadings without freeing memory, I guarantee hitd would crash on 4GB address space, but it doesn't hit even 1GB max use...

It's very likely there's something going on specifically with Mr. Tiddles' Writhe mod causing memory to pile up (seemingly caused by asset loading piling on top of itself). It's a character mod with just a few prefabs, it shouldn't be crashing without this mod anyway.

Link to comment
Share on other sites

It's very likely there's something going on specifically with Mr. Tiddles' Writhe mod causing memory to pile up (seemingly caused by asset loading piling on top of itself). It's a character mod with just a few prefabs, it shouldn't be crashing without this mod anyway.

And after spending roughly 50+ hours just staring at every letter, number, and other symbol in every lua, I just can't find anything.It's probably something super obvious that I'm just missing.

Link to comment
Share on other sites

As far as I know all drivers store copies of textures in main memory too nowadays.

my knowladge about this is very low, but i disagree. Textures which stores in main memory along with video - its DX9 issue. But for Skyrim there exists some ENB which freeing main memory from it. Its very useful since Skyrim have known problem when process will crash after 3,1GB margin.

DX10+ doesnt have this issue.

Dont know anything about opengl

Link to comment
Share on other sites

I have no idea about DX, nor do I see how is it relevant - the game is clearly using opengl -  the main 'bug' above clearly states glerror 505 - which is opengl error for outofmemory.

 

Why are we talking about dx capabilities or behavior of skyrim mods?

 

I guess I did not make it clear I was talking about SDL+OpenGL code, not DirectX  - I assumed the scope of discussion is the one appropriate for memory issues of this game alone.

Link to comment
Share on other sites

Okay, I solved the problem. It was just not showing pics in crafting tab. They're visible again when I have created something.

Link to comment
Share on other sites

Okay, I solved the problem. It was just not showing pics in crafting tab. They're visible again when I have created something.

Could you give an example of a mod and recipe where this happens?

But either way, the cause is likely that the mod declared these assets in the wrong place. Recipe images should be declared in the main Assets table in modmain, not in prefab files.

Link to comment
Share on other sites

*Cough*

As I said before, shields, armors, amulet and staff from HitD and TAP were invisible. When I crafted them, they were back.

Link to comment
Share on other sites

*Cough* As I said before, shields, armors, amulet and staff from HitD and TAP were invisible. When I crafted them, they were back.

 

As far as HitD is concerned, Simplex was right, HitD shields crafting images were not loaded before the first shield is spawned in the world (as they are inventory images reused), and I have not noticed till now. 

 

The error is on our side, fixed locally, will be patched soon

  • Like 1
Link to comment
Share on other sites

Hey @simplex, I just noticed something odd today... Golden nuggets dropped by Alchemy Chest From my EE mod are invisible after returning from U&Aback to the surface, or going from the surface to the clouds (not visible on the ground, but I can still pick them up)... Disabling MemSpikeFix removes this issue... Something you can do with it?

 

If I described it poorly, here are steps to reproduce:

 

1. Have MemSpikeFix, U&A and my EEv2 mods enabled.

2. Create new world, spawn a beanstalk (for quicker testing)

3. Make Alchemy Chest next to a beanstalk, give it something to produce gold nugget (it should appear). Don't forget to pick all nuggets up before next step.

4. Go into clouds, make another A. Chest, make it produce golden nugget. Also take all nuggets.

5. Return to the surface, repeat, look on that nuggets not appearing from the chest.

 

EDIT: Ok, so after doing some testing (about half an hour :-P ), I have managed to get list of items, that are invisible on the ground with MemSpikeFix mod enabled (Too Many Items helped ;-) ) Here is the list:

 

- axe and shovel

- all of the staffs (green, red, blue, yellow, purple, orange)

- straw hat

- night armour

- golden nugget

- tallbird egg (normal, fried and cracked)

- fish and cooked fish

- fireflies (hard to tell, since they disappear, but I wrote it just in case...)

Link to comment
Share on other sites

Hey @simplex, I just noticed something odd today... Golden nuggets dropped by Alchemy Chest From my EE mod are invisible after returning from U&Aback to the surface, or going from the surface to the clouds (not visible on the ground, but I can still pick them up)... Disabling MemSpikeFix removes this issue... Something you can do with it?

 

If I described it poorly, here are steps to reproduce:

 

1. Have MemSpikeFix, U&A and my EEv2 mods enabled.

2. Create new world, spawn a beanstalk (for quicker testing)

3. Make Alchemy Chest next to a beanstalk, give it something to produce gold nugget (it should appear). Don't forget to pick all nuggets up before next step.

4. Go into clouds, make another A. Chest, make it produce golden nugget. Also take all nuggets.

5. Return to the surface, repeat, look on that nuggets not appearing from the chest.

 

EDIT: Ok, so after doing some testing (about half an hour :razz: ), I have managed to get list of items, that are invisible on the ground with MemSpikeFix mod enabled (Too Many Items helped ;) ) Here is the list:

 

- axe and shovel

- all of the staffs (green, red, blue, yellow, purple, orange)

- straw hat

- night armour

- golden nugget

- tallbird egg (normal, fried and cracked)

- fish and cooked fish

- fireflies (hard to tell, since they disappear, but I wrote it just in case...)

I don't get what you mean by picking the nuggets up. Are they supposed to be disappearing whilst in the inventory? Could you clarify that and how axes and the like are disappearing, because I couldn't replicate these issues.

What I did find was that the alchemical chest itself could go invisible when switching to the cloudrealm and back (likely also to caves). This MemSpikeFix version (unreleased as of this post) fixes this issue, could you check if it fixes the other issues you've been experiencing as well?

MemSpikeFix.zip

Link to comment
Share on other sites

I don't get what you mean by picking the nuggets up. Are they supposed to be disappearing whilst in the inventory? Could you clarify that and how axes and the like are disappearing, because I couldn't replicate these issues.

I meant, they are not visible after dropping on the ground... It looks like Alchemy Chest is dropping them (it opens and close some after), and I can pick them up, but they are invisible on the ground... In log.txt I found entries about missing assets, and that pointed me to your MemSpikeFix mod. And I was right - after disabling it, I could not reproduce this issues, so I posted here to tell you about it...

 

I will take a look at posted version in a next couple of minutes, and post if it works...

 

EDIT: It's not working sadly, bug still is the same... I even made a small video to show you what am I encountering. I PM'ed link to it to you. Hope it helps :-)

Link to comment
Share on other sites

I have also noticed that having mem spike Fix and EEv2 on at the same time causes the Vanilla Chests to become invisible after going underground and coming back up.

Link to comment
Share on other sites

HELP! When I open DS it says it crashes and when I try to enable it, its says to be disabled. I tried to change the api from 6 to 5 but it doesnt work... help please?

Link to comment
Share on other sites

HELP! When I open DS it says it crashes and when I try to enable it, its says to be disabled. I tried to change the api from 6 to 5 but it doesnt work... help please?

Maybe change it to 4 ?

Link to comment
Share on other sites

What version of the game are you on? Press backspace at the game menu and in the lower left it will tell you.

Link to comment
Share on other sites

how can i find api?

api_version value? It's inside 'modinfo.lua' file, you can open it in text editor (notepad, etc.)

Link to comment
Share on other sites

Any chance of a Don't Starve Together version, mate? :grin:

It should work just as well for DST as it does for singleplayer DS. However, there are some pending issues with this mod causing some mod assets to not load properly (thus becoming invisible). The base game code really isn't written for this sort of memory optimisation, so due to the large number of corner cases to take care of (and the hacks required to do so) this project has been mostly abandoned, since it really should be something the base game takes care of. So I will not release a version tagged as DST compatible, since I no longer officially support this mod, but you're welcome to use it at your own risk.

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...