Game locking up
Moderators: firepowerjohan, Happycat, rkr1958, Slitherine Core
-
davidjwest
- Administrative Corporal - SdKfz 232 8Rad

- Posts: 172
- Joined: Sun Jul 10, 2011 11:53 am
Re: Game locking up
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?
Also locks if I use aircraft when badly outnumbered vs humans, shall I send a save game?
Re: Game locking up
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?
Why Slitherine does not fix this issue?
-
Peter Stauffenberg
- General - Carrier

- Posts: 4745
- Joined: Sun Jul 08, 2007 4:13 pm
- Location: Oslo, Norway
Re: Game locking up
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.
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.
-
Peter Stauffenberg
- General - Carrier

- Posts: 4745
- Joined: Sun Jul 08, 2007 4:13 pm
- Location: Oslo, Norway
Re: Game locking up
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.
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.
- Attachments
-
AI.rar- (14.43 KiB) Downloaded 241 times
Re: Game locking up
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).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.
-
Ostwindflak
- Lance Corporal - Panzer IA

- Posts: 13
- Joined: Tue Jan 14, 2014 11:54 pm
Re: Game locking up
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!
-
Peter Stauffenberg
- General - Carrier

- Posts: 4745
- Joined: Sun Jul 08, 2007 4:13 pm
- Location: Oslo, Norway
Re: Game locking up
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.
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
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
Try starting a new game and see what happens.
Re: Game locking up
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.

