Sometime ago i made an thread trying to solve an problem that happened to me with SRD_SuperToolsEngine, some talk before i've discovered that the problem was some files from Supertools that got corrupted at the first time i ran it, solved it, and, new problem, Supertools is causing an error crash while being used together with GameUpgrade, an plugin that is also by SRD, but at that time i was so far satisfied with Super Tools finally working on my project that i simply disabled GameUpgrade and pretended that it never existed while everyone in that thread was like: I can't do it! your problem hasn't been completely solved yet! these two are intended to be the best couple ever (only loosing to Crafting table and Furnace). and yes, i was stupid ignoring this,I should have gone it till the end so I didn't have any more problems left, but them i just got curious again, what should be causing this problem?
MV [SOLVED]Problem using SRD Plugins (maximum call stack size exceeded)
Javascript/Plugin SupportThe stack is a special storage for jump adresses, basically storing where the computer had been processing before a function call to remember where to return to.
that stack is usually enough to store a lot more adresses than needed, which means the ONLY way to exceed it is to have a recursive function call storing the same adresses again and again and again.
However there are several reasons why that could happen.
the most common form is one plugin installed twice
the other option is if two different plugins are using the same function names - that is why every experienced programmer uses a unique identifier at the beginning his function name, so that no other programmer with the same descriptive name for the function have absolutely the same name.
but sometimes less experienced programmers forget that unique identifier and you get identical function names.
there are a few less common ways to cause an overflow, but those would be classified as bugs and result in the plugin never working, so they are unlikely to happen in published plugins.
that stack is usually enough to store a lot more adresses than needed, which means the ONLY way to exceed it is to have a recursive function call storing the same adresses again and again and again.
However there are several reasons why that could happen.
the most common form is one plugin installed twice
the other option is if two different plugins are using the same function names - that is why every experienced programmer uses a unique identifier at the beginning his function name, so that no other programmer with the same descriptive name for the function have absolutely the same name.
but sometimes less experienced programmers forget that unique identifier and you get identical function names.
there are a few less common ways to cause an overflow, but those would be classified as bugs and result in the plugin never working, so they are unlikely to happen in published plugins.
It can also be if you have faulty code that you put into a plugin parameter or notetag. If a piece of code is written so that it calls an executes itself, that will result in a stack exceeded because it will never finish.
The best thing is to download fresh copies of those plugins, make a new project in MV, install the plugins and carefully go through any parameters you're expected to set. Don't actually do anything in terms of notetags or plugin commands, just install them completely and correctly. Playtest the game, make sure there are no errors at that point.
The best thing is to download fresh copies of those plugins, make a new project in MV, install the plugins and carefully go through any parameters you're expected to set. Don't actually do anything in terms of notetags or plugin commands, just install them completely and correctly. Playtest the game, make sure there are no errors at that point.
I've checked carefully if i didn't had the same plugin twice, i didn't, i also didn't modified anything from the original .js files
now, that's very strange, because i did it, put only Supertools and Game Upgrade together, both of them brand new, recently downloaded from SRD website, and the exact same error occurs, i didn't enabled even Community Basic and MadeWithMV and the exact same error occurred, what's wrong with those plugins?
Edit: apparently these two lines from SuperToolsEngine are causing the problem:
bump
they should work together as I use those 3 together with 1-2 other plugins.
can you screenshot your plugin database?
and maybe the event/setup which can cause the loop?
can you screenshot your plugin database?
and maybe the event/setup which can cause the loop?
this won't help, i've literally created an empty project, putted both and the crash happend, but i think i'll give up, it can be an bug of my computer, thought about it now, i didn't tested it on another, so maybe that's the problem.
I got an idea, since i'm suspecting of my computer now, i'll send an new project that i have 100% sure that is crashing here, and ask for you guys if it's for you too, if it isn't, is just my computer, it have a lot off really annoying problems that i didn't know how to solve, but that's not the case for this forum.
Here's the project, i have 100% it is crashing for me, please tell me if is crashing too
Link: https://www.mediafire.com/file/xwhcm3qlbc7vjww/Project1.rar/file
I check the demo and see what it is causing. will get back to you.
EDIT:
@CardeMaker the fix is pretty simple as the order is important!
SRD_GameUpgrade should be above other plugins,
SRD_SupertoolsEngine below it.
this removes the "stack" error.
ordering the plugins is mostly cause 1 if they are incorrect placed,
otherwise, a typo that keeps looping or plugin parameter incorrect
configure to work properly.
if not of the above, a conflict with another plugin, but that is to
narrow things out which one cause to which plugin.
but switch the 2 plugins and your good to go.
EDIT:
@CardeMaker the fix is pretty simple as the order is important!
SRD_GameUpgrade should be above other plugins,
SRD_SupertoolsEngine below it.
this removes the "stack" error.
ordering the plugins is mostly cause 1 if they are incorrect placed,
otherwise, a typo that keeps looping or plugin parameter incorrect
configure to work properly.
if not of the above, a conflict with another plugin, but that is to
narrow things out which one cause to which plugin.
but switch the 2 plugins and your good to go.
IT WORKED!!! THANK YOU!! i can't believe it was so simple, anyway, SRD says explicit that SuperTools should be above everything and everyone, maybe that got outdated, is there some chance of bugs happening in future because of this? else this thread can be closed.
It is always possible, but if you're having issues, it may be worth reaching out to the plugin dev for additional help by whatever means they deem appropriate- such as the plugin's own thread if that is around on here, or on their own site if they have their plugins hosted elsewhere.
Most of us plugin devs are willing to help folks especially where bugs might be involved with our own code (or maybe that's just me, idk lol).
maybe gameUpgrade was made later than SuperTools and should be above
all his plugins, but there is probably something missing in GameUpgrade
that cause the stack in superTools if it is already called and this called it twice.
GameUpgrade is above SuperToolsEngine where all other SRD is below them.
Good luck with your project.
all his plugins, but there is probably something missing in GameUpgrade
that cause the stack in superTools if it is already called and this called it twice.
GameUpgrade is above SuperToolsEngine where all other SRD is below them.
Good luck with your project.
Original thread: https://forums.rpgmakerweb.com/threads/solved-problem-using-srd-plugins-maximum-call-stack-size-exceeded.149722/