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.

Related issues

MC-53219 Item frames and comparators, multiplies entities MC-55073 Entity Duplication Glitch MC-56077 Item Duplication Glitch Using Item Frames, Comparators [14w18-14w21] MC-56233 dupe glitch MC-56582 Duplication glitch MC-56844 Dupelication Glitch (Chunk Glitch) MC-56908 Contents of Chests spilled in front of them (whilst also being in the chests)+ 100s of item frames on the ground MC-56940 Item frames spawning loads of what was inside them and the item frame itself MC-58954 Duplication glitch in chunk MC-59257 item / entity duplication glitch MC-59717 Item frame facing east + Comparator out the back = duplication bug MC-61299 Important Entities Multiplication MC-62398 Minecraft dupe crashes online multipler servers CAUSES CRASH ON SMP MC-62745 Item Duplication Glitch using Comparators - Dupe 1 block to 8 stacks MC-62945 Extreme entity duplication using Item Frames MC-64373 Duplication glitch using item frames MC-64904 Bug of Item Frame and Redstone. MC-66196 Dupe glitch with Item frames & comparators MC-67789 Long-standing duplication bug. MC-68286 duplication glitch in survival with the new item frames putting out a redstone signal MC-68704 Duilpiction bug

Attachments

Comments

migrated
[media][media][media][media][media][media]
kumasasa

Confirmed.

migrated

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.

kumasasa

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:?]
kumasasa

Duplication does not occur if comparator gets removed.

migrated

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.

migrated

I testet it and it still works in 14w20b.
The item frame has to be in a different chunk than the block it's hanging on in positive X or Z direction
Not only the item frame and its content get duplicated but also every other entity in the chunk the item frame is in.

migrated

Confirmed for 14w21a/b.

migrated

If you execute this bug with a villager you will get duplicates of the villager - the only way this seems to happen in the game.

migrated

Confirmed for 14w26a

migrated

confirmed for 14w26c

migrated

Confirmed for 14w27b

migrated

I should mention also that we originally discovered this issue accidentally in a multiplayer world: Besides the minimal repro, if you nether-portal in to an adjacent chunk in an area away from spawn (rather than just loading a single player world standing in an adjacent chunk) it also triggers the bug (and may crash the server, I think depending on the number of entities it results in)

migrated

Confirmed for 14w28a

migrated

Confirmed for 14w28b.

migrated

Confirmed for 14w29b.

migrated

Confirmed for 14w30a

migrated

Confirmed in 14w30b.

migrated

I cant run my snapshot server because of this and will not be able to update to 1.8 as this bug crashes online servers

migrated

Confirmed for 14w31a

migrated

Confirmed for 14w32a

migrated

I can also confirm for 14w32a. Screenshot attached.

migrated

Confirmed for 14w32c

migrated

Confirmed for 14w32d

migrated

Confirmed for 14w33a

migrated

Confirmed for 14w33b

migrated

Confirmed for 14w33c

migrated

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