Sudden game crash during battles due to Yanfly plugin?

When loading the battle during the black screen, this error suddenly showed up.


Game has encountered a bug. Please report it.

TypeError: Cannot read properly 'isActor' of undefined
at Game_Action.selectConditionFrontRow (YEP_X_SelectionControl.js:1394:44
at Game_Action.meetSelectionCondition (YEP_X_SelectionControl.js:1317:19)
at Game_Action.checkAllSelectionConditions (YEP_X_SelectionControl.js:1294:17)
at Game_Troop.Game_Unit.filterSelection (YEP_X_SelectionControl.js:1056:16)
at Game_Troop.Game_Unit.aliveMembers (YEP_X_SelectionControl.js:1023.47)
at Game_Troop.Game_Unit.aliveMembers (YEP_Taunt.js:407:48)
at Game_Enemy.Game_BattlerBase.hasValidTargets (Yep_X_SelectionControl.js:823:51)
at Game_Enemy.Game_BattlerBase.canUse (YEP_X_SelectionControl.js:812:17)
at Game_Enemy.isActionValid (rpg_objects.js:4524:48)
at Game_Enemy. (rpg_objects.js:4562:25)

Press F5 to restart the game.
Are you doing a play test or a battle test? A lot of plugins won't work during battle (or event) test as the database is loaded differently.

If you are doing a play test, is it starting a new game, or loading a previously saved game? If a previously saved game, did you add any plugins since the game was started?
Are you doing a play test or a battle test? A lot of plugins won't work during battle (or event) test as the database is loaded differently.

If you are doing a play test, is it starting a new game, or loading a previously saved game? If a previously saved game, did you add any plugins since the game was started?

It's actual exported and no, nothing new has been added.
Bump
no, nothing new has been added.
even if you don't remember adding something new, you should make sure to test with a new game if at all possible.

There are basically three ways that can create such an error:
1) an old savefile contains data from a different plugin set than the one active in the game - and as soon as the game needs data that was not present on the old savefile (due to it being from a different plugin configuration) the "undefined" errors pop up.
2) incompatibility between two or more plugins, sometimes caused by wrong order of the plugins or wrong configurations inside the plugins.
3) a plugin requires a different core engine version than the one used by the game (for example the classic error of "height undefined" if yanfly's animated sideview battlers are used with a core older than 1.4.0 where that property was first defined)
You say it's on an exported game, can you reproduce the error in a playtest?

You'll want to show the configuration of the troop that caused the error especially any notetags, etc. Looking at the code through the stacktrace of the error, it's caused by somehow a member of the troop being "undefined".

Original thread: https://forums.rpgmakerweb.com/threads/sudden-game-crash-during-battles-due-to-yanfly-plugin.113032/