YEP_X_AftermathLevelUp crashing game bug

I'm making a game, and I want to use YEP_X_AftermathLevelUp for showing a party member leveling up.

However, whenever I level up someone, this error shows up.

game_42Ve2bKc38.png


Is there any way to fix this?

This is my plugin list for my game:
MadeWithMv
YEP_CoreEngine
SRD_GameUpgrate
SRD_PreloaderCore
SRD_AudioFader
SRD_WaitOptions
Eli_Book
Eli_ItemSounds
FROG_Core
FROG_TriggerDistance
SRD_CustomColors
SRD_PressStart
SRD_TitleCommandCustomizer
SRD_TitlePictureChoices
SRD)CreditsPlugin
SRD_OptionsUpgrade
YEP_KeyboardConfig
SRD_MasterVolume
SRD_FontOption
Olivia_AntiPlayerStress
Irina_PerformanceUpgrade
YEP_PartySystem
SRD_MenuStatusCustomizer
YEP_StatusMenuCore
YEP_X_ProfileStatusPage
MRP_YEP_X_ProfileStatusPage_Fix
Irina_AnimatedLoading
GALV_DiagonalMovement
YEP_MoveRouteCore
YEP_MessageCore
SRD_WindowUpgrade
Irina_VisualNovelBusts
GALV_MessageSoundEffects
SRD_ShakingText
GALV_BalloonSoundEffects
SRD_PictureChoices
YEP_BattleEngineCore
YEP_X_TurnOrderDisplay
YEP_X_VisualHpGauge
FROG_Min1Dmg
FROG_Min1Dmg4YepCore
FROG_Min1DmgYepDmgCore
SRD_BattlePopupCustomizer
SRD_BattleStatusCustomizer
SRD_BattleStatusCustomizer_Part2
SRD_CEBattleIntro
YEP_VictoryAftermath
YEP_X_AftermathLevelUp
ALOE_YEP_X_AftermathLevelUp_SE
YEP_SaveCore
SRD_GameOverCore
SRD_RetryUpgrade
Olivia_MapDisplayNameCore
Jay_FocusedSoudEffectsPro
SRD_CameraCore
I dunno if a specific plugin is causing this error, so I listed them here just in case.
The crash is being caused because the aftermath levelup plugin is trying to access an actor's _victorySkills array and set a variable to its length, and is unable to do so because the actor doesn't have that array.

Because the array is initialised in the prepareVictoryInfo function which going up the chain is called from BattleManager's processVictory function, I suspect one of your other plugins that comes after Victory Aftermath in the list is overwriting that without aliasing and that prevents the aftermath plugin from correctly setting up its data.

If that isn't the cause, then something else is causing the plugin to reach an actor that doesn't have an available _victorySkills array to reference.
I wouldn't be surprised if the SRD Game Over plugin has something to do with it, that seems like a logical candidate.
I wouldn't be surprised if the SRD Game Over plugin has something to do with it, that seems like a logical candidate.
That was the one that caught my eye too.

Though I just did a cursory check and although Game Over Core does rewrite processVictory, it aliases it and calls the original, so it's unlikely to be that.
@Trihan
the-office-high-five.gif
Two things:

1. Your Yanfly plugins are not in the correct order. It may not be causing this current issue, but you're gonna want to reorder them in the same order they're listed on Yanfly's site. Weird stuff can happen if they're not in the proper order.

2. Once you've done the above, turn off everything except Victory Aftermath and turn your plugins back on one by one until you can pinpoint what plugin is causing issues.
I rearranged my plugins, shut off everything but the Yanfly ones, tested leveling someone up, and the game still crashed.

What am I doing wrong? Do I actually have to put literally all the Yanfly plugins at the top?
No. If a plugin is turned off, then by definition it's not doing anything - it doesn't matter if it's in between other plugins.

After you make changes, have you saved your project and started a new game, not loading a save?
I've been testing all of this on a new game and everything. Even when I turned off everything except for YEP_VictoryAftermath and YEP_X_AftermathLevelUp (since the former is required for the latter).
I'd go to Itch and redownload your Yanfly plugins, it's possible something is corrupted in the plugin file.

Are you running the newest version of MV? 1.6.1+?
I'm currently using the most recent version of MV, which is 1.6.2. The game only crashes when the "level up" screen is enabled.

Also, I'm gonna try redownloading the Yanfly plugins to see if that'll do anything.
UPDATE:
I redownloaded and replaced the Yanfly plugins I'm using, and it seemed to do the trick.

Since I have my game project and files saved over Google Drive because I wanted to work on my game on my laptop whenever I'm not at home, I dunno if any of the syncing over the cloud caused some plugin files to be corrupted.
Technically, the most recent version is 1.6.3 😉

But code-wise it's irrelevant after 1.6.1, which is why I worded it that way above.

I redownloaded and replaced the Yanfly plugins I'm using, and it seemed to do the trick.
Excellent!
Since I have my game project and files saved over Google Drive because I wanted to work on my game on my laptop whenever I'm not at home, I dunno if any of the syncing over the cloud caused some plugin files to be corrupted.
Make sure you move your game out of Drive when you work on it. Cloud syncing can and has screwed up people's game's. @Andar can explain more, but it's recommended not to keep your project in any cloud synced folders, and I'd wager Drive isn't a much better option.

Original thread: https://forums.rpgmakerweb.com/threads/yep_x_aftermathlevelup-crashing-game-bug.162085/