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 3
  • Thanks 1



User Feedback



Recommended Comments

Thank you very much, that fixed my Writhe mod. I'll make sure to say "This mod will help" with a link to this. Much easier than having to re-write the bloody thing. You, Simplex, are a genius!

  • Like 1

Share this comment


Link to comment
Share on other sites

Thank you very much, that fixed my Writhe mod. I'll make sure to say "This mod will help" with a link to this. Much easier than having to re-write the bloody thing. You, Simplex, are a genius!

Thanks, glad to be of use!

Cheerio also pushed a fix to the base game (which will be released in the next update, whenever that will be) stopping mod assets from being loaded twice; when that's released, the issues with memory usage should become even smaller. Hopefully the fix implemented in this mod will also make into the base game eventually.

Share this comment


Link to comment
Share on other sites

interesting, but enabling LAA able to help with it or LAA must be supported in game code as well?

With this mod, LAA shouldn't be necessary, but both address different things. LAA would prevent a crash when reaching the 2GB limit; this mod makes mod prefab assets be loaded only when needed, instead of loading all assets for all mod prefabs when mods are loaded (even in the main screen), so it decreases overall memory usage considerably (and makes the game start much faster, since it no longer loads all mod assets* when starting).

* twice, in RoG.

  • Like 1

Share this comment


Link to comment
Share on other sites

Thanks, glad to be of use!

Cheerio also pushed a fix to the base game (which will be released in the next update, whenever that will be) stopping mod assets from being loaded twice; when that's released, the issues with memory usage should become even smaller. Hopefully the fix implemented in this mod will also make into the base game eventually.

Fantastic. I was wondering what was causing the issue all this time. I hope it will, too.

  • Thanks 1

Share this comment


Link to comment
Share on other sites

I am using like 50 mods all the time and I have noticed longer loading times.. maybe twice as long as vanilla. But just enabling this mod didn't bring any noticable difference so I would like to ask if there is something particular needed besides manually enabling this mod in menu to get it working fully. Or maybe 1.5 longer loading times than vanilla is what is supposed to be expected?

Share this comment


Link to comment
Share on other sites

I am using like 50 mods all the time and I have noticed longer loading times.. maybe twice as long as vanilla. But just enabling this mod didn't bring any noticable difference so I would like to ask if there is something particular needed besides manually enabling this mod in menu to get it working fully. Or maybe 1.5 longer loading times than vanilla is what is supposed to be expected?

This mod will not help (significantly) with loading times in all cases. It will reduce the loading caused by mod prefabs (basically "entities" it adds to the world), but will not affect the loading time caused by other mod additions (HUD elements and other images, for example).

  • Like 1

Share this comment


Link to comment
Share on other sites

Thank you! You're the best. Now only few things from TAP (that, which I don't using) are invinsible! It is really better than every-time-crash! :D

Share this comment


Link to comment
Share on other sites

Thank you! You're the best. Now only few things from TAP (that, which I don't using) are invinsible! It is really better than every-time-crash! :grin:

Which things are invisible? There shouldn't be any.

Share this comment


Link to comment
Share on other sites

Uhmm... Lightning staff, calm amulet and all weapons, armors and, from HitD, shields.

Edit: I think, all things that can be worn (in TAP and HitD too)...

Share this comment


Link to comment
Share on other sites

Uhmm... Lightning staff, calm amulet and all weapons, armors and, from HitD, shields.

Edit: I think, all things that can be worn (in TAP and HitD too)...

I'm not getting this issue... With HitD, at least.

xlCqRGp.png

  • Like 2

Share this comment


Link to comment
Share on other sites

HitD shields/weapons are showing for me, are you sure you're not mistaking something?

 

EDIT: bah beaten again :razz:

 

Note that fire/cold armors simply do not have graphics when worn, so that is not this mod's issue. Everything else seems to be loading fine for me...

  • Like 1

Share this comment


Link to comment
Share on other sites

Uhmm... Lightning staff, calm amulet and all weapons, armors and, from HitD, shields.

Edit: I think, all things that can be worn (in TAP and HitD too)...

HitD shields/weapons are showing for me, are you sure you're not mistaking something?

What I did just find out is that there's an "animation level" incompatibility between Tiny Alchemy Powers and Hero in the Dark. If you equip a HitD shield and TAP's calm amulet (possibly other items as well, but I just tested this one) only the animation of the last one will show, overriding that of the previous one. So if you have a HitD shielf equipped and then equip the calm amulet, the shield will disappear; but if you equip the shield last, it is the amulet that will disappear (very likely due to animation symbol hiding and all that).

But this happens regardless of MemSpikeFix being enabled or not.

(and TAP's calm amulet is showing for me with MemSpikeFix enabled, except under the scenario discussed above)

Share this comment


Link to comment
Share on other sites

That means I just have too many mods (+60) installed :/ But still I don't want to delete any of them (most of them are minor mods that balancing my game)...

Share this comment


Link to comment
Share on other sites

That's the issue with override symbols, the equipslots are separate but both armors and amulets are using swap_body symbol. It's not an issue without hitd (or rpghud for that matter) but with them one will override the other. Not too much I can do about it either.

 

That is just override being replaced tho, not being invisible.

 

EDIT: added to known issues list, actually surprised noone complained about it and I forgot.

Share this comment


Link to comment
Share on other sites

That's the issue with override symbols, the equipslots are separate but both armors and amulets are using swap_body symbol. It's not an issue without hitd (or rpghud for that matter) but with them one will override the other. Not too much I can do about it either.

 

That is just override being replaced tho, not being invisible.

Oh yes, it's the same animation symbol...

(this is such an old issue with mods adding a dedicated amulet slot, I can't believe I forgot about it)

But anyway, this was the closest thing to either becoming invisible I could find. Maybe @Minik435 could go into more detail.

Share this comment


Link to comment
Share on other sites

Uhm, I'll try :/

But I don't know if I'll have time... I really need to done my gemswords but the lightning sword is the hardest thing, so I need to re-write it yet :/

I don'think that TAP or HitD are incompatible with something... I think, I need to delete some unused mods. Then I'll post reaction on it.

Share this comment


Link to comment
Share on other sites

With this mod, LAA shouldn't be necessary, but both address different things. LAA would prevent a crash when reaching the 2GB limit; this mod makes mod prefab assets be loaded only when needed, instead of loading all assets for all mod prefabs when mods are loaded (even in the main screen), so it decreases overall memory usage considerably (and makes the game start much faster, since it no longer loads all mod assets* when starting).

* twice, in RoG.

thx for reply, but i am mean, enabling LAA flag on exe is enough to make it work or LAA support must be coded in game?

LAA + your mod = less chance to crash :-). Well i am not tested yet UpAndAway and never had any problem like description mentioned. Bit surprised that this game can eat so much memory with textures. Its not Skyrim :-)

Share this comment


Link to comment
Share on other sites

This seems to not affect when you die in adventure. When I died in adventure, I still got the crash, and the bottom of the log was just reloading the mods about 5 times again. Is this just me?

Share this comment


Link to comment
Share on other sites

thx for reply, but i am mean, enabling LAA flag on exe is enough to make it work or LAA support must be coded in game?

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 + your mod = less chance to crash :-). Well i am not tested yet UpAndAway and never had any problem like description mentioned. Bit surprised that this game can eat so much memory with textures. Its not Skyrim :-)

The problem described is likely to only happen when you have large mods enabled, such as Up and Away. And Don't Starve doesn't use much memory, it's just much more wasteful when it comes to mod assets than it is with its own assets. This mod only changes how mod assets are handled.

Share this comment


Link to comment
Share on other sites

This seems to not affect when you die in adventure. When I died in adventure, I still got the crash, and the bottom of the log was just reloading the mods about 5 times again. Is this just me?

There's no way this mod may not be working when you die in adventure if it's working in other scenarios. There's nothing specific about that scenario.

What is likely happening is that mod assets are being reloaded multiple times on top of each other after dying in adventure, without releasing the old memory, so even if this mod is reducing memory usage, it's being multiplied beyond the limit anyway. Hopefully Cheerio's fix for multiple mod asset loading will take care of this case.

But you may also have a memory leak in your mod. It's a bit strange Writhe could push the memory beyond the limit anyway, since it's not a large mod.

Share this comment


Link to comment
Share on other sites

There's no way this mod may not be working when you die in adventure if it's working in other scenarios. There's nothing specific about that scenario.

What is likely happening is that mod assets are being reloaded multiple times on top of each other after dying in adventure, without releasing the old memory, so even if this mod is reducing memory usage, it's being multiplied beyond the limit anyway. Hopefully Cheerio's fix for multiple mod asset loading will take care of this case.

But you may also have a memory leak in your mod. It's a bit strange Writhe could push the memory beyond the limit anyway, since it's not a large mod.

Ah. Well that's a bummer, seeing as one of Writhe's character-specific items is only available to him in adventure mode.

 

I think it's strange, as well.  I'll be redoing the modmain with a fresh .lua, since removing every single prefab from the mod doesn't remove the issue. 

 

I have about 600 lines of just

scripts/mods.lua(264,1) Mod: Writhe Registering prefabs scripts/mods.lua(270,1) Mod: Writhe   Registering prefab file: prefabs/writhe scripts/mods.lua(274,1) Mod: Writhe     writhe scripts/mods.lua(270,1) Mod: Writhe   Registering prefab file: prefabs/daddiesvest scripts/mods.lua(274,1) Mod: Writhe     daddiesvest scripts/mods.lua(270,1) Mod: Writhe   Registering prefab file: prefabs/writhetools scripts/mods.lua(274,1) Mod: Writhe     writhetool_1 scripts/mods.lua(274,1) Mod: Writhe     writhetool_2 scripts/mods.lua(274,1) Mod: Writhe     writhetool_3 scripts/mods.lua(274,1) Mod: Writhe     writhetool_4 scripts/mods.lua(270,1) Mod: Writhe   Registering prefab file: prefabs/writhetools2 scripts/mods.lua(274,1) Mod: Writhe     writhetool_f scripts/mods.lua(274,1) Mod: Writhe     writhetool_h scripts/mods.lua(274,1) Mod: Writhe     writhetool_b scripts/mods.lua(270,1) Mod: Writhe   Registering prefab file: prefabs/hat_writhediviner scripts/mods.lua(274,1) Mod: Writhe     writhedivinehat scripts/mods.lua(287,1) Mod: Writhe   Registering default mod prefab ../mods/MemSpikeFix/memspikefix.lua(73,1) MEMFIXING Writhe MiniMapComponent::AddAtlas( minimap/minimap_data.xml )MiniMapComponent::AddAtlas( ../mods/Writhe/images/writhe.xml )

repeated in the log.txt, right at the bottom. The only thing beneath it being 

scripts/components/seasonmanager.lua(1528,1) SPRING TIME

Share this comment


Link to comment
Share on other sites

Ah. Well that's a bummer, seeing as one of Writhe's character-specific items is only available to him in adventure mode.

 

I think it's strange, as well.  I'll be redoing the modmain with a fresh .lua, since removing every single prefab from the mod doesn't remove the issue. 

 

I have about 600 lines of just

Do you also have a bunch of repeated asset loading blocks with MemSpikeFix disabled?

(MemSpikeFix should have no impact on that, but it doesn't hurt to check)

Share this comment


Link to comment
Share on other sites

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.

this game is not updating so often :-)

and enabling is just 1 click

Share this comment


Link to comment
Share on other sites

Do you also have a bunch of repeated asset loading blocks with MemSpikeFix disabled?

(MemSpikeFix should have no impact on that, but it doesn't hurt to check)

No, adventure works fine without MemSpikeFix enabled. But it still crash when I tried to save and quit. Weird, it fixes saving and quitting, but adventure mode seems to only actually crash WITH it enabled. I'll keep testing, but at the moment I've only been able to reproduce the crash with MemSpikeFix enabled. And the log doesn't repeat asset loading when I die in adventure, either.

 

Since all of his hand tools work almost the same, I put them all the basic ones in one prefab, and the special ones (Torch, hammer, and bugnet) in another to save room, could that be the cause of my issue? Nevermind, I get the error even if I get rid of the prefabs altogether.

Share this comment


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