mojira.dev
MC-17156

"Give" Command throws ArrayIndexOutOfBoundsException on high Item ID values

/give @a 1000000000
2013-06-02 11:58:37 [INFO] An unknown error occurred while attempting to perform
 this command
java.lang.ArrayIndexOutOfBoundsException: 1000000000
        at ak.b(SourceFile:38)
        at y.a(SourceFile:43)
        at hz.an(SourceFile:289)
        at hz.r(SourceFile:257)
        at net.minecraft.server.MinecraftServer.q(SourceFile:397)
        at net.minecraft.server.MinecraftServer.run(SourceFile:331)
        at gp.run(SourceFile:573)

The stacktrace is serverside only, but this still looks bad.

Not a crash though.

Linked issues

Comments 9

First one is a duplicate of MC-507. Second one is intended. It's an effect that any mob can have.

I can confirm the middle one.

Second to last one dupe of MC-12454, which leaves the middle one as the only valid bug.

Well, for the second one, it is a effect mobs can have, but they are potions, not mobs that give the effect.
So it may still be a bug.
(The second one is how /effect with invalid potion effects says mob effect)

Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Yep.

lient> java.lang.ArrayIndexOutOfBoundsException: 1000000000
Client> 	at am.b(SourceFile:40)
Client> 	at aa.a(SourceFile:45)
Client> 	at jz.d(SourceFile:489)
Client> 	at jz.a(SourceFile:472)
Client> 	at dl.a(SourceFile:49)
Client> 	at cm.b(SourceFile:64)
Client> 	at jz.e(SourceFile:60)
Client> 	at kc.b(SourceFile:37)
Client> 	at bkz.b(SourceFile:84)
Client> 	at net.minecraft.server.MinecraftServer.t(SourceFile:488)
Client> 	at net.minecraft.server.MinecraftServer.s(SourceFile:405)
Client> 	at bkw.s(SourceFile:124)
Client> 	at net.minecraft.server.MinecraftServer.run(SourceFile:339)
Client> 	at hh.run(SourceFile:582)
Client> 2013-07-10 18:18:36 [CLIENT] [INFO] [CHAT] An unknown error occurred while attempting to perform this command

Do note that realy large numbers don't work. 1000000000 does, but 4000000000 doesn't.

Correct me if I'm wrong, but the removal of usage of numeric IDs in commands fixed this bug as far as I can tell.

Probably. Though I'll need to test if it effects items /summoned.

pokechu22

(Unassigned)

Confirmed

command, language, output, stacktrace, text

Minecraft 1.5.2, Snapshot 13w21b, Snapshot 13w22a, Minecraft 1.6.1, Minecraft 1.6.2

Minecraft 14w03b

Retrieved