jncraton / BWMetaAI

A StarCraft Brood War AI designed to follow the modern 1v1 metagame
Other
100 stars 12 forks source link

Game micro-freezes after ~30 game minutes, permafreezes with any mods #18

Closed BoneHorror closed 2 years ago

BoneHorror commented 5 years ago

Leaves no freeze.log or error logs of any kind, tested over 1.16, Remastered, with and without mods and with different mod components (modloaders of any kind seem do to the trick without more needed) - without mods it doesn't permafreeze the game and is not noticeable during playing, but on replays with higher speeds you can see the game freeze for even a good few seconds at a time. Tested with 3 and 7 computer players, sometimes happens earlier than the 30 minutes. Video - https://youtu.be/B3H0V9oTd0E As you can see im not pausing or doing anything, the game just freezes. Normally if there's too much happening the replay just slows down, I have no idea what can cause a freeze like this - normal causes would be infinite loops (permafreeze) or defenseuse units with 0 force (permafreeze) but both definetly don't happen here, dunno what this is.

jncraton commented 5 years ago

That's fascinating. Thanks for pointing this out. I also have no idea what would cause this behavior. It makes me think that an AI thread is busy looping, but I'm not sure why it would do this for a few seconds and then let up. The usual behavior for these sorts of bugs is to simply permafreeze as you know.

BoneHorror commented 5 years ago

A comment from Neiv after investigating the freezes

maybe his setup generates an aiscript which pyai corrupts or something, dunno but seems that it ends up reading invalid commands, and depending on details either recovers or infloops eventually

I'll try out copying the scripts to a separate aiscript.bin to see if they're not corrupted visually sometime tommorow Edit3: the final results were, you can do it and trim down the scripts but it doesn't eliminate freezes completely, just makes them less common - also, they're not corrupted visually and stay consistent between saves, barring the 1st resave since PyAI forces you to remove unused code and blocks

BoneHorror commented 5 years ago

Since I couldn't pinpoint exactly what caused the freezes ever over trimming the scripts down by hand, and the freezes still seldom happen, in one out of about 20 or so tries, I've opened an issue about it on PyMS' github page. The type of jumping you're doing definetly shouldn't cause any problems according to Neiv [my experiences might say otherwise but he actually knows shit about this game's code so I'd say he's more reputable on that], so we'll see if p_q can come up with anything.