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

Loot table exceptions are not caught

XMLWordPrintable

    • Community Consensus

      The bug

      (Apparently) Every loot table exception that occurs is not caught causing the game to crash when an invalid loot table is used for containers and in general printing an fatal error in the log.

      Affected situations

      • Invalid loot table name (Loot table name contains for example a colon)
      • Expected name to be an item, was unknown string (Invalid item name in loot table)
      • Missing entries (no entries tag provided)
      • Exceptions thrown while parsing the loot table (thrown by Json parser)

      Example

      When using a string containg a period as DeathLootTable a fatal error occurs.

      Used command
      /summon Cow ~ ~ ~ {DeathLootTable:".",Health:0.1,NoAI:1}
      
      Fatal Error (15w43a)
      [19:16:52] [Server thread/FATAL]: Error executing task
      java.util.concurrent.ExecutionException: com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalArgumentException: Invalid loot table name '{}' (can't contain periods)minecraft:.
      	at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_25]
      	at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_25]
      	at g.a(SourceFile:46) [15w43a.jar:?]
      	at net.minecraft.server.MinecraftServer.D(SourceFile:590) [15w43a.jar:?]
      	at net.minecraft.server.MinecraftServer.C(SourceFile:546) [15w43a.jar:?]
      	at bxi.C(SourceFile:154) [15w43a.jar:?]
      	at net.minecraft.server.MinecraftServer.run(SourceFile:450) [15w43a.jar:?]
      	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_25]
      Caused by: com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalArgumentException: Invalid loot table name '{}' (can't contain periods)minecraft:.
      	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2201) ~[guava-17.0.jar:?]
      	at com.google.common.cache.LocalCache.get(LocalCache.java:3934) ~[guava-17.0.jar:?]
      	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3938) ~[guava-17.0.jar:?]
      	at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4821) ~[guava-17.0.jar:?]
      	at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4827) ~[guava-17.0.jar:?]
      	at azm.a(SourceFile:46) ~[15w43a.jar:?]
      	at rv.a(SourceFile:435) ~[15w43a.jar:?]
      	at ru.a(SourceFile:833) ~[15w43a.jar:?]
      	at ru.a(SourceFile:766) ~[15w43a.jar:?]
      	at vp.a(SourceFile:64) ~[15w43a.jar:?]
      	at zl.f(SourceFile:1070) ~[15w43a.jar:?]
      	at ls.f(SourceFile:1032) ~[15w43a.jar:?]
      	at mb.a(SourceFile:899) ~[15w43a.jar:?]
      	at is.a(SourceFile:68) ~[15w43a.jar:?]
      	at is.a(SourceFile:12) ~[15w43a.jar:?]
      	at fh$1.run(SourceFile:13) ~[15w43a.jar:?]
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_25]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_25]
      	at g.a(SourceFile:45) ~[15w43a.jar:?]
      	... 5 more
      Caused by: java.lang.IllegalArgumentException: Invalid loot table name '{}' (can't contain periods)minecraft:.
      	at azm$a.a(SourceFile:61) ~[15w43a.jar:?]
      	at azm$a.load(SourceFile:56) ~[15w43a.jar:?]
      	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3524) ~[guava-17.0.jar:?]
      	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2317) ~[guava-17.0.jar:?]
      	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2280) ~[guava-17.0.jar:?]
      	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2195) ~[guava-17.0.jar:?]
      	at com.google.common.cache.LocalCache.get(LocalCache.java:3934) ~[guava-17.0.jar:?]
      	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3938) ~[guava-17.0.jar:?]
      	at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4821) ~[guava-17.0.jar:?]
      	at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4827) ~[guava-17.0.jar:?]
      	at azm.a(SourceFile:46) ~[15w43a.jar:?]
      	at rv.a(SourceFile:435) ~[15w43a.jar:?]
      	at ru.a(SourceFile:833) ~[15w43a.jar:?]
      	at ru.a(SourceFile:766) ~[15w43a.jar:?]
      	at vp.a(SourceFile:64) ~[15w43a.jar:?]
      	at zl.f(SourceFile:1070) ~[15w43a.jar:?]
      	at ls.f(SourceFile:1032) ~[15w43a.jar:?]
      	at mb.a(SourceFile:899) ~[15w43a.jar:?]
      	at is.a(SourceFile:68) ~[15w43a.jar:?]
      	at is.a(SourceFile:12) ~[15w43a.jar:?]
      	at fh$1.run(SourceFile:13) ~[15w43a.jar:?]
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_25]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_25]
      	at g.a(SourceFile:45) ~[15w43a.jar:?]
      	... 5 more
      

            grum [Mojang] Grum (Erik Broes)
            marcono1234 Marcono1234
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: