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

Certain chunk loading errors are not logged

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.20.1, 1.20.2 Pre-release 1, 1.20.2
    • None
    • Confirmed
    • Chunk loading, Debug
    • Normal
    • Platform

      private Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure> handleChunkLoadFailure(Throwable throwable, ChunkPos chunkPos) { // In ChunkMap.java
          if (throwable instanceof ReportedException reportedException) {
              Throwable throwable2 = reportedException.getCause();
              if (!(throwable2 instanceof IOException)) {
                  this.markPositionReplaceable(chunkPos);
                  throw reportedException;
              }
      
              LOGGER.error("Couldn't load chunk {}", chunkPos, throwable2);
          } else if (throwable instanceof IOException) {
              LOGGER.error("Couldn't load chunk {}", chunkPos, throwable);
          }
      
          return Either.left(this.createEmptyChunk(chunkPos));
      } 

      (From ChunkMap.java)

      If the error is not IOException, it is simply ignored. Errors converting chunks using DFU fall into the ignored category here.

      The exception should be logged as long as it's not ThreadDeath. ThreadDeath should be re-thrown, however that's impossible when using CompletableFuture.

            Unassigned Unassigned
            Spottedleaf Spottedleaf
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              CHK: