Mojira Archive
MC-249702

Server crash when attempting to start a server with malformatted banned-ips.json

The bug

Attempting to start a server with square brackets missing in banned-ips.json causes a crash.

Stack trace

Description: Exception in server tick loop

java.lang.NullPointerException: Cannot invoke "com.google.gson.JsonArray.iterator()" because "$$1" is null
	at ags.f(SourceFile:121)
	at acw.y(SourceFile:76)
	at acw.<init>(SourceFile:25)
	at acx.e(SourceFile:172)
	at net.minecraft.server.MinecraftServer.w(SourceFile:670)
	at net.minecraft.server.MinecraftServer.a(SourceFile:273)
	at java.base/java.lang.Thread.run(Thread.java:833)

Code analysis

Code analysis by apple502j can be found in this comment.

Fixed

justin barrett

2022-03-30, 07:54 PM

2024-11-13, 03:20 PM

2023-09-07, 11:19 AM

5

8

Confirmed

Important

Platform

Crash, Dedicated Server

banned-ips.json

1.18.2, 1.19.3, 23w05a

1.20.2 Pre-release 2