Help Random, frequent non-responsive window when beginning wild battles

Keileon

Sardonyx's Kyuubi
Member
Posts
84
#1
Anyone who's played Sardonyx will tell you we have a frequent, long-standing bug where the game will freeze/"crash" when beginning a wild battle. We have no idea what's causing this issue: we have a fair amount of scripts but after taking a look and even disabling the ones we think might be the main offenders the problem persists. It happens more in a few particular areas, but can happen just about anywhere. What's even weirder is that it happens for some people and not others: for example, I get the freezing, but Giga (the other dev) does not. It occurs whether the game is encrypted or not, in RMXP Debug/Playtesting or through the .exe.

There are two main freezes that have the same result: the wild battle begins, but around the "Wild x appeared!" message the program hangs and the window goes unresponsive until the player forcibly closes it. While in most cases this seems to be random, players have noted that it happens less with the game music off, and we know the general cause of the second type of freeze: the game, for whatever reason, doesn't stop playing its previous music track before it starts playing the next, and when starting a battle the cry of the opponent Pokemon is too much for the game to handle, so it locks up.

What we don't know is WHY this happens. We do have FModEx for music looping, and currently I think that might be the issue, but I'm unsure how to tell or fix it if it is the case. Previously I thought it might be the ambient wild Pokemon cry script not playing nice with something, but we disabled that and are still getting reports of this. It's been going on since beta testing of demo 2.0. In the off chance it isn't FModEx, I have no idea what it possibly could be. We added so many scripts in the time frame between 1.3 and 2.0 that it'd be hard to pinpoint anything else, and it's too random to reliably try the "clean copy" method (plus I'm not sure that's feasible with how much we've edited over the course of development). We're using a heavily modified v16.2 Essentials copy with some things updated to 17.2.

Rather than asking for a fix (I'm aware this isn't enough information to go off-- I'd probably have to give you the project to look at for that) I'm asking how to go about pinpointing the issue at this point and where the problem may lie. What to look for, etc. Thanks for your time!
 

DogzNDogz113

Arbiter of Doggos
Member
Posts
30
#2
Wild and uneducated guess here: try replacing the battle theme with a tiny ogg file and see whether the issue persists.

Rmxp lags when loading big ogg files, because it can't stream them, it's gotta pre-load them (it can stream wav though). If there's a problem with the scripts handling the audio, and lag somehow plays a role in this, then this could help.

I've no idea how Fmodex works, but if you're using it just to loop your music, thats not really necessary if you compose / edit the track in a specific way (using labels if I'm not mistaken?)
(NuriYuri knows much more about FmodEx so you should contact them)

In the case of it being a non audio related issue, compare your processors - script hanging and similar stuff seems to happen to certain (older) processors more frequently.

If you can't isolate or reproduce the error you'd have to work in reverse: instead of removing scripts from your game , start from a v16.clean build and add / modify scripts one by one, painstaking but easier than the opposite.
 

Keileon

Sardonyx's Kyuubi
Member
Posts
84
#3
We've been using .mp3 files for music, as that seems to be the most efficient for the game to run when we were doing our testing before release; those don't naturally loop and neither of us can compose music, honestly. I will relay this to Giga, though!
 

Zerokid

Developer of Pokémon Zero
Member
Posts
11
#4
I'm getting exactly the same thing. I'm glad to see a topic explain my exact problem so well, but it's disappointing there's no solution!

Did you get anywhere with this in the end? It's becoming a recurring issue for many of my players.

Having done some debugging myself I can confirm it is the fmodex se_play method, as anything run after that isn't hit. However because those dlls are closed off I am not sure what else I can do. I suppose the obvious answer is to ditch fmodex but that'll mean worse looping of music tracks in the game.

I am using 128kb/s ogg files for everything as well, and am running a heavily modified Essentials 17.1 with Yuri Nuri's fmod dlls.
 

Krahssen

Novice
Member
Posts
31
#5
Hello, a few weeks ago the same thing happened to me, and I realized that it was after introducing the Reborn's moves animations.
By removing them completely, the error was fixed and the game stopped crashing. I'd love to introduce them, but I still can't figure out how to dodge those crashes (plus, it also affects out-of-combat framerate).
 
Top