Exception when I view result in DIY or preset competition

Insert here your troubles, infos and request about YSoccer's technical questions.
Post Reply
youngireland
Someone..
Posts: 8
Joined: Fri Sep 07, 2012 3:25 pm

Exception when I view result in DIY or preset competition

Post by youngireland »

Hi,

When I attempt to simulate a result in DIY competition or preset competition mode, the game ends and I get the following exception:

C:\Users\Owner\Documents\ysoccer16_windows64\ysoccer16_windows64>java -jar ysoccer.jar
Controllers: added manager for application, 1 managers active
Exception in thread "LWJGL Application" java.lang.IndexOutOfBoundsException: Index: 16, Size: 16
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at com.ygames.ysoccer.competitions.Competition.generateScorers(Competition.java:313)
at com.ygames.ysoccer.competitions.League.generateResult(League.java:195)
at com.ygames.ysoccer.screens.PlayLeague$ViewResultButton.viewResult(PlayLeague.java:324)
at com.ygames.ysoccer.screens.PlayLeague$ViewResultButton.onFire1Down(PlayLeague.java:309)
at com.ygames.ysoccer.gui.Widget.fireEvent(Widget.java:142)
at com.ygames.ysoccer.framework.GLScreen.render(GLScreen.java:106)
at com.ygames.ysoccer.framework.GLGame.render(GLGame.java:127)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:223)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:124)

I hope this helps and other than that it looks really impressive, well done.
youngireland
Someone..
Posts: 8
Joined: Fri Sep 07, 2012 3:25 pm

Re: Exception when I view result in DIY or preset competition

Post by youngireland »

Having looked into the issue further, it seems that it may be related to the bench size, which I had set at 7, whereas the teams had only 16 players. Maybe if the code could be edited to allow smaller benches than the maximum size, it might solve the issue. If I run it with a bench size of 5, it works normally.
Massimo32
Chapman's successor
Chapman's successor
Posts: 855
Joined: Wed Dec 29, 2004 1:14 pm
Location: Turin, Italy

Re: Exception when I view result in DIY or preset competition

Post by Massimo32 »

Hi youngireland,
thanks for finding the bug. I'll fix it in the next version
Post Reply