Status
Not open for further replies.

Akrib

Villager
Member
Joined
Jan 28, 2014
Messages
20
Reaction score
0
Primarily Uses
Hello everyone!,


Since this had been adressed several times already, I thought that this would have been fixed:

If I open the menu scene in the game and close it again for a few times in a row, more and more memory will be used, eventually crashing the whole game (with my 4GB RAM Computer this only takes approximately 20 times of reopening the menu).

Is there a way to prevent this from happening? I'm using the "newest" 1.5.2 version of the maker. This problem is a huge setback for me, because if the game crashes after the player opens a menu for fifteen times, I would be forced to leave my project and hope for a bug fix...


Thanks in advance!
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
14,448
Reaction score
15,727
First Language
English
Primarily Uses
RMVXA
No. That is not fixable as it would require some major changes which would slow down the engine drastically. It was decided to leave that alone (for now) as no sane person would realistically open the menu that many times in a row in the 1 - 2 minutes it takes for the garbage collection function to clean up the memory.

But...if you are getting it over a long period of time in a clean project, report it to the dev team and send them your project. But it has to be a clean team, as they take no responsibility for poorly coded plug-ins which cause a memory leak. That you will have to take up with the plug-in writers.
 
Last edited:

kovak

Silverguard
Veteran
Joined
Apr 3, 2016
Messages
1,266
Reaction score
1,571
First Language
PT - EN
Primarily Uses
RMMV
As far as i can tell (since i'm not programmer) this issue is caused by the blur effect applied in the scene.
When i disabled it using YEP CORE ENGINE i had no memory leak issues afterwards.
 

Akrib

Villager
Member
Joined
Jan 28, 2014
Messages
20
Reaction score
0
Primarily Uses
No. That is not fixable as it would require some major changes which would slow down the engine drastically. It was decided to leave that alone (for now) as no sane person would realistically open the menu that many times in a row in the 1 - 2 minutes it takes for the garbage collection function to clean up the memory.

But...if you are getting it over a long period of time in a clean project, report it to the dev team and send them your project. But it has to be a clean team, as they take no responsibility for poorly coded plug-ins which cause a memory leak. That you will have to take up with the plug-in writers.



Thanks for the help, but even after five minutes waiting the amount of memory used is not dropping by any amount. How can i determine, how long the garbage collection needs to actually do something? Or have I missunderstood the GC-function?
(There are not plugins involved, since this appears in a clean new project.)

Btw, this problem also appears when changing maps multiple times.




As far as i can tell (since i'm not programmer) this issue is caused by the blur effect applied in the scene.
When i disabled it using YEP CORE ENGINE i had no memory leak issues afterwards.



I don't really know what you are talking about, do you mean the opacity of the windows or the text padding?
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
37,998
Reaction score
10,554
First Language
German
Primarily Uses
RMMV
Thanks for the help, but even after five minutes waiting the amount of memory used is not dropping by any amount. How can i determine, how long the garbage collection needs to actually do something?
what is your projects core version?
You said that you're using the 1.5.2 of the maker, but that does not automatically mean that your project is also 1.5.2 - you could open a 1.0 project with an 1.5.2 editor, and then the project would still contain the old core with its many memory leaks.

go to your project folder, search for the file named rpg_core.js and open it with a text editor (do not doubleclick it), then read the version number at the end of the title line. no number means 1.0.
 

Alisu

Veteran
Veteran
Joined
Apr 4, 2018
Messages
61
Reaction score
36
First Language
Finnish
Primarily Uses
RMMV
I don't really know what you are talking about, do you mean the opacity of the windows or the text padding?

At least on default, when you open the menu, it shows the current game screen as background, but blurred. That is, the menu windows look like they are transparent frosted glass that shows the game "through" them. Kovak suggested that disabling this blurring effect with Yanfly's Core engine should take the brunt out of the memory leak.
 

Akrib

Villager
Member
Joined
Jan 28, 2014
Messages
20
Reaction score
0
Primarily Uses
what is your projects core version?
You said that you're using the 1.5.2 of the maker, but that does not automatically mean that your project is also 1.5.2 - you could open a 1.0 project with an 1.5.2 editor, and then the project would still contain the old core with its many memory leaks.

go to your project folder, search for the file named rpg_core.js and open it with a text editor (do not doubleclick it), then read the version number at the end of the title line. no number means 1.0.


Hm, my current project is at version 1.6 (rpg_core.js). Could that be causing problems?



At least on default, when you open the menu, it shows the current game screen as background, but blurred. That is, the menu windows look like they are transparent frosted glass that shows the game "through" them. Kovak suggested that disabling this blurring effect with Yanfly's Core engine should take the brunt out of the memory leak.


Ah, thank you, I will try if that works! But I guess this wouldn't be a solution for the buildup of memory usage when changing maps?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
37,998
Reaction score
10,554
First Language
German
Primarily Uses
RMMV
Hm, my current project is at version 1.6 (rpg_core.js). Could that be causing problems?
yes, especially if you've gone back to 1.5.2 with the editor.
the 1.6.0 made some changes that broke a lot of plugins, so I would make a copy of your project as backup and then revert it to 1.5.2 for the time being. Might or might not solve this specific problem, but would help preventing possible other problems with plugins.

Second, keep in mind that memory leaks are additive and often caused by plugins as well. We haven't seen much problems about this specific memory leak since the core was fixed with version 1.4 or so. But if you have a plugin linked to the menu function that has its own memory leak, then that plugin would cause the same effect.
Can you give a screenshot of your plugin manager with all plugins listed? that way we can check for that possibility as well.
 

Akrib

Villager
Member
Joined
Jan 28, 2014
Messages
20
Reaction score
0
Primarily Uses
At least on default, when you open the menu, it shows the current game screen as background, but blurred. That is, the menu windows look like they are transparent frosted glass that shows the game "through" them. Kovak suggested that disabling this blurring effect with Yanfly's Core engine should take the brunt out of the memory leak.
yes, especially if you've gone back to 1.5.2 with the editor.
the 1.6.0 made some changes that broke a lot of plugins, so I would make a copy of your project as backup and then revert it to 1.5.2 for the time being. Might or might not solve this specific problem, but would help preventing possible other problems with plugins.

Second, keep in mind that memory leaks are additive and often caused by plugins as well. We haven't seen much problems about this specific memory leak since the core was fixed with version 1.4 or so. But if you have a plugin linked to the menu function that has its own memory leak, then that plugin would cause the same effect.
Can you give a screenshot of your plugin manager with all plugins listed? that way we can check for that possibility as well.


I just tested this with a 1.5.2 project (.js files changed to the 1.5.2 versions). The problem is still there, even without any plugins or modifications.
 

Nolonar

Veteran
Veteran
Joined
Feb 18, 2018
Messages
503
Reaction score
707
First Language
French, German
Primarily Uses
RMMZ
I just tried to reproduce your problem.
I opened my project, and started mashing the Esc button to toggle the menu on and off.

My memory consumption is fairly stable between 190 and 220 MB, despite opening and closing the menu over 5 times per seconds during 1-2 minutes.

Disclaimer:
I am running 1.6.0 and my menu is customized in that I only have "Items", "Options", "Save", and "Exit". I also made the menu windows transparent.

It's possible that this particular memory leak has already been fixed in 1.6.0.
In case you're wondering: 1.5.2 was released due to critical issues with 1.6.0. You'll either have to wait for 1.6.1 or avoid moving maps around in the editor, and avoid selecting B-E tiles as event sprites.


EDIT:
I just wrote a small plugin that should force the Garbage Collector to do its work when you close the menu. Maybe this'll help in your case?

Code:
(function() {
 var Scene_Menu_createCommandWindow = Scene_Menu.prototype.createCommandWindow;
 Scene_Menu.prototype.createCommandWindow = function() {
  Scene_Menu_createCommandWindow.call(this);
  this._commandWindow.setHandler('cancel', ExitMenu.bind(this));
 };
 var ExitMenu = function() {
  this.popScene();
  gc();
 }
})();
 
Last edited:

Akrib

Villager
Member
Joined
Jan 28, 2014
Messages
20
Reaction score
0
Primarily Uses
I just tried to reproduce your problem.
I opened my project, and started mashing the Esc button to toggle the menu on and off.

My memory consumption is fairly stable between 190 and 220 MB, despite opening and closing the menu over 5 times per seconds during 1-2 minutes.

Disclaimer:
I am running 1.6.0 and my menu is customized in that I only have "Items", "Options", "Save", and "Exit". I also made the menu windows transparent.

It's possible that this particular memory leak has already been fixed in 1.6.0.
In case you're wondering: 1.5.2 was released due to critical issues with 1.6.0. You'll either have to wait for 1.6.1 or avoid moving maps around in the editor, and avoid selecting B-E tiles as event sprites.


EDIT:
I just wrote a small plugin that should force the Garbage Collector to do its work when you close the menu. Maybe this'll help in your case?

Code:
(function() {
 var Scene_Menu_createCommandWindow = Scene_Menu.prototype.createCommandWindow;
 Scene_Menu.prototype.createCommandWindow = function() {
  Scene_Menu_createCommandWindow.call(this);
  this._commandWindow.setHandler('cancel', ExitMenu.bind(this));
 };
 var ExitMenu = function() {
  this.popScene();
  gc();
 }
})();


Thanks, but sadly this doesn't seem to work for me.
 
Last edited:

Alisu

Veteran
Veteran
Joined
Apr 4, 2018
Messages
61
Reaction score
36
First Language
Finnish
Primarily Uses
RMMV
Could that possibly mean that the problem is more in your setup's inability to handle garbage collecting, regardless who was using javascript?
 

Zelta1

Villager
Member
Joined
May 27, 2019
Messages
7
Reaction score
0
First Language
english
Primarily Uses
RMMV
thanks guys. i had the same problem, checked the plugins one by one. yanfly's and other dont make me memory leak.
but Sumrndmde window upgrade make me a very big memory leak until the game crashes. its a very nice plugin, but dont work for me :(
 

_Shadow_

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
4,088
Reaction score
2,689
First Language
Greek
Primarily Uses
RMMZ

@Zelta1, please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.


Also this is a completely different case you are discussing here. Either ask on a thread for that plugin, or create a thread on your own, giving us a link to that plugin and asking for help with your issue. Don't hijack other threads pleases. Closing this

 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

random doodles from yesterday. Thoughts?

characters-10000.png
Oh error that I cannot pin point and that does not consistently occur. You have caused me to start from... the beginning.
gCcZIwO.gif

Expressions! Curse GIFs color limitation.
Collecting Stream thumbnails, don't mind me. :kaopride:



now you can smash up cars on the street lol...

Forum statistics

Threads
129,901
Messages
1,206,114
Members
171,085
Latest member
Zero94
Top