Page 2 of 2

Re: Game locking up

Posted: Thu Jan 29, 2015 9:35 pm
by davidjwest
I'm finding 3.1 locks up quite often towards the end of the game vs AI whichever side I play. Running Windows 8.1 if that makes a difference.

Also locks if I use aircraft when badly outnumbered vs humans, shall I send a save game?

Re: Game locking up

Posted: Fri Jan 30, 2015 10:21 pm
by sad ham
No way to play a game on the allied side till the end, because the game locks up most of the times.
Why Slitherine does not fix this issue?

Re: Game locking up

Posted: Sat Jan 31, 2015 3:45 pm
by Peter Stauffenberg
First, GS v3.10 is not made by Slitherine. So they have no obligation to fix anything in GS.

We, who made GS v3.10, made it for PBEM play and not AI play. Therefore it has not been tested a lot when playing against the AI. The lockup is noticed, but solving it is not easy since you don't get a crash message in Java. So obviously the game is in an infinite loop. It will be quite hard to find the issue. Since GS was created by a hobby group the time to fix such issues can be longer than you would expect for a regular game. The participants have regular jobs and must use their spare time in the evenings to work on GS.

Therefore I can't make a date when this issue will be fixed.

Re: Game locking up

Posted: Sun Feb 01, 2015 5:34 pm
by Peter Stauffenberg
I think I have found a reason why the game is locking up. It seems to happen when the Axis AI has German submarines near Gibraltar and the subs get injured enough to seek port. If Vichy France is activated and on the Axis side then the port that will be picked could be Oran or Algiers.

The problem is that the German subs can't sail into the Mediterranean to the destination port because of Gibraltar blocking access. So the game mover tries to send the unit to Oran or Algiers and the code gets into a loop somewhere because it can't find a solution to how to get the unit to the destination. The distance is short enough, but it can't sail through the Gibraltar port because it's enemy controlled.

I added some code to AI.class that replaces the destination port from Algiers or Oran to Bordeaux if the moving unit is German. That seems to have fixed the lock of the games I got for testing.

Fixing the cause of this problem is probably quite big. I tried to look into AI.class, but found no obvious place where the destination hexes were calculated.

Please try the attached ai.class file if you experience problems. The file goes into the game folder.

Re: Game locking up

Posted: Sun Feb 01, 2015 7:50 pm
by baloo7777
Stauffenberg wrote:First, GS v3.10 is not made by Slitherine. So they have no obligation to fix anything in GS.

We, who made GS v3.10, made it for PBEM play and not AI play. Therefore it has not been tested a lot when playing against the AI. The lockup is noticed, but solving it is not easy since you don't get a crash message in Java. So obviously the game is in an infinite loop. It will be quite hard to find the issue. Since GS was created by a hobby group the time to fix such issues can be longer than you would expect for a regular game. The participants have regular jobs and must use their spare time in the evenings to work on GS.

Therefore I can't make a date when this issue will be fixed.
Sorry! I hadn't realized (did not read closely) this was made for PBEM. I will roll back to v 2 as that was the last version to work with AI. My lockups have come before the fall of France, so no Vichy. This probably precludes this fix working (I will try it at least though). Thanks for your hard work! I certainly have other games to play. Someday I may even try PBEM (my experience with PBEM in other games has not been that good though).

Re: Game locking up

Posted: Mon Feb 02, 2015 2:01 pm
by Ostwindflak
I downloaded the AI.Class file and applied. It worked and I was able to advance my turn. Now I can continue playing. Thank you for everything Stauffenberg!

Re: Game locking up

Posted: Mon Feb 02, 2015 2:36 pm
by Peter Stauffenberg
There might be more situations where the AI code will try to send subs into illegal hexes and that can cause lock-ups. So please play on and check if the situation happens again.

I think this has something to do with subs being able to move through enemy units instead of being surrounded. The old AI code probably still moves the subs the old way while we added code to move through enemy units in the mover code.

Re: Game locking up

Posted: Mon Feb 02, 2015 6:31 pm
by baloo7777
I tried to play my saved turn, but it did not work. Locked up immediately. My game is not that big a deal so I think I will delete it and see if I can roll back to a version that does not lock up for me.

Re: Game locking up

Posted: Tue Feb 03, 2015 3:13 pm
by pk867
Try starting a new game and see what happens.

Re: Game locking up

Posted: Mon Feb 09, 2015 2:49 am
by baloo7777
I started a new game (39 as Allies) using all optional rules for v3.1, and have gotten to about the same place that I would lock up in previously (APR 40). So far so good.