MV Himeworks Equip Slots Core Error when characters have differing slots

I'm using Himeworks Equip Slots Core and Yanfly's Level Up Growth Effects. I have a custom leveling effect that adds a slot after each level up, placed in each actor's notes:

Code:
<Custom Level Up Effect>

if (actor.level <= 41) {

actor.addEquipSlot(5)

}

</Custom Level Up Effect>

Starting a new game, I have two character with 12 slots, which I promptly fill with equipment. One character leveled up before the other, so I fill the new slot the have. For some reason, perhaps due to Yanfly's Equip Core, when I use the hotkey to jump from the character with 13 slots to the character with only 12, it crashes the game and gives this message:
2021-03-09 23_30_00-Operation Rehab.png
does this happen with new playtest or when loading a savefile or in both cases?
can you give screenshots of your plugin manager so that we can see your plugins and their order?
If the error only occurs if you jump to a character that does not have the slot you currently selected, you could try this as a plugin:
Code:
/*:
 * @plugindesc Correct equip slot selection when switching actors.
 */
(function() {
    
    var lastSetActor = Window_EquipSlot.prototype.setActor;
    Window_EquipSlot.prototype.setActor = function(actor) {
        lastSetActor.call(this, actor);
        if (this.index() >= this.maxItems()) {
            this.select(this.maxItems() - 1);
        }
    };

})();
does this happen with new playtest or when loading a savefile or in both cases?
can you give screenshots of your plugin manager so that we can see your plugins and their order?
It happens in both cases. I've also tried a new project with the appropriate plugins, same error. Either way, here are my plugins:

Spoiler: Plugin List
2021-03-10 13_09_47-Plugin Manager.png

2021-03-10 13_10_03-Plugin Manager.png
2021-03-10 13_10_14-Plugin Manager.png
2021-03-10 13_10_32-Plugin Manager.png


If the error only occurs if you jump to a character that does not have the slot you currently selected, you could try this as a plugin:
Code:
/*:
* @plugindesc Correct equip slot selection when switching actors.
*/
(function() {
 
    var lastSetActor = Window_EquipSlot.prototype.setActor;
    Window_EquipSlot.prototype.setActor = function(actor) {
        lastSetActor.call(this, actor);
        if (this.index() >= this.maxItems()) {
            this.select(this.maxItems() - 1);
        }
    };

})();
Unfortunately, this didn't do anything. I still get the error in my current project and a blank project.
here are my plugins:
your yanfly plugins are in the wrong order.
they have to be in the order given on his website, or any form of error can happen.

after correcting the order, your old savefiles will be incompatible and you'll have to start new games
your yanfly plugins are in the wrong order.
they have to be in the order given on his website, or any form of error can happen.

after correcting the order, your old savefiles will be incompatible and you'll have to start new games
Fixed the order, and as expected, the problem didn't go away.
Bump.
Try using this plugin.
The error "Cannot read property'canEquip' of undefined" may be resolved by this patch plugin.

The description is written in Japanese, but it's probably similar to @Another Fen's plugin😉


JavaScript:
// DarkPlasma_HIME_EquipSlotCorePatch
// Copyright (c) 2020 DarkPlasma
// This software is released under the MIT license.
// http://opensource.org/licenses/mit-license.php

/**
 * 2020/08/25 1.0.0 公開
 */

/*:
 * @plugindesc HIME_EquipSlotCoreのパッチプラグイン
 * @author DarkPlasma
 * @license MIT
 *
 * @target MV
 * @url https://github.com/elleonard/RPGtkoolMV-Plugins
 *
 * @base HIME_EquipSlotCore
 * @orderAfter HIME_EquipSlotCore
 *
 * @help
 * HIME_EquipSlotCoreにおいて、
 * 装備枠にカーソルを合わせたままアクター切り替えを行うプラグイン
 * (TMOmitEquipCommand.jsなど)と競合して発生する以下のバグを修正します。
 *
 * - 装備可能アイテムを所持した枠にカーソルを合わせ、
 *   その枠を持たないアクターに切り替えるとエラー落ちする
 */

(function () {
  'use strict';

  const _Scene_Equip_onActorChange = Scene_Equip.prototype.onActorChange;
  Scene_Equip.prototype.onActorChange = function () {
    const actorMaxSlot = this.actor().equipSlotList().length - 1;
    if (this._slotWindow.index() > actorMaxSlot) {
      this._slotWindow.select(actorMaxSlot);
      this._itemWindow.setSlotId(actorMaxSlot);
    }
    _Scene_Equip_onActorChange.call(this);
  };
})();

Original thread: https://forums.rpgmakerweb.com/threads/himeworks-equip-slots-core-error-when-characters-have-differing-slots.134270/