Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-134205

Items deleted from chest after updating world to 1.13

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • Minecraft 1.13
    • None
    • Window 8, Java version
    • Unconfirmed

      Possibly related to MC-122625. After the 1.13 update and using the "optimize world" tool, all the items in one of my chests were destroyed.

      The chest affected is the top chest in the right stack of three in the following screenshot:

       

      The chest's contents before 1.13:

       

        1. 2018-07-21_11.05.29.png
          2018-07-21_11.05.29.png
          2.21 MB
        2. image-2018-07-19-11-53-06-778.png
          image-2018-07-19-11-53-06-778.png
          229 kB
        3. image-2018-07-19-11-58-10-965.png
          image-2018-07-19-11-58-10-965.png
          133 kB
        4. image-2018-07-19-12-48-07-344.png
          image-2018-07-19-12-48-07-344.png
          168 kB
        5. MC-134205_3.zip
          815 kB
        6. MC-134205_4.zip
          422 kB

          [MC-134205] Items deleted from chest after updating world to 1.13

          [Mod] Neko added a comment -

          Thank you for the analysis; though it would be better if you added this to MC-134115, as this ticket is resolved.

          [Mod] Neko added a comment - Thank you for the analysis; though it would be better if you added this to MC-134115 , as this ticket is resolved.

          MC-134115 and this post are about the same issue.

          [Mojang] Panda added a comment - MC-134115 and this post are about the same issue.

          I was able to reproduce this issue in several ways and think I got a good hypothesis about what is going on.

          MC-134205_4.zip is a world that reproduces the issue of a chest randomly losing its items.
          You can open the world in 1.12.2 first to confirm that the chest is filled.
          Then open it in 1.13. Only half of the chest should be filled now.
          (I used Java 1.8.0_171 64bit, that might matter, as I suspect hash map ordering to play a role here, which changed from Java 1.7 to Java 1.8)

          When closing and opening the world again in 1.13 the chest might become invisible until you open it.

          MC-134205_3.zip reproduces the issue in a way that may give a better idea how it is caused.

          All chests in this world are full with stone.

          Load the world in 1.13 for the first time.

          Depending on where the chests are, compared to the player, some of them randomly become empty.

          To get a feeling on how to reproduce this, you can turn on the command block and then fly around behind the chests.
          The command will replace empty chest with glass, so each time it happens a glass block is placed.
          So it gives nice visual feedback whenever the issue is happening.

          Once I had figured out how to move to make it happen, I put items in one of the glitched chests.
          https://www.youtube.com/watch?v=adPGdp4x85E&t=3m25s

          As you can see, the chest doesn't just become empty, but it seems to switch with an other chests.

          So judging from this data, my guess what is going on is, that the recent changes to chests lead to sometimes two tile entities being created on upgrading.
          Depending on which one of them updates first, that one is shown to the player.
          I recall tile entities being ordered by a hash map, so that could explain the position depended empty chests.

          The issue seems to only happen when opening an old map in 1.13 for the first time, but in some cases this means a complete loss of the items in a chest (see MC-134205_3.zip).

          I hope this helps to fully track down and fix the issue.
          While this issue isn't as severe as the initial tests indicated, I still think it's something worthy of a 1.13.1.

          [Mojang] Panda added a comment - I was able to reproduce this issue in several ways and think I got a good hypothesis about what is going on. MC-134205_4.zip is a world that reproduces the issue of a chest randomly losing its items. You can open the world in 1.12.2 first to confirm that the chest is filled. Then open it in 1.13. Only half of the chest should be filled now. (I used Java 1.8.0_171 64bit, that might matter, as I suspect hash map ordering to play a role here, which changed from Java 1.7 to Java 1.8) When closing and opening the world again in 1.13 the chest might become invisible until you open it. MC-134205_3.zip reproduces the issue in a way that may give a better idea how it is caused. All chests in this world are full with stone. Load the world in 1.13 for the first time. Depending on where the chests are, compared to the player, some of them randomly become empty. To get a feeling on how to reproduce this, you can turn on the command block and then fly around behind the chests. The command will replace empty chest with glass, so each time it happens a glass block is placed. So it gives nice visual feedback whenever the issue is happening. Once I had figured out how to move to make it happen, I put items in one of the glitched chests. https://www.youtube.com/watch?v=adPGdp4x85E&t=3m25s As you can see, the chest doesn't just become empty, but it seems to switch with an other chests. So judging from this data, my guess what is going on is, that the recent changes to chests lead to sometimes two tile entities being created on upgrading. Depending on which one of them updates first, that one is shown to the player. I recall tile entities being ordered by a hash map, so that could explain the position depended empty chests. The issue seems to only happen when opening an old map in 1.13 for the first time, but in some cases this means a complete loss of the items in a chest (see MC-134205_3.zip ). I hope this helps to fully track down and fix the issue. While this issue isn't as severe as the initial tests indicated, I still think it's something worthy of a 1.13.1.

          Xavom added a comment -

          I am able to recreate this. See the attached screen shot:

          The contents of the chest highest and furthest south east is deleted if one half of the chest is at a chunk border. In the images the yellow glass represents chests with 1/2 deleted, while the red glass, in the background, represents the entire contents deleted.

          Xavom added a comment - I am able to recreate this. See the attached screen shot: The contents of the chest highest and furthest south east is deleted if one half of the chest is at a chunk border. In the images the yellow glass represents chests with 1/2 deleted, while the red glass, in the background, represents the entire contents deleted.

          Xavom added a comment - - edited

          chubercik I was able to duplicate this bug using your world from your ticket resolved as duplicate . I was the double chest facing north full of saddles that turned up empty. ALL of the chests facing either north or east had the inventories switched. Not good since if I was using a hopper to draw items out of it, after converting it would out of sync. Could you please add you comment and the 1.12.2 world file here?

          I was able to duplicate this in a new and 1.13 optimized 1.12.2 world. One half of the double chest contents are gone.

          Xavom added a comment - - edited chubercik I was able to duplicate this bug using your world from your ticket resolved as duplicate . I was the double chest facing north full of saddles that turned up empty. ALL of the chests facing either north or east had the inventories switched. Not good since if I was using a hopper to draw items out of it, after converting it would out of sync. Could you please add you comment and the 1.12.2 world file here? I was able to duplicate this in a new and 1.13 optimized 1.12.2 world. One half of the double chest contents are gone.

          Cool thing is I've noticed it first and was marked as duplicate: https://bugs.mojang.com/browse/MC-134021

          Jakub Marcowski added a comment - Cool thing is I've noticed it first and was marked as duplicate: https://bugs.mojang.com/browse/MC-134021

          Applaud4692 added a comment -

          Are those chest loaded when you use the optimize world option or just join in 1.13?
          Are the chest on chunk borders, sub chunk borders, or not at all?

          What are the coordinates of the chests that are affected?

          Applaud4692 added a comment - Are those chest loaded when you use the optimize world option or just join in 1.13? Are the chest on chunk borders, sub chunk borders, or not at all? What are the coordinates of the chests that are affected?

          Do any of you have a backup of the world before you opened it in 1.13?
          It would also be helpful to have a screen shot of the chest content in 1.13 (even if that is just empty)

          Also the launcher output when first opening the world/chest might contain helpful information.

          If this issue is anywhere close to common, it should have a high priority as it has the potential to significantly damage survival worlds.

          [Mojang] Panda added a comment - Do any of you have a backup of the world before you opened it in 1.13? It would also be helpful to have a screen shot of the chest content in 1.13 (even if that is just empty) Also the launcher output when first opening the world/chest might contain helpful information. If this issue is anywhere close to common, it should have a high priority as it has the potential to significantly damage survival worlds.

          Angi Long added a comment -

          Same thing has happened to me, only I have NOT used the "optimize world" tool. Only converted the world to 1.13 by logging in after release of the new version. I have only found one chest affected this way so far.

          I have also found several affected by the other referenced bug, where the top 3 rows of a double chest swap with the bottom 3 rows (but all items are still present). I have not been able to identify any pattern to which chests are affected, but I converted copies of the same world multiple times and had the same chests affected each time.

          Angi Long added a comment - Same thing has happened to me, only I have NOT used the "optimize world" tool. Only converted the world to 1.13 by logging in after release of the new version. I have only found one chest affected this way so far. I have also found several affected by the other referenced bug, where the top 3 rows of a double chest swap with the bottom 3 rows (but all items are still present). I have not been able to identify any pattern to which chests are affected, but I converted copies of the same world multiple times and had the same chests affected each time.

          Andy Iverson added a comment -

          I found another chest where items were deleted. Items before:

          Andy Iverson added a comment - I found another chest where items were deleted. Items before:

            Unassigned Unassigned
            AnduCrandu Andy Iverson
            Votes:
            6 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: