Odd Crash Error (MV)

Please feel free to move this if it's in the wrong spot. I did look around for which area to post it in, just wasn't 100% sure.
I seem to get an odd crash error during gameplay,but it only happens SOMETIMES. As in, I THINK the issue has to do with status ailments that cause the player to miss their turn input (like sleep, berserk, confuse, distract, etc) So far the crashes have occurred during the "distract" status (missing exactly 1 turn then self curing) and just now when the player was hit with sleep and it was their turn. I took a screenshot of both the error message and the f8... whatever that is. the jumble of code. If more information as to why this is happening (I suspect a plugin issue,but im not well versed in how they mesh so...) I can try to replicate it since I have my guess as to what sparks it in the first place.

error.png

error 2.png


Thank you in advance for any any all help.
Hey! Without delving too deep into your customized CTB system, I can tell you that error is caused by a game variable / script call that is used before it is defined, hence the "cannot read ITEM of UNDEFINED." The plugins and functions listed in the error message indicate that it has something to do with your CTB system, and if you think it has to do with status ailments, I'd check to see if there's any function or script call in your game which is "out of place," if that makes sense...if it's using a variable that has no value.

That's the easy answer: an undefined variable. The hard answer would be that yes, it is a plugin incompatibility, in which case you'll have to test the relevant plugins one by one to make sure they're compatible with each other. The ones you need to check are listed in parentheses after the error messages "at Game_Function....." on the first screen and are highlighted in red in the second.
Knowing exactly what causes the error in the first place is probably the most helpful thing you can determine, as that will tell you where to start looking for your undefined variable.
I notice you have Yanfly's Quest Journal loading before Message Core, which doesn't seem to match the recommended order (there may be other inconsistencies, too). The recommended order for Yanfly's plugins can be found here:
You can reorder your plugins by clicking+dragging them in the Plugin Manager. Remember to save afterwards else your changes won't be reflected during test. The plugin load order can sometimes effect strange problems, best to stick with the recommended one! 😮‍💨

As mentioned, this does look like a plugin issue, either a bug or a conflict. It seems the Jay_DualTechs plugin is now paid, rather than free; here's a link to its old thread on here, though, in case it helps somehow:
You could try turning off Jay's plugin in the Plugin Manager to see if that helps (again, remember to save before testing). Since I'm not personally familiar with Yanfly's CTB I'm not sure how much more help I can offer here. 😅
Strangely enough, I haven't run into a single error with the quest journal+message plugins being out of order, but just to be safe I reordered them as per your suggestion (thank you for that <3)

I also ran a test with Jays Dualtech turned off, let my characters getput to sleep repeatedly and suffered no crashes. Then turned it back on, got put to sleep once, same error. So it's clearly the culprit in all of this (Which is troubling as I really wanted to use the dualtechs but I'm unsure how to proceed) Still, at least I have an idea of the source now.
Note that it could still be a conflict between Jay's plugin and one (or more) of your other plugins...you could try turning off all plugins except those required for DualTechs (Battle Engine Core, CTB, and DualTech?) to see if that shows the same errors. (Note that in the Plugin Manager you can press Ctrl+A to select all, then right-click > Turn OFF, nice and easy.)

If the error persists with the bare minimum required for DualTechs, then you may want to contact Jay about it; there seems to be a "Community" tab on the itch page that's being used as a bug-reporting board. 🙂
Just to make sure - though its improbable - did you perhaps load an old savefile AFTER you altered or added plugins?
That can cause some functions not to load properly and throw out errors because some variables are only defined upon starting a new game.

If so, try to start a new game and see if the errors persist.
I may try the "bare minimum" route to see if that yields any results, I just wish this was a more consistent problem - I've had runs where being put to sleep did absolutely nothing to upset the game itself. The most frustrating thing about technology is inconsistency ^^;

@ScorchedGround I've definitely had that happen before, but this was a fresh run 🙂 I was actually just telling folks last night that I was doing a clean run to have an up to date save file near the end of the demo for testing purposes of the last area (balancing for enemy stats and such)and I havent added anything new since I started that particular file. I believe I was either lucky missing the crash up until now, or more likely, simply wasn't hit with the aforementioned status ailments.
Moved to: Plugin Support@SpiralSigil Just so you know for the future, Tech Support is for problems opening or using the editor (game engine) itself, not for crashes during a game (which usually come from a plugin or malformed code). No worries - it's a common mistake.

Original thread: https://forums.rpgmakerweb.com/threads/odd-crash-error-mv.122129/