MZ VS Crash on Weapon Unequip

Hi all,

I'm using VisuStella's Item/Equips Core, and my playtest crashes when I try to unequip a character's weapon. The crash doesn't occur when the plugin is off, and there are no rulings set in the plugin parameters that would cause the weapon slot to be unable to be empty. What could be causing this? The error that pops up is:

TypeError: Cannot read property 'iconIndex' of null
at Game_Actor.<computed>.changeEquipBase (VisuMZ_1_ItemsEquipsCore.js:3461)
at Game_Actor.<computed>.changeEquip (VisuMZ_1_ItemsEquipsCore.js:3461)
at Scene_Equip.executeEquipChange (rmmz_scenes.js:1934)
at Scene_Equip.onItemOk (rmmz_scenes.js:1923)
at Window_EquipItem.Window_Selectable.callHandler (rmmz_windows.js:1038)
at Window_EquipItem.Window_Selectable.callOkHandler (rmmz_windows.js:1279)
at Window_EquipItem.Window_Selectable.processOk (rmmz_windows.js:1272)
at Window_EquipItem.Window_Selectable.processHandling (rmmz_windows.js:1151)
at Window_EquipItem.Window_Selectable.update (rmmz_windows.js:1116)
at Window_EquipItem.Window_Selectable.<computed>.<computed> [as update] (VisuMZ_1_ItemsEquipsCore.js:3461)

My guess (because of the 'iconIndex' in the error) is that it has something to do with looking for an icon somewhere. In the plugin parameters there is a place to edit the icon for unequip but it is by default set to a valid icon number.
The iconindex isn't the problem.
The problem is the "of null".

this basically means that the engine was given a reference that does not exist - like it's looking for the icon of a weapon, but fails because the weapon does not exist.

Does this happen when you start a new playtest game, or when you load a savefile, or in both cases?
Ah, I thought it couldn't find an icon, rather than a weapon.

The problem happens both during new game and after loading a save file.
Have you changed the equipment slots from the default, or used the dual weapon trait to change the shield to a weapon slot?
How many different weapons do you have, and does this happen with every one or with specific weapons?
Can you provide screenshots of your plugin manager to see which plugins you have and their order?

Although from the backtrace it is likely that it is caused by a configuration of the item/equip core and nothing else...
I have changed the equipment slots, they're as follows:

Weapon 1
Weapon 2
Shield
Head
Body
Accessory

(The reason I have two weapon slots in addition to shield atm is that I'm trying to find a plugin that will let me 'equip' two weapons to swap between during battle. I posted about that at the link below)

I'm pretty early in my database creation so right now I only have two weapons that I use for testing mechanics. The problem occurs when unequipping either weapon (Short Sword and Short Bow).

And lastly, a screenshot of my plugin manager. The only one that's kind of unclear from this screen is Initialize Variables. This is just a snippet of code I found somewhere that runs a common event on game launch.
"Weapon" is hardcoded to be the first slot only, unless you use dual wield to turn the second slot into a weapon as well. All other slots are armor automatically.

you'll need a plugin intentionally written to create a second weapon slot without dual wield.

the crash is most likely because your second slot is still an armor slot despite being named "weapon 2"
Hm, I got rid of Weapon 2's slot (and kept everything else) and the error still occurs. I tried a plugin that would let me put weapons in both weapon 1 and 2 slots, but the character ended up attacking with both weapons in one attack, rather than having to choose one or the other, so I scrapped that approach and am looking for another. But yes, even without weapon 2 the game still crashes unfortunately.
Hi!
I have the same problem. After equipping any piece of equipment on an actor, the game briefly plays the sound effect and then crashes.
Also for me, toggling all the plugins, it appears that the issue is with Visustella Item/Equip Core. Did you find a solution?
@WereWorld Do not post disruptively. This includes but is not limited to: thread hijacking (posting in another person's thread with your own questions/resources, etc. that leads the focus away from the original topic and onto you). Please review our forum rules here.

A support thread of your own is recommended.
Update: version 1.51 of Item Equip Core was just released and they fixed this issue in the update!

Original thread: https://forums.rpgmakerweb.com/threads/vs-crash-on-weapon-unequip.163430/