I can pretty much guarantee that it is not a bug. Yanfly's scripts are HUGELY popular, and the fact that you're having an issue that NOBODY else is having sort of indicates that maybe you're not using the script(s) properly.First, since it seems to happen when you have the Visual Battlers script and doesn't happen when you remove it, go through the script documentation (all the lines at the top) VERY carefully and ensure you've set everything up properly - does it use variables? Switches? Have you assigned them correctly? Are you using those variables/switches for something else because you didn't set them up? Are you meant to add tags to your actors or enemies? Have you added them correctly? Are you still using the party system script? Does this happen as soon as you trigger a battle, or are you doing something during the battle that triggers it?
A bit more of a description about what actions you are doing and when it happens will be helpful.
I would suggest maybe you have two scripts that are incompatible, but it looks like most of what you're using is from Yanfly, so while that's still a possibility, I would think it's more something that you haven't set up correctly.
I don't know if it might be a bug or not. Maybe I am indeed using it wrong. But I'm not the only one that got this error, I was looking everywhere for answer, but no one replied to their questions, and they were the same as mine here.
I do look through the green documentation on the very top of the script, as well as well as various forums and even Yanfly's script page, to see if I overlooked something. I do that with every script every time I don't understand something or need clues. I think I did everything correctly according to the documentation, but I might as well describe what I do again on a clean game project:
1. I add the script Visual Battlers and Party System.
2. I set up how I want my actors to stand on the battle screen. I just change some of the coordinates for them to stand a bit more to the left, because I have 5 actors in the party, and some of them tend to stand outside the screen by default. That itself doesn't cause any errors.
3. It all works fine until I try to change the party members. I add and remove my actors as I want them to appear in battle. I keep only 2-3 actors in the party, others are left out. Once I go into battle, a black screen shows up and the error as well.
Now to try without visual battlers:
1. I add only the Party System.
2. The only thing I change in the script is max number of actors.
3. No errors, everything is all right.
Now only with Visual Battlers:
1. The same as the above, no problems.
Error shows up only when those two are together, even if I just add them and don't change them at all. This error happens only when I go into the game, change party formation, and try to go into battle.
For example I start the game and go into battle alone. It works without interruption. But when I add and then immediately remove an actor outside of battle, and the go into battle, it gives me the exact error from my first post. It only happens when I add and remove only ONE actor. It works properly after I add more.
I really don't know why it's happening, I tried to change order of those two scripts, I tried locking the main actor. I can't expect my players to not remove the second actor if they want to do so. Anyways, I will live without Party System, since the standard one works just fine with me.