Received over 4GB Ram usage in about 30 minutes of playtime. Unacceptable really, runing with task manager open it doesn't seem to free any of the memory but just loads and load and loads new things when I go into new battles and the more I play, the more resources it consumes. With 64-bit process I am sure I could go to like 8GB usage at this rate when playing a long game for a long time. The more I play the more memory I use without it seemingly ever be freed, meaning that the game's can brig low RAM computers even though they shouldn't consume even half that much RAM.
RPG Maker MV game uses way too much memory
RPG Maker MV SupportWhat version of MV are you in right now and are your projects updated?
Which plugins do you use? Some can cause memory leaks, for example preloader plugins (SRDude's preloader core's been known for memory leaks).
Another issue could be the app unifying all files in one executable, which is a great protection, but completely sucks in terms of ram consumption.
To fix your point a bit though... Don't worry, nothing bad happens from RAM overload except for the fact that the Windows will keep crashing that game to free up some RAM.
Another issue could be the app unifying all files in one executable, which is a great protection, but completely sucks in terms of ram consumption.
To fix your point a bit though... Don't worry, nothing bad happens from RAM overload except for the fact that the Windows will keep crashing that game to free up some RAM.
1.5.1 and yes.
Damnit, really? But it makes loading so much better.
Don't tell me I have to give up on this great plugin and force players to load every single screen again, because that's not fun.
Yep, had to remove his Preloader Core from my recent game for this very reason. Was actually causing random crashes for a few people. And he hasn't updated any of his plugins for awhile now.
@SimProse The random crashes came from the RAM overload. When RAM overloads, Windows begin crashing apps to free up some RAM... And eventually crash the game.
@Tuomo L You can bypass it by preloading it manually. If you preload it manually, through... Let's say... A parallel process event, then it should be more manageable. For example I programmed it so that I have to input notetags into the maps... And these notetags show each possible teleportations. And I preload only these maps. When I don't need them, I destroy them and let the garbage collector deal with it.
@Tuomo L You can bypass it by preloading it manually. If you preload it manually, through... Let's say... A parallel process event, then it should be more manageable. For example I programmed it so that I have to input notetags into the maps... And these notetags show each possible teleportations. And I preload only these maps. When I don't need them, I destroy them and let the garbage collector deal with it.
Yep. I have 12 GB of RAM and not many running apps, so it never did that to me. But others with less RAM and more active programs, within 15 mins they were crashing. Once the Preloader Core was removed, solved the issue. A shame, as it does speed up games a bit.
It does indeed.
Since I use PIXI, I don't need to worry about that.
https://github.com/pixijs/pixi-sound takes care of preloading my sounds
and default PIXI takes care of my images.
However, I use modified core scripts, built around pixi instead of the other way around. These things aren't really compatible with the default things, since PIXI uses its's own cache, and due to this reason even default garbage collector doesn't apply to them.
Since I use PIXI, I don't need to worry about that.
https://github.com/pixijs/pixi-sound takes care of preloading my sounds
and default PIXI takes care of my images.
However, I use modified core scripts, built around pixi instead of the other way around. These things aren't really compatible with the default things, since PIXI uses its's own cache, and due to this reason even default garbage collector doesn't apply to them.
Also what's this about known? I didn't see anywhere on website or forums say "NEVER USE THIS PRELOADER IT WILL LITERALLY BREAK YOUR GAME"
I mean this is a really major bug. You'd think there'd be a ton of people report and there being huge red letter warning people not to use this plugin then. Now the memory leak issue was like a ninja, when you notice it, it's already too late.
Hm... Maybe you're using too many different tilesets and storing too many musics using SRD Preloader.
Try storing less musics(Store only 1 or 2) in cache and use this script in transition maps(a blank map, without tileset, very small that says something, just for enough time to unload all images and load the new ones you're going to use, using the SRD preloader plugin command that i forgot now):
ImageManager.clear()
Try storing less musics(Store only 1 or 2) in cache and use this script in transition maps(a blank map, without tileset, very small that says something, just for enough time to unload all images and load the new ones you're going to use, using the SRD preloader plugin command that i forgot now):
ImageManager.clear()
@Tuomo L
would be unreasonable. There is no viable way for keeping everything preloaded without memory leaks, unless you preload only a very small portion of it or preload only what you need. Even TDDP_Preload manager suffers from memory leaks.
Probably that's what she/he(idk ok? I'm dumb ;-; ) did. Tried to preload everything and because of that, stored lots of assets in memory.
But, as i see with my game, RM MV doesn't unload things from memory(it started raising from 200 MB to 600MB ) so probably using that script i've sent some times should help.
EDIT: Try also using SRD Game Upgrade and change "garbage Collectioh mode" to "On scene change". It helps a bit...
So, it's a lose-lose situation that I can't fix?
Because I am running without SRD and now have over 4.5 GB used without even being halfway into the game. :rswt2:
EDIT: Over 6 GB already. Game doesn't free the memory automatically as I said and forces me to reboot the game and restart it.
There's absolutely 0 reason my game would require you to have nearly as much of RAM avaivable as Skyrim's Special Edition
MV unloads things from memory, by default. The reason why these plugins give memory leaks is because they tinker with caches. For example in MV 1.5.0 the plugin creates ImageManager.precache and uses that to reference if things are properly preloaded. The reason for that is simple - if you preload everything into normal cache, garbage collection will immediately collect it.
But that is not the case of things in precache. The garbage collection clears things that are referenced in cache, but they are also referenced in precache, which the garbage collector doesn't know. So while the image itself gets collected, its' reference doesn't. So the imagemanager will load the image again, having one now empty reference and one fresh reference, which will become obsolete after GC collects the image again.
And the most brutal thing is, every normal bitmap ends up like this (so sprites etc.), even those you don't really preload.
@Tuomo L ImageManager.clear() may help.
Now I wonder, how huge did you set your image cache in the community script?
But that is not the case of things in precache. The garbage collection clears things that are referenced in cache, but they are also referenced in precache, which the garbage collector doesn't know. So while the image itself gets collected, its' reference doesn't. So the imagemanager will load the image again, having one now empty reference and one fresh reference, which will become obsolete after GC collects the image again.
And the most brutal thing is, every normal bitmap ends up like this (so sprites etc.), even those you don't really preload.
@Tuomo L ImageManager.clear() may help.
Now I wonder, how huge did you set your image cache in the community script?
I didn't touch it. It's 10.
I had trouble with SRD Preloader myself.
So I've been using this preloader plugin, which worked great for me.
So I've been using this preloader plugin, which worked great for me.
That gave me 6 GB+ Ram usage.
Could it be possible that our games run inside a webbrowser without interface and THAT webbrowser is the one consuming a lot of memory?
Because even if the game loads ALL my musics and images...it shouldn't go over 100MB...
Because even if the game loads ALL my musics and images...it shouldn't go over 100MB...
I see. 6 GB... Hmm, is there some other plugin that handles resources? Because MV doesn't have memory leaks by default.
Original thread: https://forums.rpgmakerweb.com/threads/rpg-maker-mv-game-uses-way-too-much-memory.87751/