Description

[Link Removed]

Licensee is using the chunk downloader. On Shutdown method of their GameInstance, they call FChunkDownloader->Finalize. When they quit the game (Alt+F4) during a chunck download an assertion is hit in FPakPrecacher::Unmount : "Pak cannot be unmounted with outstanding requests". //UE4/Release-4.27/Engine/Source/Runtime/PakFile/Private/IPlatformFilePak.cpp#1 line 2982.

There is no negative consequence of case being reached during shutdown other than the check statement. If the case is reached earlier (e.g. they try to unmount it because the user canceled the request), there will be a small memory leak - the PakPrecacher will keep the Pak in its list of monitored paks forever.

For now the licensee could just change the check to a UE_LOG(LogPakFile, Error).

For a proper fix, we should change the PakPrecacher to remove the Pak file later once the last outstanding result is fulfilled.

Steps to Reproduce

In a runtime game, mount an optional pak file.
Send 10000 read requests from the pak file, enough to keep it busy for a while.
Unmount the pak file.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-147659 in the post.

0
Login to Vote

Unresolved
ComponentUE - Foundation
Affects Versions4.27
Target Fix4.27
CreatedMar 31, 2022
UpdatedJul 31, 2024
View Jira Issue