Maximum Call Stack Size Exceeded Error?

Guys, please help (>ლ)
Suddenly this error appeared and i have no clue what to do with it
I tried to turn off one by one plugins i installed and found out if i disabled "Yanfly Party System" plugin,
everything will run fine.
But i quite sure the problem doesn't come from Yanfly plugins, i also tried to turn off those plugins
which has their names showed up in console log (Mog_passive skill , ICFSoft, Yep_RowFormation ...)
but that doesn't solve the problem.
Err, it's worth to mention that plugins' order should has no problem because my game still run
fine like 2 months ago (i do install some new plugins recently but never messed up plugins' order)
Help please T.T

GPcU5RO.png
Generally, this kind of error means that you've installed the same plugin twice (at least it did with Ace scripts) or that you have a couple of plugins that use the same alias name for the same method.
thanks @Shaz i found the problem was another plugin i added recently which modifies Inventory. Hmm, not sure why did it config with Party System :-?
are you sure it conflicted with that one? Look and see if they both alias the same methods.
@Shaz Now i have a look into their codes, both actually "touch" Game_Party here & there, so i think these 2 conflicted each other is very possible.
However i am not sure how to check if they alias same methods. Can you suggest me how to do so, like search for a variable's name? a string? And check the other one has that same variable name in the same function?
The 2 that conflicted is:
https://mrtrivelrpg.wordpress.com/2016/04/04/limited-inventory/
http://yanfly.moe/2015/11/20/yep-29-party-system/
Hey actually i manager to narrow down and found exactly what part caused the conflict
it's this part of Limited Inventory plugin:
Game_Party.prototype.getInventorySpaceTotal = function() {
var base = this._inventorySpace;
var mod = this._modifiedInvSpace;
var equipment = 0;
for (var i = 0; i < this.members().length; i++) {
equipment += this.members().getInventorySpaceBonus();
}

return Math.max(0, (base+mod+equipment));
};
But i don't understand why did it conflict? can you explain it to me?
Where do you get that second bit of text from? That is not in the plugin. If you have that in your script, it means you've changed the plugin somehow.

I believe Yanfly's party system might keep actors in certain slots - so if you have a party of 3 and the leader leaves the party, the two remaining members do not shuffle forward to take the now-empty slot - they stay in slots 2 and 3. I could see that being a potential problem, but not related to the error message you're getting, and I'm not sure it would have anything to do with the code you're showing.

Please remove your limited inventory plugin, redownload and re-add to your project, to make sure you've got an "uncorrupted" version. If the issue still happens, disable the limited inventory plugin, save, and play again. If it really is a conflict between those two, you should not have the issue when the party plugin is enabled but the limited inventory plugin is not.

The error message in your first post seems to be pointing to the passive states plugin.
If you need help with (an) existing plugin(s), you need to post in Plugin Support. Plugin requests is for when you're looking for a new plugin.

I've moved this thread to JS Plugin Support. Thank you.

hi @Shaz the second code trunk was from console log : - ) i removed it to avoid confusing you but why did you still able to read it
anyway, if i disable the Yanfly Party System, the game run fine. If i disable Limited Inventory, the game run fine too.
Below is a trunk of code from Limited Inventory plugin, if i remove the text (bolded), the game run fine also
Game_Party.prototype.getInventorySpaceTotal = function() {
var base = this._inventorySpace;
var mod = this._modifiedInvSpace;
var equipment = 0;
for (var i = 0; i < this.members().length; i++) {
equipment += this.members().getInventorySpaceBonus();
}

return Math.max(0, (base+mod+equipment));
};
One thing to mention is this error happen right after i selected New Game from Title Menu
Before and even now i always skip TitleMenu and go straight into the game with Qplus plugin, and this error never show up so i didn't aware of it. (until i turn off skipTitleMenu by coincidence)

Err now what i really want is to understand what is going on and how could this
for (var i = 0; i < this.members().length; i++) {
equipment += this.members().getInventorySpaceBonus();
}
caused that "Stack error", maybe this can help me to learn to solve plugin conflict problems later? : - )
Alright, so it's more complicated than i thought ( ゚ヮ゚)
I tried to copy those 2 plugins into a fresh project and nothing go wrong :|
(but then why the game ran fine if i turn off either one of them)
err i am really clueless now
Those are not the lines causing the issue. The issue is probably happening because two plugins are using the same alias. The lines you pasted above are not using an alias, and those two plugins are not aliasing the same method anywhere.

As I said, the error message in your first post is talking about the passive states plugin.

Also, if you need to add something and nobody has replied since your last post, edit it and add the new info instead of double posting.
This error is almost always means you have a problem with recursion in JavaScript code, as there isn't any other way in JavaScript to consume lots of stack. Sometimes calling a recursive function over and over again, causes the browser to send you Maximum call stack size exceeded error message as the memory that can be allocated for your use is not unlimited.

How to fix

Wrap your recursive function call into a -

  • setTimeout
  • setImmediate or
  • process.nextTick

Also, you can localize the issue by setting a breakpoint on RangeError type of exception , and then adjust the code appropriately. Moreover, you can managed to find the point that was causing the error by check the error details in the Chrome dev toolbar console , this will give you the functions in the call stack, and guide you towards the recursion that's causing the error.
Necro-post notice: @markvanber

this thread is more than 3 years old now.

Original thread: https://forums.rpgmakerweb.com/threads/maximum-call-stack-size-exceeded-error.94653/