[SOLVED] TypeError: Cannot read property 'baseItemId' of null

Hello! so I was testing out a my game and when attempting to remove a weapon from my weapon slot, I encountered a bug. Here was the crash report (Copy and pasted directly from the Developer Tools console)

Spoiler: Bug Report
Code:
YEP_CoreEngine.js:1094 TypeError: Cannot read property 'baseItemId' of null
    at Game_Party.independentItemSort (YEP_ItemCore.js:1250)
    at Array.sort (native)
    at Game_Party.weapons (YEP_ItemCore.js:1238)
    at Game_Party.equipItems (rpg_objects.js:4847)
    at Game_Party.allItems (rpg_objects.js:4851)
    at Window_EquipItem.Window_ItemList.makeItemList (rpg_windows.js:1970)
    at Window_EquipItem.Window_ItemList.makeItemList (YEP_ItemCore.js:1376)
    at Window_EquipItem.Window_ItemList.refresh (rpg_windows.js:2012)
    at Scene_Equip.onItemOk (rpg_scenes.js:1517)
    at Scene_Equip.onItemOk (YEP_EquipCore.js:1051)
SceneManager.catchException @ YEP_CoreEngine.js:1094

I checked the three plugins mentioned, Item core, Equip Core, and Core engine, and they were all up to date.
I also checked to see if the mod placement was correct and it was.

Here's a video showing how I produced the crash:


Notes from video:
1. When you open the save file you start out with one book but then get a second one when you equip the first book
2. even if you sell the book and save they come back
3. if you try to remove a weapon without there being another weapon that the actor can equip, there will be two "remove" options, both crashing the game.

If anyone knows what I can do too solve this solution it would be greatly appreciated.
Did you start a game and save it, then add one of these plugins, by any chance?

If you start a new game rather than loading a saved game, does the issue still happen at the same point?

"Cannot read property ... of null" is a common error caused by saving a game then adding a plugin that sets up its own data when you start a new game, and trying to resume that previously-saved game.

Although in this case, it is saying there's a weapon that is null ... somewhere.

Have you deleted a weapon from the Weapons tab since making that save file? Are your party members set up correctly - instead of deleting actors from the Actors tab to change your starting party, did you delete them from the Starting Party box in the System tab which is the correct way of doing it?
@Shaz
No, I didn't start a new game when I added one of those plugins. I started a new game and reached that point. I still have 2 Dictionaries (When I should only have one) But now they stay gone when I sell them, save, and reload. And now when I try to remove a weapon (when there's only one weapon in the inventory) There is only one remove option, and it doesn't crash!

For some reason I never thought that adding a new plugin could break a save that was created before it was added. Thank you for helping!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/solved-typeerror-cannot-read-property-baseitemid-of-null.114418/