Card-Forge / forge

An unofficial rules engine for the world's greatest card game.
https://card-forge.github.io/forge/
GNU General Public License v3.0
990 stars 565 forks source link

Lots of crashing when drafting in adventure mode #5354

Closed chesse20 closed 2 weeks ago

chesse20 commented 5 months ago

Describe the bug A crash after attempting to collect draft rewards: forge.log n(Main.java:134)

EDT > java.lang.IndexOutOfBoundsException: Index 6 out of bounds for length 6
    at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
    at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
    at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266)
    at java.base/java.util.Objects.checkIndex(Objects.java:359)
    at java.base/java.util.ArrayList.get(ArrayList.java:427)
    at forge.adventure.data.AdventureEventData.generateParticipants(AdventureEventData.java:438)
    at forge.adventure.data.AdventureEventData.<init>(AdventureEventData.java:107)
    at forge.adventure.util.AdventureEventController.createEvent(AdventureEventController.java:108)
    at forge.adventure.scene.InnScene.getLocalEvent(InnScene.java:161)
    at forge.adventure.scene.InnScene.refreshStatus(InnScene.java:112)
    at forge.adventure.scene.InnScene.enter(InnScene.java:99)
    at forge.Forge.switchScene(Forge.java:1058)
    at forge.Forge.switchScene(Forge.java:1035)
    at forge.adventure.scene.EventScene.back(EventScene.java:503)
    at forge.adventure.util.UIActor$2.clicked(UIActor.java:347)
    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:355)
    at com.badlogic.gdx.InputEventQueue.drain(InputEventQueue.java:70)
    at com.badlogic.gdx.backends.lwjgl3.DefaultLwjgl3Input.update(DefaultLwjgl3Input.java:189)
    at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Window.update(Lwjgl3Window.java:378)
    at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.loop(Lwjgl3Application.java:192)
    at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:166)
    at forge.app.Main.main(Main.java:134)

Crash after starting a new match forge0.log

EDT > java.lang.NullPointerException: Cannot invoke "forge.adventure.data.AdventureEventData$AdventureEventParticipant.getDeck()" because "this.eventData.nextOpponent" is null
    at forge.adventure.scene.DuelScene.enter(DuelScene.java:309)
    at forge.Forge.switchToLast(Forge.java:1074)
    at forge.adventure.scene.DuelScene.lambda$afterGameEnd$1(DuelScene.java:163)
    at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.loop(Lwjgl3Application.java:208)
    at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:166)
    at forge.app.Main.main(Main.java:134)

Expected behavior The game seems to crash a lot during the drafting game mode so i thought to include 2 crash logs

Desktop (please complete the following information): Windows 10 OTJ release build/v.1.6.62-SNAPSHOT

github-actions[bot] commented 4 months ago

This issue has not been updated in a while and has now been marked as stale. Stale messages will be auto closed.

chesse20 commented 4 months ago

don't think this has been fixed yet

github-actions[bot] commented 3 months ago

This issue has not been updated in a while and has now been marked as stale. Stale messages will be auto closed.

github-actions[bot] commented 1 month ago

This issue has not been updated in a while and has now been marked as stale. Stale messages will be auto closed.

chesse20 commented 1 month ago

bump

This issue has not been updated in a while and has now been marked as stale. Stale messages will be auto closed.

github-actions[bot] commented 3 weeks ago

This issue has not been updated in a while and has now been marked as stale. Stale messages will be auto closed.