mojira.dev
MC-51610

Item frame causing duplication when loading map (causing / caused by stack overflow)

Attached screenshot and minimal world repro. If you stand at the location indicated in the screenshot and save/reload the world, you will hit the bug.

Root cause has been narrowed down to:
Item frame with some contained item at X=0 / Z=0 in chunk
Mounted on block in adjacent chunk
Behind that block, a comparator is sensing the item frame

Stand in a chunk adjacent to the chunk containing the item frame, save and load the world, and all❓ entities in the chunk with the item frame will be duplicated a huge number of times.


From MC-56077:

This is an item duplication glitch that involves the new comparator measuring item frame feature in snapshot 14w18.

How to Replicate This Bug:
1.) Find the east/west edge of a chunk. (Preferably using F3)
2.) Place any redstone current-carrying block on the west side of the chunk edge.
3.) Place an item frame on the block, facing east.
4.) Place a comparator next the block, pointing the opposite direction that the item frame is facing, so that the comparator is in a different chunk than the item frame.
5.) Put any block you want to duplicate into the item frame.
6.) Quit and re-join the world. You will now have a stack of item frames and the item you put in the frame.

Linked issues

MC-53219 Item frames and comparators, multiplies entities Resolved MC-55073 Entity Duplication Glitch Resolved MC-56077 Item Duplication Glitch Using Item Frames, Comparators [14w18-14w21] Resolved MC-56233 dupe glitch Resolved MC-56582 Duplication glitch Resolved

Attachments

Comments 26

Confirmed.

Also attaching log file, which has some nice long stack overflow exceptions that were ignored when loading. Last level load in the log is related to the screenshot.

Duplication causes exception (or exception causes duplication):

[07:21:34 INFO]: Client> [07:21:30] [Server thread/ERROR]: Couldn't load chunk
[07:21:34 INFO]: Client> s: Exception getting block type in world
[07:21:34 INFO]: Client> 	at tj.f(SourceFile:1168) ~[14w11b.jar:?]
[07:21:34 INFO]: Client> 	at tp.a(SourceFile:158) ~[14w11b.jar:?]
[07:21:34 INFO]: Client> 	at ave.a(SourceFile:291) ~[14w11b.jar:?]
...
[07:21:34 INFO]: Client> 	at ny.d(SourceFile:117) ~[14w11b.jar:?]
[07:21:34 INFO]: Client> 	at akh.b(SourceFile:287) ~[14w11b.jar:?]
[07:21:34 INFO]: Client> 	at akh.f(SourceFile:282) ~[14w11b.jar:?]
[07:21:34 INFO]: Client> 	at akh.c(SourceFile:218) ~[14w11b.jar:?]
[07:21:34 INFO]: Client> 	at akh.a(SourceFile:2360) ~[14w11b.jar:?]
[07:21:34 INFO]: Client> Caused by: java.lang.StackOverflowError
[07:21:34 INFO]: Client> 	at java.lang.Package.<init>(Unknown Source) ~[?:1.7.0_51]
[07:21:34 INFO]: Client> 	at java.lang.Package.<init>(Unknown Source) ~[?:1.7.0_51]
[07:21:34 INFO]: Client> 	at java.lang.Package$1.run(Unknown Source) ~[?:1.7.0_51]
[07:21:34 INFO]: Client> 	at java.lang.Package$1.run(Unknown Source) ~[?:1.7.0_51]
[07:21:34 INFO]: Client> 	at java.security.AccessController.doPrivileged(Native Method) ~[?:1.7.0_51]
[07:21:34 INFO]: Client> 	at java.lang.Package.defineSystemPackage(Unknown Source) ~[?:1.7.0_51]
[07:21:34 INFO]: Client> 	at java.lang.Package.getSystemPackage(Unknown Source) ~[?:1.7.0_51]
[07:21:34 INFO]: Client> 	at java.lang.Package.getPackage(Unknown Source) ~[?:1.7.0_51]
[07:21:34 INFO]: Client> 	at java.lang.Class.getPackage(Unknown Source) ~[?:1.7.0_51]
[07:21:34 INFO]: Client> 	at org.apache.logging.log4j.core.impl.ThrowableProxy.resolvePackageElement(ThrowableProxy.java:437) ~[log4j-core-2.0-beta9.jar:2.0-beta9]
[07:21:34 INFO]: Client> 	at org.apache.logging.log4j.core.impl.ThrowableProxy.resolvePackageData(ThrowableProxy.java:395) ~[log4j-core-2.0-beta9.jar:2.0-beta9]
[07:21:34 INFO]: Client> 	at org.apache.logging.log4j.core.impl.ThrowableProxy.<init>(ThrowableProxy.java:115) ~[log4j-core-2.0-beta9.jar:2.0-beta9]
[07:21:34 INFO]: Client> 	at org.apache.logging.log4j.core.impl.ThrowableProxy.<init>(ThrowableProxy.java:98) ~[log4j-core-2.0-beta9.jar:2.0-beta9]
[07:21:34 INFO]: Client> 	at org.apache.logging.log4j.core.impl.Log4jLogEvent.<init>(Log4jLogEvent.java:114) ~[log4j-core-2.0-beta9.jar:2.0-beta9]
[07:21:34 INFO]: Client> 	at org.apache.logging.log4j.core.impl.Log4jLogEvent.<init>(Log4jLogEvent.java:90) ~[log4j-core-2.0-beta9.jar:2.0-beta9]
[07:21:34 INFO]: Client> 	at org.apache.logging.log4j.core.impl.DefaultLogEventFactory.createEvent(DefaultLogEventFactory.java:49) ~[log4j-core-2.0-beta9.jar:2.0-beta9]
[07:21:34 INFO]: Client> 	at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:365) ~[log4j-core-2.0-beta9.jar:2.0-beta9]
[07:21:34 INFO]: Client> 	at org.apache.logging.log4j.core.Logger.log(Logger.java:110) ~[log4j-core-2.0-beta9.jar:2.0-beta9]
[07:21:34 INFO]: Client> 	at org.apache.logging.log4j.spi.AbstractLogger.error(AbstractLogger.java:609) ~[log4j-api-2.0-beta9.jar:2.0-beta9]
[07:21:34 INFO]: Client> 	at ny.f(SourceFile:139) ~[14w11b.jar:?]
[07:21:34 INFO]: Client> 	at ny.c(SourceFile:81) ~[14w11b.jar:?]
[07:21:34 INFO]: Client> 	at ny.d(SourceFile:117) ~[14w11b.jar:?]
[07:21:34 INFO]: Client> 	at akh.b(SourceFile:287) ~[14w11b.jar:?]
...
[07:21:34 INFO]: Client> 	at akh.x(SourceFile:2377) ~[14w11b.jar:?]
[07:21:34 INFO]: Client> 	at akh.c(SourceFile:2398) ~[14w11b.jar:?]
[07:21:34 INFO]: Client> 	at anw.g(SourceFile:168) ~[14w11b.jar:?]
[07:21:34 INFO]: Client> 	at ann.g(SourceFile:131) ~[14w11b.jar:?]
[07:21:34 INFO]: Client> 	at ann.i(SourceFile:101) ~[14w11b.jar:?]
[07:21:34 INFO]: Client> 	at ann.b(SourceFile:197) ~[14w11b.jar:?]
[07:21:34 INFO]: Client> 	at anw.a(SourceFile:133) ~[14w11b.jar:?]
[07:21:34 INFO]: Client> 	at akh.f(SourceFile:2821) ~[14w11b.jar:?]

Duplication does not occur if comparator gets removed.

Still exists in latest snapshot. I noticed the duplication also occurs if you stand in the same chunk in the repro world; there may be some conditions to it as I didn't observe this in a previous repro environment.

16 more comments

Confirmed for 14w32c

Confirmed for 14w32d

Confirmed for 14w33a

Confirmed for 14w33b

Confirmed for 14w33c

Stephen Stair

michael

Confirmed

duplication, entity, item-frame, redstone-comparator

Minecraft 14w11b, Minecraft 14w18b, Minecraft 14w19a, Minecraft 14w20b, Minecraft 14w21b, ..., Minecraft 14w32c, Minecraft 14w32d, Minecraft 14w33a, Minecraft 14w33b, Minecraft 14w33c

Minecraft 14w34a

Retrieved