MV Yanfly STB - Freezing when Failing Escape

Hi everyone,
I'm having an issue with Yanfly STB for RMMV where the game soft locks (music continues to play, just no battle windows appear) specifically when:

1) Attempting but failing to escape (so a successful escape is fine)
2) As the very first actor (so if the whole party has their turns before the enemy, any but the first actor can escape and fail successfully)
3) Before an enemy has acted (so if the first actor gets their turn after an enemy has gone, it works)
4) When using the Escape command (so Escape items and skills work fine)

This is quite frustrating and a bit baffling as even though this is a specific convergence of factors, it makes escaping upfront from a battle soft-lock the game. It is definitely STB related as disabling the plugin fixes it.

EDIT: Also - crucially - nothing appears in the console when this happens. There are zero error messages.

Thank you!
It is definitely STB related as disabling the plugin fixes it.
The next thing to try would be to turn off all plugins except for Yanfly's STB, then save (to apply Plugin Manager changes) and test. That'll let you know if it happens with that plugin alone, or whether it's a conflict with one or more other plugins (e.g. maybe due to their load order).
and to be sure, you are able to replicate this without any other plugins or otherwise, are you able to identify a combination of plugins that causes it to happen?
OK, I've figured out it has to do with TamFey's Timed Button Hits plugin.

In the game this is used selectively for 3 specific boss fights which have certain player attacks that use a rhythm game minigame (so not consistently throughout the game).

This had previously been giving me issues with 'cannot move' states which ChatGPT gave me a plugin to fix (probably not a great idea lol but it was such a niche problem Googling didn't help, and it worked).

When I disable the ChatGPT plugins, the failed escape problem still occurs, but the game crashes instead:

YEP_CoreEngine.js:1094 TypeError: Cannot read property 'item' of null
at Function.BattleManager.endAction (TimedButtonAttacks.js:605)
at Function.BattleManager.displayEscapeFailureMessage (YEP_X_BattleSysSTB.js:356)
at Function.BattleManager.processEscape (YEP_BattleEngineCore.js:1826)
at Scene_Battle.commandEscape (YEP_X_BattleSysSTB.js:489)
at Window_PartyCommand.Window_Selectable.callHandler (rpg_windows.js:902)
at Window_PartyCommand.Window_Command.callOkHandler (rpg_windows.js:1426)
at Window_PartyCommand.Window_Selectable.processOk (rpg_windows.js:1156)
at Window_PartyCommand.Window_Selectable.processHandling (rpg_windows.js:1027)
at Window_PartyCommand.processHandling (YEP_BattleStatusWindow.js:409)
at Window_PartyCommand.Window_Selectable.update (rpg_windows.js:984)
please show a screenshot of your plugin manager. it seems like your plugins are out of date, or at least Yanfly's core plugin. line 1094 makes to reference to anything thatd cause that error
1757637007220.png

1757637029728.png

1757637062426.png

1757637077554.png
the latest version of the same plugin i mentioned is 1.32. try updating it and checking your other plugins for updates
While I go and check for updates for all my other plugins - I've updated Core Engine to no avail, although the error message is a little different:

YEP_CoreEngine.js:1098 TypeError: Cannot read property 'item' of null
at Function.BattleManager.endAction (TimedButtonAttacks.js:605)
at Function.BattleManager.displayEscapeFailureMessage (YEP_X_BattleSysSTB.js:356)
at Function.BattleManager.processEscape (YEP_BattleEngineCore.js:1826)
at Scene_Battle.commandEscape (YEP_X_BattleSysSTB.js:489)
at Window_PartyCommand.Window_Selectable.callHandler (rpg_windows.js:902)
at Window_PartyCommand.Window_Command.callOkHandler (rpg_windows.js:1426)
at Window_PartyCommand.Window_Selectable.processOk (rpg_windows.js:1156)
at Window_PartyCommand.Window_Selectable.processHandling (rpg_windows.js:1027)
at Window_PartyCommand.processHandling (YEP_BattleStatusWindow.js:409)
at Window_PartyCommand.Window_Selectable.update (rpg_windows.js:984)
EDIT: All plugins are updated to no effect
i cant replicate your issue. your crash is actually coming from the line beneath that inside the timed button attacks plugin but with yanfly's core, battle engine core, STB and the timed attack plugin i get no issues with these
1) Attempting but failing to escape (so a successful escape is fine)
2) As the very first actor (so if the whole party has their turns before the enemy, any but the first actor can escape and fail successfully)
3) Before an enemy has acted (so if the first actor gets their turn after an enemy has gone, it works)
4) When using the Escape command (so Escape items and skills work fine)
Line 605 isnt where that function is in the version that youve linked either despite the version number being the same
i cant replicate your issue. your crash is actually coming from the line beneath that inside the timed button attacks plugin but with yanfly's core, battle engine core, STB and the timed attack plugin i get no issues with these

Line 605 isnt where that function is in the version that youve linked either despite the version number being the same
Could that be because I'm actually using the updated one on page 3 of the forum post by Badab0um11?

I tried replacing it with the original one just now but the game full on crashed as soon as I launched Test Play so that's not much help either.

Thank you for your help so far.
Could that be because I'm actually using the updated one on page 3 of the forum post by Badab0um11?
change line 578 to read
Code:
if (this._action && this._action.item().attackButtons.length >= 1) {
It seems to have worked! Thank you so much!

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-stb-freezing-when-failing-escape.180033/