Halma icon indicating copy to clipboard operation
Halma copied to clipboard

Game crashes with 3 players in total

Open CloneWith opened this issue 10 months ago • 0 comments

:writing_hand: Describe the bug

Whenever the number of all players is set to three (on a star board), the game crashes without showing an error.

:bomb: Steps to reproduce

  1. Click New Game
  2. Set players: 2 bots and 1 player, or 1 bot and 2 players
  3. Click Start Game
  4. Game crashed immediately

:iphone: Tech info

  • Device: Redmi Note 12T Pro
  • OS: MIUI 14.0.10 @ Android 13
  • Version: Halma v13.0

:page_facing_up: Additional context

This is a trace report generated by my device, should be of some help.

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	at java.util.LinkedList.checkElementIndex(LinkedList.java:559)
	at java.util.LinkedList.get(LinkedList.java:480)
	at app.halma.play.Player.randomField(Player.java:63)
	at app.halma.play.Player.play(Player.java:31)
	at app.halma.play.Play.play(Play.java:56)
	at app.halma.play.Play.create(Play.java:53)
	at app.halma.play.Play.createInstance(Play.java:28)
	at app.halma.redesign.PlayConfig.clicked(PlayConfig.java:104)
	at app.halma.BaseScreen$Listener.clicked(BaseScreen.java:84)
	at com.badlogic.gdx.scenes.scene2d.utils.ClickListener.touchUp(ClickListener.java:88)
	at com.badlogic.gdx.scenes.scene2d.InputListener.handle(InputListener.java:71)
	at com.badlogic.gdx.scenes.scene2d.Stage.touchUp(Stage.java:354)
	at com.badlogic.gdx.backends.android.DefaultAndroidInput.processEvents(DefaultAndroidInput.java:423)
	at com.badlogic.gdx.backends.android.AndroidGraphics.onDrawFrame(AndroidGraphics.java:503)
	at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1581)
	at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1280)

CloneWith avatar Apr 12 '24 04:04 CloneWith