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

java.util.NoSuchElementException ticking entity crash when a workstation is destroyed near a villager with a job

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: Minecraft 1.14.2
    • Environment:
      Windows 10, version 1803, build 17134.765
      Intel Core i5-8250U @ 1.6GHz (boost 3.4GHz)
      nVidia GeForce MX130 w/2GB VRAM
      2GB RAM (Minecraft default)
      Driver version 419.17
      Bundled Java version (1.8.0_51)
    • Confirmation Status:
      Community Consensus
    • Category:
      Crash, Entities, Village system

      Description

      NOTE: This bug is different from MC-145686, but could be related. MC-145686 was about java.util.Optional.get(Optional.java:135), this one is about it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet.removeFirstLong (LongLinkedOpenHashSet.java:470) gotten in a near-similar environment.

      Environment
      Have a villager with a job near a workstation (preferably within a 1-block radius). Attached (Testing.zip) is the world I used. At -83 / -12 is a pit with a villager. This is where I performed my testing.

      How to reproduce
      To trigger the crash, one commonly needs to quickly destroy and place the workstation. This will cause the villager to quickly switch from being a nitwit and the job belonging to the workstation.

      In the snapshots of 1.14, this crash seems to be fairly easy to reproduce, as the villager keeps its job for longer or even doesn't become a nitwit once its workstation is destroyed. In 1.14.2, villagers switch quickly between nitwit and having a job, thus it requires more destroying and placing (and more time to reproduce). Suggestion is, taken from the comments about this bug on MC-145686, to map the place and destroy buttons to keys near each other, for example E and F for placing and destroying, respectively.

      Crash logs
      1.14.2 server crash log: crash-2019-05-29_16.34.45-server.txt

      ---- Minecraft Crash Report ----
      // Don't be sad, have a hug! <3
      
      Time: 29-5-19 16:34
      Description: Exception ticking world
      
      java.util.NoSuchElementException
      	at it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet.removeFirstLong(LongLinkedOpenHashSet.java:470)
      	at ckn.b(SourceFile:194)
      	at aqh$a.a(SourceFile:247)
      	at aqh.a(SourceFile:154)
      	at us.a(SourceFile:384)
      	at ve.a(SourceFile:295)
      	at vg.a(SourceFile:310)
      	at net.minecraft.server.MinecraftServer.b(SourceFile:827)
      	at net.minecraft.server.MinecraftServer.a(SourceFile:764)
      	at dxk.a(SourceFile:128)
      	at net.minecraft.server.MinecraftServer.run(SourceFile:632)
      	at java.lang.Thread.run(Thread.java:745)
      

      1.14.2 game log (anonimised): 2019-05-29-5.log

      [16:34:45] [Server thread/ERROR]: Encountered an unexpected exception
      m: Exception ticking world
      	at net.minecraft.server.MinecraftServer.b(SourceFile:831) ~[1.14.2.jar:?]
      	at net.minecraft.server.MinecraftServer.a(SourceFile:764) ~[1.14.2.jar:?]
      	at dxk.a(SourceFile:128) ~[1.14.2.jar:?]
      	at net.minecraft.server.MinecraftServer.run(SourceFile:632) [1.14.2.jar:?]
      	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_51]
      Caused by: java.util.NoSuchElementException
      	at it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet.removeFirstLong(LongLinkedOpenHashSet.java:470) ~[fastutil-8.2.1.jar:?]
      	at ckn.b(SourceFile:194) ~[1.14.2.jar:?]
      	at aqh$a.a(SourceFile:247) ~[1.14.2.jar:?]
      	at aqh.a(SourceFile:154) ~[1.14.2.jar:?]
      	at us.a(SourceFile:384) ~[1.14.2.jar:?]
      	at ve.a(SourceFile:295) ~[1.14.2.jar:?]
      	at vg.a(SourceFile:310) ~[1.14.2.jar:?]
      	at net.minecraft.server.MinecraftServer.b(SourceFile:827) ~[1.14.2.jar:?]
      	... 4 more
      

      Other remarks
      This bug has been present since at least 19w14b, but doesn't seem to be in the game in 19w14a.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Excited [Mojang] Maria Lemón
                Reporter:
                DarkShadow_TNT DarkShadow_TNT
              • Votes:
                2 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  CHK: