'Change Battle BGM' causing game to crash.

Hi,
I've been making a game for a friend for a while now and during one scene at near the start of the game I had the battle BGM change to a different one than the default one as it's supposed to be a boss battle. It was fine for ages. However today I decided to change the order of an autorun event (which included 'change battle BGM') around as some things weren't quite happening at the right time. I moved the 'Change battle BGM' to a different place in the event and ever since then when it gets to that point the game just crashes.

I've no idea why it does this. I've tried moving it around since and all it does is crash each time when it gets to that point. I've tried remaking the audio file incase soemthings gone wrong with the file and it's made no difference. I did move 'change battle BGM' into a different even in the hopes that would work. It does... But not well. When changing the BGM the game stutters badly and it looks as if it will crash, then when you get into the actual battle there will be a good 10 seconds of silence before the music finally kicks in.

This is driving me insane as it doesn't seem to make any sense... I had the event there working fine for ages and now all of a sudden it breaks the whole game. I even have the battle BGM change at later points of the game too and I'm having no issue with those moments.

I noticed too that if I go into the sound tester in the editor and press play on that track, it won't play. The tracks included with RPG Maker will play fine though. However I noticed if I try to play any other tracks after playing that one, then nome of them will play. I've opened up the sound file outside of RPG Maker and if plays absolutely fine elsewhere....
I even got steam to verify the integrity of RPG Makers files and that did nothing...

Any suggestions on what I should do..?
You said that you changed the order of commands in the autorun events. Are you certain that the 'Change Battle BGM' part is what's causing the problem? What does the rest of the event look like?

Or maybe it's the song file itself. Did you delete the old file and replace it with a same-named file? I can't help but think that if you did, that could be a possible cause as well if you didn't change the command afterward.
sounds like a conversion error, or a file that's too heavy to load in time.
can you upload it here? I can try reconverting it.
You said that you changed the order of commands in the autorun events. Are you certain that the 'Change Battle BGM' part is what's causing the problem? What does the rest of the event look like?

Or maybe it's the song file itself. Did you delete the old file and replace it with a same-named file? I can't help but think that if you did, that could be a possible cause as well if you didn't change the command afterward.
I'm pretty sure it is the change battle bgm command that's causing the crash because the game only crashes when it gets to the place that command is at. No matter where I move it around to. I tried moving it into its own event too to isolate it and it still happens.

After it stopped working properly I tried replacing the file but then I also made sure I changed the command.
sounds like a conversion error, or a file that's too heavy to load in time.
can you upload it here? I can try reconverting it.
I can't attach the file here as it won't let me but here is the SoundCloud link to the song where it can be downloaded as a WAV:

It's around 62 MB in size. Once downloaded I then used freeconvert.com to change the file into m4a and ogg.
well, what did you expect then!?

sigh....
converting.
do you want it to loop? there is a loop point... I can leave it in there.
well, what did you expect then!?

sigh....
converting.
do you want it to loop? there is a loop point... I can leave it in there.
Is 62 MB too big then? If It is I can compress the file. I found a decent website before that can compress a file size without losing audio quality
here.

there's 2 files in there, one quality 10 and another quality 8.
try the 8 first to see if it works, and if not, use the 10 q to recompress from there.

the wav file had a ton of internal markers, with the names of the samples used.
quite a banger tho, I'm keeping this one.
Is 62 MB too big then? If It is I can compress the file. I found a decent website before that can compress a file size without losing audio quality
For a point of reference, 2 songs I created for RPG Maker landed around 2 MB each. 62 MB is massive for a song. Granted, I didn't use the same quality as you did, but it definitely needs to be smaller. The size is causing the lag.
For a point of reference, 2 songs I created for RPG Maker landed around 2 MB each. 62 MB is massive for a song. Granted, I didn't use the same quality as you did, but it definitely needs to be smaller. The size is causing the lag.
Awesome, thats good to know and bear in mind for the future. I didn't create the song and never really paid much attention to the size of the file until now. Tomorrow when I get chance I'll make the file smaller and see if that helps.
here.

there's 2 files in there, one quality 10 and another quality 8.
try the 8 first to see if it works, and if not, use the 10 q to recompress from there.

the wav file had a ton of internal markers, with the names of the samples used.
quite a banger tho, I'm keeping this one.
This didnt work so I have now compressed both the m4a and ogg versions to be less than 10mb and yet im still getting a crash everytime the game goes to use them.... Im still very confused...

The crash only seems to happen in this specific part of the game... When I try to use the music track elsewhere the game doesnt crash

Original thread: https://forums.rpgmakerweb.com/threads/change-battle-bgm-causing-game-to-crash.149489/