weirdest lag issue you will see ever, need help fixing it

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
alright, its enough. $100 CAD for anyone that find the problem and removes any stacking;

the memory problem have been found by myself, sequences are upping the memory but it never goes down, l will pay $20 CAD for a script that fixes that and $15 CAD for removing all stacking problems mithran script has found

probably enough people got my scripts now, PM me if you're looking to fix the problem and want the list

after over 1 month of testing, l finally pinpointed the cause of the lag

something with battle commands make the combat sequences lagging after a while

the lag can be seen on this video



the battle start at 9:30
so far l noticed that:

the lag only happen when actors do a sequence and when victory aftermath closes after the battle

the lag only happen after a while ingame(never in test battle) when there are 2 or more enemies

l have a huge memory dump of over 400k

objects in the cache can go for over 150 when there are normally only 50

update: cutting out battle manager drastically cut the lag over the first 10 turns but the memory still goes up (350k after 15 turns) and the lag come back

open and closing the menu 2 times to clear the cache after each fight helps stopping the lag for the next fight

closing victory aftermath does not freeze unlike when command manager wasnt disabled

if you want to help me fix battle command script either made by yanfly or tsukihime, l will give you my script data

https://yanflychannel.wordpress.com/rmvxa/battle-scripts/battle-command-list/

http://himeworks.com/2014/10/command-manager/

if there's anything not clear, you can reply here or pm me

l can also pay in CAD if the issue is even more complicated than l think
 
Last edited by a moderator:

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
185
First Language
Meowish
Primarily Uses
When it comes to memory leaks, it's hard to pinpoint which script causes the problem unless you run that debugger and show us the list.

It might lags only during battle but that only means your battle system need lots of resources to process, and during memory leaks, the resources are low, thus slowing everything down.

If you read through the explanation Mithran gave, memory leaks often happens when you didn't dispose certain sprites/bitmaps correctly or doing it in bad orders. eg, Windows/Viewports are disposed before a bitmap, causing the bitmap to linger in the memory.

So, when it comes to graphic, it can be anything. Not just your battle scripts, any scripts you are currently using can be the cause. Run that script and check the logs. Pull out all the scripts listed in it and see if the problem persist. If you have trouble reading that list, Mithran is still active and in support, read the last page of that tread and there's a good explanation on how things goes.

And oh, might not be related to the memory leak, but having a HUGE icon sheet can cause lag/sudden crash oftenly, especially during skill/item selection. Try reduce that to as small as possible and you might see some improvements.(You still need to deal with your current memory leak problem though)
 

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
l already know the cause is the battle command script and its not during skill selection but when an actor does a action sequence.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,874
First Language
English
Video is too long. Where does the lag occur?


And two scripts have been referenced. Are you saying both scripts are causing the lag?


Have you tried testing whether the lag occurs without those two?
 

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
the lag still happen when victory aftermath is disabled

battle starts at 9:30
 

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
185
First Language
Meowish
Primarily Uses
The video shows an error right before you enter the battle. There's a missing bitmap, so i believe one of your script that handles it tries to find it over and over again causing the lag. Have you tried replacing the graphic in that pop up?
 

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
no, its an optional graphic from MOG HP boss meter
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,874
First Language
English
no, its an optional graphic from MOG HP boss meter
But have you tried to put in a dummy graphic anyways?

the lag still happen when victory aftermath is disabled


battle starts at 9:30
My question is when the lag occurs in the video, not when the battle begins.


You have a big square that appears in the middle of the screen. Have you tried disabling that? Or is that square the lag you are referring to?


I'm also talking about the battle command scripts, since apparently both command scripts are causing performance issues and it doesn't seem like you have tried disabling every combination of scripts yet and is assuming it has to be the battle command scripts.
 
Last edited by a moderator:

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
disabling the script causing the bitmap missing(mog boss hp) does not stop the lag

you can see that the lag is over time and just making it at the end of the video will put a 5 sec freeze on sequences.

the square is a sequence that is no way related to the lag

l said already that disabling battle command remove the lag completely
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,874
First Language
English
When you disabled the battle commands script, did you playtest for 10 minutes as well?


What happens when you disable MOG's battle script?
 

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
l did the same test over 100 times until l got this result, whole first part of the game until l get the 3 enemies encounters

if you mean MOG - Battle Command EX script, nothing new happen
 
Last edited by a moderator:

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
185
First Language
Meowish
Primarily Uses
You mentioned 2 scripts there(Yanfly's and Tsukihime's), both causing the same problem. Both has something to do with modifying the battle commands.

So the answer is pretty straight forward from there, you have another script that conflicts with either of those 2 scripts you mentioned.

Most probably a script you placed below those 2 scripts. If moving the script orders doesn't help fix it, then that one OTHER script didn't alias a method properly causing the 2 scripts mentioned (or any other new scripts you will be adding that modifies battle command) to malfunction.

Try remove your script one by one and do a 10 minute test play to find the culprit. Just a hunch but it might turns out to be one of MOG script.
 

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
.............

do you really think l use both at the same time? it mean l tried both to fix the lag

update: cutting out battle manager drastically cut the lag over the first 10 turns but the memory still goes up (350k after 15 turns) and the lag come back

open and closing the menu 2 times to clear the cache after each fight helps stopping the lag for the next fight

closing victory aftermath does not freeze unlike when command manager wasnt disabled
 
Last edited by a moderator:

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
185
First Language
Meowish
Primarily Uses
Read carefully, i said either, never said you use both script at the same time.

But simply using either script is causing the same lag is it not?

That means, you have ANOTHER script that causes EITHER script to malfunction.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,874
First Language
English
l did the same test over 100 times until l got this result, whole first part of the game until l get the 3 enemies encounters


if you mean MOG - Battle Command EX script, nothing new happen
Ok, so up to now, you know that


1. The lag that occurs appears to be when it's trying to load a graphic. From the last few minutes of the video, you can see that once the battler runs across to the enemy, it will pause for a second or two before changing to a new graphic.


2. Without yanfly or my battle commands script, the game runs perfectly fine. No abnormal increase in memory, no lag occurs during action sequences.


3. The issue only occurs with those 3 enemies. The first 20 minutes basically do not matter, and even during the battle, everytime an action occurs, memory usage increases.


I mean it is entirely possible that both implementations of battle commands are doing funny things when you pair it up with MOG's battle system. I've never tried that battle system so I can't say for sure that mine doesn't.


If the memory consumption is just going up and up after a couple turns, my first suspect would be graphics.


Are those animated battlers a separate script?
 
Last edited by a moderator:

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
moghunter doesnt have a battle system that isnt ATB, so l expect you mean hud

the side view is theo tsbs

also from the update l did, the lag does still occur without battle manager after, just much later on

lastest gobj stack

Memory Leak #<Window_Message:0x23fd2fc8>
In Scene Scene_Battle
Creation Stack::
Script 0117 -- Scene_Battle, Line: 175:in `create_message_window'
Script 0154 -- ▼Scene Interpreter, Line: 116:in `start'
Script 0117 -- Scene_Battle, Line: 12:in `start'
Script 0185 -- YEA - Enemy Last Selection, Line: 31:in `start'
Script 0195 -- MOG_Battle_Hud_EX, Line: 1518:in `start'
Script 0282 -- ▼Implementation v1.4, Line: 6147:in `start'
Script 0100 -- Scene_Base, Line: 12:in `main'
Script 0122 -- Mithran - Graphics Obj Ref, Line: 229:in `main'
Script 0124 -- ▼Killozapit - Cache Back, Line: 269:in `main'
Script 0006 -- SceneManager, Line: 23:in `run'
Script 0154 -- ▼Scene Interpreter, Line: 105:in `run'
Script 0392 -- Main, Line: 12:in `block in <main>'
:1:in `block in rgss_main'
:1:in `loop'
:1:in `rgss_main'
Script 0392 -- Main, Line: 10:in `<main>'
ruby:in `eval'
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,874
First Language
English
Have you tried taking out the cache back script?
 
Last edited by a moderator:

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
the lag still happen

Time: 2015-09-18 14:04:59 -0400
Memory Leak #<Window_Message:0x2101d904>
In Scene Scene_Battle
Creation Stack::
Script 0117 -- Scene_Battle, Line: 175:in `create_message_window'
Script 0153 -- ▼Scene Interpreter, Line: 116:in `start'
Script 0117 -- Scene_Battle, Line: 12:in `start'
Script 0192 -- MOG_Battle_Hud_EX, Line: 1518:in `start'
Script 0279 -- ▼Implementation v1.4, Line: 6147:in `start'
Script 0100 -- Scene_Base, Line: 12:in `main'
Script 0122 -- Mithran - Graphics Obj Ref, Line: 229:in `main'
Script 0006 -- SceneManager, Line: 23:in `run'
Script 0153 -- ▼Scene Interpreter, Line: 105:in `run'
Script 0389 -- Main + Debug, Line: 10:in `block in <main>'
:1:in `block in rgss_main'
:1:in `loop'
:1:in `rgss_main'
Script 0389 -- Main + Debug, Line: 8:in `<main>'
ruby:in `eval'
 

Latest Threads

Latest Profile Posts


Finally done with the school project, here's the raw video of it. o_O :smile:
Can February March? No, but April May.
Alisa: Prophecy of the Falling Stars. Join Alisa, a quiet girl with a heart filled with love and hope, on her journey to prevent a calamity. My next RPG Maker music pack is my largest and most focused pack yet. It's a musical story that focuses on a young heroine named Alisa who has been assigned the ultimate task to prevent a calamity.

SnJj_O.png

Forum statistics

Threads
111,169
Messages
1,058,931
Members
144,416
Latest member
Parkji
Top