induktio / thinker

Improved game engine features for SMACX.
https://discord.gg/XdFuwWzzku
GNU General Public License v2.0
75 stars 10 forks source link

hang in mod_enemy_move #66

Closed OrangeTabbyIsNotAvailable closed 5 months ago

OrangeTabbyIsNotAvailable commented 7 months ago

hang.sav.gz

Attached is the file I mentioned in the Steam discussion group. It hangs on my system (running via a couple of different Wine and Proton versions) once you press the next move button.

The hang seems to be related to my design workshop artillery vehicle. I wasn't having any problems until I created them. Taking manual control of the vehicle seems to side step the issue.

After turning on the debug flag it seems to be related to the mod_enemy_move() method. These vehicles seem to take the final return, which is the call to the game's enemy_move() method. This method returns VEH_SKIP. Forcing mod_enemy_move()'s return code to be VEH_SYNC also side steps the issue.

Thanks!

induktio commented 7 months ago

The game probably reaches some unusual state since the vehicle was automated resulting in the infinite loop. This should be fixed in the next build possibly by changing the return code if enemy_move does not do anything, so the game stops processing that vehicle for the turn.

induktio commented 7 months ago

This should be now fixed in the Apr 1 build, as also the issue mentioned in #65.

OrangeTabbyIsNotAvailable commented 7 months ago

Thanks! I will check it out.

Apr 1, 2024 11:50:41 AM Induktio @.***>:

This should be now fixed in the Apr 1 build, as also the issue mentioned in #65[https://github.com/induktio/thinker/issues/65].

— Reply to this email directly, view it on GitHub[https://github.com/induktio/thinker/issues/66#issuecomment-2030240695], or unsubscribe[https://github.com/notifications/unsubscribe-auth/BHPKX3QY7J35LJKTWUP4GUTY3GM65AVCNFSM6AAAAABFQURGRSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZQGI2DANRZGU]. You are receiving this because you authored the thread. [Tracking image][https://github.com/notifications/beacon/BHPKX3RSH42DGY5TZJ3VBJDY3GM65A5CNFSM6AAAAABFQURGRSWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTZAMB3O.gif]