Shifting around servers in the server list crashes the game (ArrayIndexOutOfBoundsException)
The bug
When holding down shift and pressing an arrow key to move servers in the list, moving it when it is already at the bottom of the list, and press shift+down, the game crashes.
How to reproduce
- You'll need quite the server list, so you can press and hold shift+up so it keeps shifting a server up
- Do that (press and hold shift+up to shift up multiple times) and then press and hold shift+down to shift it down repeatedly
- When you reach the bottom of the list, the auto shift thing throws an error
Note: it doesn't seem to work on the top of the list.
Crash report
Description: keyPressed event handler java.lang.ArrayIndexOutOfBoundsException: -1 at java.util.ArrayList.elementData(ArrayList.java:418) at java.util.ArrayList.get(ArrayList.java:431) at dnv.a(SourceFile:60) at dnv.a(SourceFile:76) at dii$d.a(SourceFile:412) at dii$d.keyPressed(SourceFile:403) at ddr.keyPressed(SourceFile:64) at dcr.keyPressed(SourceFile:375) at dii.keyPressed(SourceFile:70) at ddr.keyPressed(SourceFile:64) at dgb.keyPressed(SourceFile:98) at dig.keyPressed(SourceFile:185) at dbl.a(SourceFile:336) at dbl$$Lambda$1939/1470898703.run(Unknown Source) at dgb.wrapScreenError(SourceFile:447) at dbl.a(SourceFile:334) at dbl.c(SourceFile:429) at dbl$$Lambda$1938/823663080.run(Unknown Source) at ais.execute(SourceFile:94) at dbl.b(SourceFile:429) at dbl$$Lambda$1508/1004728150.invoke(Unknown Source) at org.lwjgl.glfw.GLFWKeyCallbackI.callback(GLFWKeyCallbackI.java:37) at org.lwjgl.system.JNI.invokeV(Native Method) at org.lwjgl.glfw.GLFW.glfwWaitEventsTimeout(GLFW.java:3174) at com.mojang.blaze3d.systems.RenderSystem.limitDisplayFPS(SourceFile:123) at dbn.d(SourceFile:1015) at dbn.d(SourceFile:619) at net.minecraft.client.main.Main.main(SourceFile:204)
Created Issue:
Shifting around servers in the server list crashes the game (ArrayIndexOutOfBoundsException)
So.
I just figured out that you can shift servers around in the server list by holding shift and using the arrow keys.When you implement such a feature, you should probably make sure that you can't shift it down at the end of the list.
I added the crash report as an attachment.
This shouldn't be a hard one to fix (I have quite a bit of coding experience, I know what I'm saying).
If you are at the end of the list, just don't handle that keypress. Easy as pie.At least, I think this is the issue. If I concluded this too quickly, feel free to shout at me.
How to reproduce:
You'll need quite the server list, so you can hold shift+up so it keeps shifting a server up.
Do that (hold to shift multiple times) and then hold shift+down to shift it down repeatedly.
When you reach the bottom of the list, the auto shift thing throws an error.It doesn't seem to work on the top of the list. (which is weird, as if there IS a catching mechanism there, because index 0 minus 1 definitely equals -1)
Environment
– System Details –
Details:
Minecraft Version: 1.15.2
Minecraft Version ID: 1.15.2
Operating System: Windows 10 (amd64) version 10.0
Java Version: 1.8.0_51, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 1532069832 bytes (1461 MB) / 2147483648 bytes (2048 MB) up to 2147483648 bytes (2048 MB)
CPUs: 4
JVM Flags: 9 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
Launched Version: 1.15.2
Backend library: LWJGL version 3.2.2 build 10
Backend API: Intel(R) HD Graphics 5500 GL version 4.4.0 - Build 20.19.15.5063, Intel
GL Caps: Using framebuffer using OpenGL 3.0
Using VBOs: Yes
Is Modded: Probably not. Jar signature remains and client brand is untouched. (Note from CenTdemeern1: I did indeed not mod the game.)
Type: Client (map_client.txt)
Resource Packs: vanilla, file/LowFire.zip (incompatible)
Current Language: English (US)
CPU: 4x Intel(R) Core(TM) i3-5005U CPU @ 2.00GHz
– System Details –
Details:
Minecraft Version: 1.15.2
Minecraft Version ID: 1.15.2
Operating System: Windows 10 (amd64) version 10.0
Java Version: 1.8.0_51, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 1532069832 bytes (1461 MB) / 2147483648 bytes (2048 MB) up to 2147483648 bytes (2048 MB)
CPUs: 4
JVM Flags: 9 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
Launched Version: 1.15.2
Backend library: LWJGL version 3.2.2 build 10
Backend API: Intel(R) HD Graphics 5500 GL version 4.4.0 - Build 20.19.15.5063, Intel
GL Caps: Using framebuffer using OpenGL 3.0
Using VBOs: Yes
Is Modded: Probably not. Jar signature remains and client brand is untouched. (Note from CenTdemeern1 (Timo Herngreen): I did indeed not mod the game.)
Type: Client (map_client.txt)
Resource Packs: vanilla, file/LowFire.zip (incompatible)
Current Language: English (US)
CPU: 4x Intel(R) Core(TM) i3-5005U CPU @ 2.00GHz
So.
I just figured out that you can shift servers around in the server list by holding shift and using the arrow keys.
When you implement such a feature, you should probably make sure that you can't shift it down attheendof the list.I added the crash report as an attachment.
This shouldn't be a hard one to fix (I have quite a bit of coding experience, I know what I'm saying).
If you are at the end of the list, just don't handle that keypress. Easy as pie.At least, I think this is the issue. If I concluded this too quickly, feel free to shout at me.
How to reproduce:
You'll need quite the server list, so you can hold shift+up so it keeps shifting a server up.
Do that (hold to shift multiple times) and then hold shift+down to shift it down repeatedly.
When you reach the bottom of the list, the auto shift thing throws an error.It doesn't seem to work on the top of the list. (which is weird, as if there IS a catching mechanism there, because index 0 minus 1 definitely equals -1)
The bug
When holding down shift and pressing an arrow key to move servers in the list, moving it when it is already at the bottom of the list, and press shift+down, the game crashes.
How to reproduce
- You'll need quite the server list, so you can hold shift+up so it keeps shifting a server up
- Do that (hold to shift multiple times) and then hold shift+down to shift it down repeatedly
- When you reach the bottom of the list, the auto shift thing throws an error
Note: it doesn't seem to work on the top of the list.
The bug
When holding down shift and pressing an arrow key to move servers in the list, moving it when it is already at the bottom of the list, and press shift+down, the game crashes.
How to reproduce
- You'll need quite the server list, so you can hold shift+up so it keeps shifting a server up
- Do that (hold to shift multiple times) and then hold shift+down to shift it down repeatedly
- When you reach the bottom of the list, the auto shift thing throws an error
Note: it doesn't seem to work on the top of the list.
Crash report
Description: keyPressed event handler java.lang.ArrayIndexOutOfBoundsException: -1 at java.util.ArrayList.elementData(ArrayList.java:418) at java.util.ArrayList.get(ArrayList.java:431) at dnv.a(SourceFile:60) at dnv.a(SourceFile:76) at dii$d.a(SourceFile:412) at dii$d.keyPressed(SourceFile:403) at ddr.keyPressed(SourceFile:64) at dcr.keyPressed(SourceFile:375) at dii.keyPressed(SourceFile:70) at ddr.keyPressed(SourceFile:64) at dgb.keyPressed(SourceFile:98) at dig.keyPressed(SourceFile:185) at dbl.a(SourceFile:336) at dbl$$Lambda$1939/1470898703.run(Unknown Source) at dgb.wrapScreenError(SourceFile:447) at dbl.a(SourceFile:334) at dbl.c(SourceFile:429) at dbl$$Lambda$1938/823663080.run(Unknown Source) at ais.execute(SourceFile:94) at dbl.b(SourceFile:429) at dbl$$Lambda$1508/1004728150.invoke(Unknown Source) at org.lwjgl.glfw.GLFWKeyCallbackI.callback(GLFWKeyCallbackI.java:37) at org.lwjgl.system.JNI.invokeV(Native Method) at org.lwjgl.glfw.GLFW.glfwWaitEventsTimeout(GLFW.java:3174) at com.mojang.blaze3d.systems.RenderSystem.limitDisplayFPS(SourceFile:123) at dbn.d(SourceFile:1015) at dbn.d(SourceFile:619) at net.minecraft.client.main.Main.main(SourceFile:204)
– System Details –
Details:
Minecraft Version: 1.15.2
Minecraft Version ID: 1.15.2
Operating System: Windows 10 (amd64) version 10.0
Java Version: 1.8.0_51, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 1532069832 bytes (1461 MB) / 2147483648 bytes (2048 MB) up to 2147483648 bytes (2048 MB)
CPUs: 4
JVM Flags: 9 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
Launched Version: 1.15.2
Backend library: LWJGL version 3.2.2 build 10
Backend API: Intel(R) HD Graphics 5500 GL version 4.4.0 - Build 20.19.15.5063, Intel
GL Caps: Using framebuffer using OpenGL 3.0
Using VBOs: Yes
Is Modded: Probably not. Jar signature remains and client brand is untouched. (Note from CenTdemeern1 (Timo Herngreen): I did indeed not mod the game.)
Type: Client (map_client.txt)
Resource Packs: vanilla, file/LowFire.zip (incompatible)
Current Language: English (US)
CPU: 4x Intel(R) Core(TM) i3-5005U CPU @ 2.00GHz
The bug
When holding down shift and pressing an arrow key to move servers in the list, moving it when it is already at the bottom of the list, and press shift+down, the game crashes.
How to reproduce
- You'll need quite the server list, so you can hold shift+up so it keeps shifting a server up
- Do that (
holdto shift multiple times) and then hold shift+down to shift it down repeatedly- When you reach the bottom of the list, the auto shift thing throws an error
Note: it doesn't seem to work on the top of the list.
Crash report
Description: keyPressed event handler java.lang.ArrayIndexOutOfBoundsException: -1 at java.util.ArrayList.elementData(ArrayList.java:418) at java.util.ArrayList.get(ArrayList.java:431) at dnv.a(SourceFile:60) at dnv.a(SourceFile:76) at dii$d.a(SourceFile:412) at dii$d.keyPressed(SourceFile:403) at ddr.keyPressed(SourceFile:64) at dcr.keyPressed(SourceFile:375) at dii.keyPressed(SourceFile:70) at ddr.keyPressed(SourceFile:64) at dgb.keyPressed(SourceFile:98) at dig.keyPressed(SourceFile:185) at dbl.a(SourceFile:336) at dbl$$Lambda$1939/1470898703.run(Unknown Source) at dgb.wrapScreenError(SourceFile:447) at dbl.a(SourceFile:334) at dbl.c(SourceFile:429) at dbl$$Lambda$1938/823663080.run(Unknown Source) at ais.execute(SourceFile:94) at dbl.b(SourceFile:429) at dbl$$Lambda$1508/1004728150.invoke(Unknown Source) at org.lwjgl.glfw.GLFWKeyCallbackI.callback(GLFWKeyCallbackI.java:37) at org.lwjgl.system.JNI.invokeV(Native Method) at org.lwjgl.glfw.GLFW.glfwWaitEventsTimeout(GLFW.java:3174) at com.mojang.blaze3d.systems.RenderSystem.limitDisplayFPS(SourceFile:123) at dbn.d(SourceFile:1015) at dbn.d(SourceFile:619) at net.minecraft.client.main.Main.main(SourceFile:204)The bug
When holding down shift and pressing an arrow key to move servers in the list, moving it when it is already at the bottom of the list, and press shift+down, the game crashes.
How to reproduce
- You'll need quite the server list, so you can press and hold shift+up so it keeps shifting a server up
- Do that (press and hold shift+up to shift up multiple times) and then press and hold shift+down to shift it down repeatedly
- When you reach the bottom of the list, the auto shift thing throws an error
Note: it doesn't seem to work on the top of the list.
Crash report
1.15.2: crash-2020-06-13_11.54.48-client.txtDescription: keyPressed event handler java.lang.ArrayIndexOutOfBoundsException: -1 at java.util.ArrayList.elementData(ArrayList.java:418) at java.util.ArrayList.get(ArrayList.java:431) at dnv.a(SourceFile:60) at dnv.a(SourceFile:76) at dii$d.a(SourceFile:412) at dii$d.keyPressed(SourceFile:403) at ddr.keyPressed(SourceFile:64) at dcr.keyPressed(SourceFile:375) at dii.keyPressed(SourceFile:70) at ddr.keyPressed(SourceFile:64) at dgb.keyPressed(SourceFile:98) at dig.keyPressed(SourceFile:185) at dbl.a(SourceFile:336) at dbl$$Lambda$1939/1470898703.run(Unknown Source) at dgb.wrapScreenError(SourceFile:447) at dbl.a(SourceFile:334) at dbl.c(SourceFile:429) at dbl$$Lambda$1938/823663080.run(Unknown Source) at ais.execute(SourceFile:94) at dbl.b(SourceFile:429) at dbl$$Lambda$1508/1004728150.invoke(Unknown Source) at org.lwjgl.glfw.GLFWKeyCallbackI.callback(GLFWKeyCallbackI.java:37) at org.lwjgl.system.JNI.invokeV(Native Method) at org.lwjgl.glfw.GLFW.glfwWaitEventsTimeout(GLFW.java:3174) at com.mojang.blaze3d.systems.RenderSystem.limitDisplayFPS(SourceFile:123) at dbn.d(SourceFile:1015) at dbn.d(SourceFile:619) at net.minecraft.client.main.Main.main(SourceFile:204)
relates to
relates to
is duplicated by
Hello! This looks to be a duplicate of MC-189336.
I can't reproduce in 1.15.2 or 1.16 pre 5, it always stop shifting and it doesn't crash :s