The Bug:
The game crashes when attempting to accept or reject already accepted or rejected realm invitations.
A crash report regarding this has been attached and can be found below.
Stack Trace:
[^crash-2024-10-03_12.34.37-client.txt]
Description: mouseClicked event handler
java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106)
at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302)
at java.base/java.util.Objects.checkIndex(Objects.java:385)
at java.base/java.util.ArrayList.get(ArrayList.java:427)
at fnt$b.a(SourceFile:559)
at fnt$b.get(SourceFile:554)
at fjv.a(SourceFile:103)
at fjv.c(SourceFile:82)
at fny.b(SourceFile:96)
at fnp.a(SourceFile:43)
at fnw.a(SourceFile:141)
at fpv.a(SourceFile:38)
at fma.b(SourceFile:111)
at ftr.a(SourceFile:429)
at fma.a(SourceFile:111)
at fma.c(SourceFile:189)
at brt.execute(SourceFile:110)
at fma.b(SourceFile:189)
at org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:43)
at org.lwjgl.system.JNI.invokeV(Native Method)
at org.lwjgl.glfw.GLFW.glfwWaitEventsTimeout(GLFW.java:3509)
at com.mojang.blaze3d.systems.RenderSystem.limitDisplayFPS(SourceFile:186)
at flz.c(SourceFile:1373)
at flz.f(SourceFile:934)
at net.minecraft.client.main.Main.main(SourceFile:265)
Steps to Reproduce:
Get a player to invite you to their realm.
Click on the pending invitation button.
Accept the realms invitation by pressing the green tick button.
Now click the "Accept" or "Reject" buttons.
Observed Behavior:
The game crashes.
Expected Behavior:
The game would not crash.
In this case, is there an invite that the 'Accept' or 'Reject' button gets clicked for and then clicked again? From my understanding, the selected invite index is not reset to -1 when the invite is removed from the list, causing this issue. A check which normally would've prevented the crash itself was removed in Minecraft snapshot 24w40a.
The design of this screen seems quite odd anyways to have reject and accept buttons on the bottom row. From my understanding, they are also on each invite as well? I suppose it's like the singleplayer/multiplayer screens which have functionality duplication to a lesser extent.