Technical Issue (Optimize Crashing)

So... I'm using the Yanfly equip core, and for some reason, whenever anyone uses the "optimize" option in my game's equipment screen, it causes the game to crash.
The game's mechanics don't really need this option honestly, so if there were a way to either fix the issue, or remove the optimize option entirely, that would be REALLY appriciated. Thank you.
there is always a reason for any crash, but it is difficult to pinpoint without the exact error message/trace.

that said, the most common causes for strange effects with yanfly are
1) wrong order of plugins
2) tried to continue an incompatible savefile instead of using new game.
Does it crash for you in your playtest? Can you just give us a screenshot of the error trace (press F8, Console tab)?
Does it crash for you in your playtest? Can you just give us a screenshot of the error trace (press F8, Console tab)?
Yes, it does.
Both in playtest mode and in published versions.
@Aquin25 that is not the console tab - the elements tab is useless for bughunting.
try again and switch to console at the top before making the screenshot.
Screenshot (17).png
you need to configure your equipment correctly.

"of undefined" always means that the engine got a reference to a data object that does not exist.
since that data object is supposed to have an equipment type, it is something in your equipment area that is missing.

possibilities how that happened are:
1) the plugin is configured with references to an equipment in the database that has been deleted.
most likely a default setting that you forgot to change.

2) you deleted parts of the database that are still in use
for example you deleted an equipment type and there is an equipment that still uses that now non-existent type, or an actor with a trait on that deleted equipment or something like that.

3) you loaded an older savedgame after changing plugins or other critical data.
that older savefile is now incompatible and you need to start a new playtest game.
Also (and Andar mentioned this in his first post) double check that the order of your Yanfly plugins in the plugin manager is the same order they're listed in on the Yanfly Engine Library Web site.

Having them out of order can cause weird, random errors, even if you configured and are using them correctly.
Here's the order of my plugins. Any issues here?
Any issues here?
yes
as said the order has to be the one on the masterlist on yanfly's website, top to bottom.
may i ask for a link with the correct order? google and 2 other services does not give any answer except order plungins (pay). (2nd Dev of ghe game). The sales site say's it would be the recomended order, but it does not seem to work so stable as it should?
This seems to be the order on the site from what I saw.
Any issues?
if the crash still happens, than screenshot the console tab or turn
off NON-yanfly plugins and turn them on 1 by 1 to see if it crash or not.

if it crash, write down the plugin and continue the list.

this to see if there is a compability issue if re-arranging non-yanfly
some where else.
Ok, so it turns out that the crash isn't happening on earlier save files, so it has to be one of the items in the armor catagory being bugged.

Is there a way to search for what item it is?
Wait, are you loading save files instead of starting a new game? Then it could easily be that you have an equipment still in your inventory in that particular save that you since have deleted from your database. That would explain the crash you are experiencing.
Wait, are you loading save files instead of starting a new game? Then it could easily be that you have an equipment still in your inventory in that particular save that you since have deleted from your database. That would explain the crash you are experiencing.
That would explain it. Thank you.


I remember deleting a past inventory item a while back when it was causing it's own unfortunate glitch, so that's what probably caused this.

Looks like I'll just reset the saves and tell players the new version isn't compadible. thanks.
Looks like I'll just reset the saves and tell players the new version isn't compadible. thanks.
you know, that was the second option I gave in the very first answer to this problem?

we all thought that you would always test with "new game" instead of loading an old save because that is usually the very first suggestion for all data errors...

Original thread: https://forums.rpgmakerweb.com/threads/technical-issue-optimize-crashing.150803/