Game locking up

Tech support for Commander Europe at War. Requires forum registration.

Moderators: firepowerjohan, Happycat, rkr1958, Slitherine Core

davidjwest
Administrative Corporal - SdKfz 232 8Rad
Administrative Corporal - SdKfz 232 8Rad
Posts: 172
Joined: Sun Jul 10, 2011 11:53 am

Re: Game locking up

Post by davidjwest » Thu Jan 29, 2015 9:35 pm

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?

sad ham
Private First Class - Opel Blitz
Private First Class - Opel Blitz
Posts: 3
Joined: Wed Jan 21, 2015 10:14 am

Re: Game locking up

Post by sad ham » Fri Jan 30, 2015 10:21 pm

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?

Peter Stauffenberg
General - Carrier
General - Carrier
Posts: 4727
Joined: Sun Jul 08, 2007 4:13 pm
Location: Oslo, Norway

Re: Game locking up

Post by Peter Stauffenberg » Sat Jan 31, 2015 3:45 pm

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.

Peter Stauffenberg
General - Carrier
General - Carrier
Posts: 4727
Joined: Sun Jul 08, 2007 4:13 pm
Location: Oslo, Norway

Re: Game locking up

Post by Peter Stauffenberg » Sun Feb 01, 2015 5:34 pm

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.
Attachments
AI.rar
(14.43 KiB) Downloaded 179 times

baloo7777
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 12
Joined: Sun Feb 03, 2013 5:29 pm

Re: Game locking up

Post by baloo7777 » Sun Feb 01, 2015 7:50 pm

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).

Ostwindflak
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 13
Joined: Tue Jan 14, 2014 11:54 pm

Re: Game locking up

Post by Ostwindflak » Mon Feb 02, 2015 2:01 pm

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
General - Carrier
Posts: 4727
Joined: Sun Jul 08, 2007 4:13 pm
Location: Oslo, Norway

Re: Game locking up

Post by Peter Stauffenberg » Mon Feb 02, 2015 2:36 pm

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.

baloo7777
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 12
Joined: Sun Feb 03, 2013 5:29 pm

Re: Game locking up

Post by baloo7777 » Mon Feb 02, 2015 6:31 pm

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.

pk867
Sr. Colonel - Battleship
Sr. Colonel - Battleship
Posts: 1602
Joined: Fri May 08, 2009 3:18 pm

Re: Game locking up

Post by pk867 » Tue Feb 03, 2015 3:13 pm

Try starting a new game and see what happens.

baloo7777
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 12
Joined: Sun Feb 03, 2013 5:29 pm

Re: Game locking up

Post by baloo7777 » Mon Feb 09, 2015 2:49 am

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.

Post Reply

Return to “Commander - Europe at War : Tech Support”