game.exe - memory (over)load

Soulrender

Veteran
Veteran
Joined
Jan 12, 2019
Messages
402
Reaction score
232
First Language
Poland
Primarily Uses
RMMV
I'm not sure what this may causing (I can only guess it's some plugin(s) fault), but my
project during test-play constantly increase memory load. Starting value of RAM load
is approximitly 270.000K according to my task manager and every passing second usage
of RAM is increasing approximitly by 100k - 150k and in some point (about an hour of gameplay)
windows show notification that RAM is almost full, this never happened before and any changes
in plugins what I made is just storing skill damage formulas and states in JS files.

To be more precise this is list of plugins I have installed in my project - https://prnt.sc/r8c2z5

And only parallel common events I have in game are just HP/MP/TP regeneration for actors
with extra protection, I check if actor is in party and it is NOT affected by KNOCKOUT state.
Like this: https://prnt.sc/r8c3t5 and autosave event wich is alternative for YEP_X_Autosave.js plugin
wich for some reason causes my game to freeze, but I also in this event implemented some protection
to not overload game to much.

I suspect it may be caused by either TerraxLightning plugin or Khas Advanced Fog plugin, but right
now I don't have time to test it, so I'm asking if someone had similar problem. I'm using RPG Maker MV 1.5.1

In addition I'll check later whetter this problem shows on deployed game or not.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,784
Reaction score
12,215
First Language
English
Primarily Uses
RMMV
What version are your core files (they may be different to your editor version, depending on when you first created your project and whether you have updated them manually)?
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
2,589
Reaction score
3,782
First Language
English
Primarily Uses
RMMV
My suspicious is that it's caused by one of the plugins, so I'm moving this thread to plugin support.

Moved to Javascript/Plugin Support

 

Soulrender

Veteran
Veteran
Joined
Jan 12, 2019
Messages
402
Reaction score
232
First Language
Poland
Primarily Uses
RMMV
@Shaz

Yanfly's Core plugins:

YEP_Core.js - ver. 1.25
YEP_BattleEngineCore.js - ver. 1.45
YEP_BuffStatesCore.js - ver. 1.16
YEP_DamageCore.js - ver. 1.07
YEP_EnemyLevels.js - ver 1.09
YEP_EquipCore.js - ver. 1.17
YEP_IconBaloons.js - ver 1.00 - installed, not used yet
YEP_ItemCore.js - ver. 1.30
YEP_MessageCore. ver. 1.19
YEP_ShopMenuCore.js - ver. 1.05
YEP_SaveCore.js - ver. 1.06
YEP_SkillCore.js - ver. 1.12
YEP_TargetCore.js - ver. 1.04

SomeRndmDude plugins:

SRD_GameUpgrade.js - ver. 1.32
SRD_CameraCore.js - ver. 1.05

Khas plugins:

KhasCore.js - ver. 2.0
KhasGraphics.js - ver. 1.1
KhasUltraLightning.js - ver. 4.2
KhasAdvancedFog.js - ver. 3.0

TerraxLightning.js - ver 1.5.1 - here the only change
I made in plugin is slightly lowered opacity from 255 to 250

And that would be all about core files. It's worth to mention all Yanfly's
plugins are downloaded BEFORE (s)he made them payable.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,784
Reaction score
12,215
First Language
English
Primarily Uses
RMMV
I'm sorry - I meant your default core files. The rpg_core.js, rpg_managers.js

I know with one of the older versions there was a problem with RAM. If you started in that version or earlier and never manually updated your project's core files, then that could still be an issue, even though you're using a later version of the editor.

But some of those plugins do seem like they'd be memory hungry.

Can you disable the plugins and see if it continues to happen?
 

Soulrender

Veteran
Veteran
Joined
Jan 12, 2019
Messages
402
Reaction score
232
First Language
Poland
Primarily Uses
RMMV
@Shaz. I'll do it in 40 min. I'm going to shop, but I've wrote this code to check memory leaks.
Code:
require('v8-profiler');

function LeakingClass() {
}

var leaks = [];
setInterval(function() {
  for (var i = 0; i < 100; i++) {
    leaks.push(new LeakingClass);
  }

  console.error('Leaks: %d', leaks.length);
}, 1000);
and I'll see what console displays after I return. But my Core files are 1.5.1
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,492
Reaction score
6,858
First Language
German
Primarily Uses
RMMV
The original MV engine had several memory leaks that were fixed one after another with the first updates.
The last memory leak was removed either in 1.4.0 or in 1.5.0 - I don't remember which one it was.

If you have a newer core version, then the memory leak has to be in one of the plugins.
And as a first guess I would think it's the lighting plugins (lighting as in creating light, not lightning as in electricity), because all Lighting functions are extremely resource-intense and with two of them they might disturb each other as well.

Additionally you should keep in mind that the memory leak could either be in one plugin (in which case it's a programmer error) or it could be in the combination of several plugins that each work correctly alone (in which case it's no ones error, just an incompatibility between two plugins messing with the same area of the code).
 

Soulrender

Veteran
Veteran
Joined
Jan 12, 2019
Messages
402
Reaction score
232
First Language
Poland
Primarily Uses
RMMV
Thanks for the respond. I think I've fixed my problem. It turns out it was SRD_GameUpgrade.js plugin and this was messing with memory load. In addition I also made some fix with my extension to show message (just in case.)

Here how code looked before:
Code:
DisplayText = function(source, line){
   
    const path = "./dialouges/";
   
    var data = ReadFile(path + source + ".txt");
    var handle = Explode(data, "\n");
    var line = Explode(handle[line], "|");
   
    var speech = "<WordWrap>\\hc[ffbd38]" + line[4] + ": \\hc[ffffff]<br>" + line[5];
    if(!$gameMessage.isBusy()){
        if (data[0]){
            $gameMessage.setFaceImage(line[3], Number(line[2]));
        }
        $gameMessage.setPositionType(Number(line[0]));
        $gameMessage.setBackground(Number(line[1]));       
        $gameMessage.add(speech);   
    }
}
and I modified it by adding at the begining $gameMessage.clear() to remove old text before displaying new one.

This actually didn't resolve my problem, but significantly slowed down process.
Result after 6 min of game play: https://prnt.sc/r9cmhz
Starting value: https://prnt.sc/r9cmrz

Please do NOT Close this thread. When I come up with final solution I'll post it here for future similar problems.
 

Ztron5

Villager
Member
Joined
Mar 30, 2018
Messages
11
Reaction score
0
First Language
English
Primarily Uses
RMMV
Any news on this, I have this problem as well. The memory just keeps getting up.
 

Soulrender

Veteran
Veteran
Joined
Jan 12, 2019
Messages
402
Reaction score
232
First Language
Poland
Primarily Uses
RMMV
@Ztron5 first check each plugin you have installed, turn them off all and turn on - test game, turn on second and then again test game. It will be pain in ass work, but eventualy you find wich plugin this causes. In my case it was SRD_GameUpgrade.js plugin, I removed it and it's fine - for now.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,492
Reaction score
6,858
First Language
German
Primarily Uses
RMMV
I have this problem as well. The memory just keeps getting up.
you might have the same effect, but is it extremely unlikely that it is the same cause.
Memory leaks can have dozens of different causes - for example there was a heavy memory leak in the default core engine up until version 1.3 or so, that is why Shaz asked for the core version above.

So you better make your own topic where you can give your game's answers to all possible questions and we can help you where your memory leak comes from.
 

Ztron5

Villager
Member
Joined
Mar 30, 2018
Messages
11
Reaction score
0
First Language
English
Primarily Uses
RMMV
So, after messing around with the plugins I found a conclusion that fixed my problem. . (Memory Leak)
In the option for the plugin SRD_GameUpgrade.js change it the number of images that can be stored in the cache to 10 (default number) and right at the bottom of the options, change the Garbage Collector to 'after each scene', instead of 'automatically'.

Anyway, that solved my problem, people who experienced crashes are no longer having it (the game suddenly closed for them before this).

I hope this helps some other people out there. Thanks for the help, guys.
 

Soulrender

Veteran
Veteran
Joined
Jan 12, 2019
Messages
402
Reaction score
232
First Language
Poland
Primarily Uses
RMMV
Nice, it looks like we had the same issue :D But I didn't know about that specific options :p
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I was planning to release a useless plugin for april fools, but then I thought I let it be.
Tfw every dev around me is using Live2D in their MV games and make me question my skills repeatedly.

Spending the day reworking my maps, especially the first "biome". This time it's not even in the dark. :LZSwink:
Activity on the forums has increased lately, probably because of people staying home. The amount of work for moderators has increased lol.

Forum statistics

Threads
95,522
Messages
929,784
Members
125,791
Latest member
Oersted_LAL
Top