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

Resource pack update by a hash doesn't work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.20.3 Pre-Release 1
    • 1.14.4, 1.15 Pre-release 3, 1.15 Pre-release 4, 1.15 Pre-release 5, 1.15, 1.15.1 Pre-release 1, 20w18a, 1.16 Pre-release 8, 1.16.4, 1.16.5, 1.17, 1.19, 1.19.2, 1.19.4, 23w44a
    • None
    • Community Consensus
    • Resource Packs
    • Low
    • Platform

      The bug

      When specifying a resource pack URL and checksum / hash in the server.properties and the client detects that the checksum does not match for an existing resource pack, it fails deleting it, because the file is already being used by another process.

      [20:58:22] [Client thread/WARN]: File \.minecraft\server-resource-packs\d31664486132157cf0f82534f1d1c66f75411418 had wrong hash (expected 6a0fc6c57023a7a47d9abc463090dcd28f3fa7aa, found 1b88a157a6edaa6d332a6fe65baa2fd73895ac9a).
      [20:58:22] [Client thread/WARN]: Pack application failed: Hash check failure for file \.minecraft\server-resource-packs\d31664486132157cf0f82534f1d1c66f75411418, see log, deleting file \.minecraft\server-resource-packs\d31664486132157cf0f82534f1d1c66f75411418
      [20:58:22] [Client thread/WARN]: Failed to delete file \.minecraft\server-resource-packs\d31664486132157cf0f82534f1d1c66f75411418: \.minecraft\server-resource-packs\d31664486132157cf0f82534f1d1c66f75411418: Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird.
      

      Code analysis

      In the method clientPackSource.clearServerPack() only the reference to the UnopenedResourcePack is removed, but the pack is not closed before.

            Unassigned Unassigned
            Foorcee Foorcee
            Votes:
            55 Vote for this issue
            Watchers:
            22 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: