Page 1 of 1

GS Crashes with java.lang.ArrayIndexOutOfBoundsException: 7

Posted: Thu Sep 22, 2011 10:32 pm
by timhicks
I am running GS 2.0

It is Jan 1946, and my game is crashing after it comes back from working out it's end of turn stuff. Specifically the resources total box appears and the map appears. It looks ok, but there is no way to go back to the main menu, the mouse doesn't scroll the map, and I can't click on 'next turn'. I can still attack and move units though.

I'm the Germans and there are LOADS of units on the map, so maybe there are too many. I saw a similar error reported a few months ago, which was diagnosed as being to do with the base code. Is this the same ?

the last few lines of the dos file read :-

Tile count : (36,19)
Exception in thread 'Thread-6' java.lang.ArrayIndexOutOfBoundsException: 7
at game.Game.checkEbenEmae1(Game.java:9018)
at game.Game.gameStatusUpdates(Game.java:9953)
at game.Game.startOfTurnIntercative(Game.java:9953)
at game.Game.endTurn2(Game.java:10188)
at game.Game.run(Game.java:19494)

I can send the save game if required.

Posted: Thu Sep 22, 2011 10:44 pm
by richardsd
doesn't GS stop there?

Posted: Fri Sep 23, 2011 12:59 am
by Peter Stauffenberg
GS v2.0 is only supporting a game that ends in 1945. One reason is that many variables in the game with arrays are setup to have values from 0 to 6 (used to indicate 1939..1945). So when you get into 1946 then the game will try to check the content of a variable like reinforcements[7] and that's outside the range of the array.

So the game won't work past 1945.

Posted: Fri Sep 23, 2011 9:24 am
by timrt
Interesting as I ran a PBEM game into 1946 (not doing very well as Allies) & although we stopped it, it was our choice not a system crash that caused this.

Posted: Fri Sep 23, 2011 10:47 am
by Peter Stauffenberg
Which version were you running? Vanilla CeaW or GS v2.0?

Posted: Fri Sep 23, 2011 12:02 pm
by timrt
It was GS 2.0

post 1945

Posted: Fri Sep 23, 2011 9:05 pm
by timhicks
thanks for the replies chaps !, i can stop trying to make it work now.

Shame cos I was hoping to take over the entire world, I started in 43 and I needed just a few more years. Maybe till 1950 !. Thanks to all the people who worked on GS, it's a truly great game.