Mojira Archive
MC-164316

Resource pack update by a hash doesn't work

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.

Fixed

Foorcee

2019-10-22, 10:09 PM

2023-12-29, 12:41 PM

2023-11-20, 05:16 PM

55

22

Community Consensus

Low

Platform

Resource Packs

1.14.4 - 23w44a1.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

1.20.3 Pre-Release 1