Hi,
I’m using FCoreDelegates::OnMountPak and FCoreDelegates::OnUnmountPak function to handle my patch/DLC pak file. But in ue 4.15, when i execute the FCoreDelegates::OnUnmountPak.Execute( ) to unmount the pak file. It will encounter an assertion failed. Follow are the call stack of the android platform:
07-19 18:59:32.516: D/UE4(16133): Assertion failed: PakPrecacherSingleton [File:C:\UnrealEngine-4.15\Engine\Source\Runtime\PakFile\Private\IPlatformFilePak.cpp] [Line: 1006]
07-19 18:59:32.516: D/UE4(16133): libUE4.so!FDebug::LogAssertFailedMessage(char const*, char const*, int, wchar_t const*, ...)
07-19 18:59:32.516: D/UE4(16133): libUE4.so!FPakPlatformFile::Unmount(wchar_t const*)
07-19 18:59:32.516: D/UE4(16133): libUE4.so!UPatchingSystem::UnmountOutOfDatePaks(TArray<FString, FDefaultAllocator>&)
07-19 18:59:32.516: D/UE4(16133): libUE4.so!UPatchingSystem::Synchronize(TArray<FObjectSyncInfo, FDefaultAllocator> const&)
07-19 18:59:32.516: D/UE4(16133): libUE4.so!void ZResponseProcessor::Process<(unsigned char)140, FAwsS3SyncMessageObject>(FAwsS3SyncMessageObject const&, bool)
07-19 18:59:32.516: D/UE4(16133): libUE4.so!void UMMOGameplayHttp::DispatchResponse<FAwsS3SyncMessageObject>(unsigned char, FAwsS3SyncMessageObject const&, bool)
07-19 18:59:32.516: D/UE4(16133): libUE4.so!void UMMOGameplayHttp::Response<FAwsS3SyncMessageObject>(TSharedPtr<IHttpRequest, (ESPMode)0>, TSharedPtr<IHttpResponse, (ESPMode)1>, bool)
07-19 18:59:32.516: D/UE4(16133): libUE4.so!decltype ((((*this).Obj)->*((*this).MemFunPtr))((Forward<TSharedPtr<IHttpRequest, (ESPMode)0>&>)({parm#1}), (Forward<TSharedPtr<IHttpResponse, (ESPMode)1>&>)({parm#1}), (Forward<bool&>)({parm#1}))) TMemberFunctionCaller<UMMOGameplayHttp, void (UMMOGameplayHttp::*)(TSharedPtr<IHttpRequest, (ESPMode)0>, TSharedPtr<IHttpResponse, (ESPMode)1>, bool)>::operator()<TSharedPtr<IHttpRequest, (ESPMode)0>&, TSharedPtr<IHttpResponse, (ESPMode)1>&, bool&>(TSharedPtr<IHttpRequest, (ESPMode)0>&, TSharedPtr<IHttpResponse, (ESPMode)1>&, bool&)
07-19 18:59:32.516: D/UE4(16133): libUE4.so!decltype ({parm#1}((Forward<TSharedPtr<IHttpRequest, (ESPMode)0>&>)({parm#2}), (Forward<TSharedPtr<IHttpResponse, (ESPMode)1>&>)({parm#2}), (Forward<bool&>)({parm#2}))) TTupleImpl<TIntegerSequence<unsigned int>>::ApplyAfter<TMemberFunctionCaller<UMMOGameplayHttp, void (UMMOGameplayHttp::*)(TSharedPtr<IHttpRequest, (ESPMode)0>, TSharedPtr<IHttpResponse, (ESPMode)1>, bool)>, TSharedPtr<IHttpRequest, (ESPMode)0>&, TSharedPtr<IHttpResponse, (ESPMode)1>&, bool&>(TMemberFunctionCaller<UMMOGameplayHttp, void (UMMOGameplayHttp::*)(TSharedPtr<IHttpRequest, (ESPMode)0>, TSharedPtr<IHttpResponse, (ESPMode)1>, bool)>&&, TSharedPtr<IHttpRequest, (ESPMode)0>&, TSharedPtr<IHttpResponse, (ESPMode)1>&, bool&) const
07-19 18:59:32.516: D/UE4(16133): libUE4.so!TBaseUObjectMethodDelegateInstance<false, UMMOGameplayHttp, TTypeWrapper<void> (TSharedPtr<IHttpRequest, (ESPMode)0>, TSharedPtr<IHttpResponse, (ESPMode)1>, bool)>::Execute(TSharedPtr<IHttpRequest, (ESPMode)0>, TSharedPtr<IHttpResponse, (ESPMode)1>, bool) const
07-19 18:59:32.516: D/UE4(16133): libUE4.so!TBaseUObjectMethodDelegateInstance<false, UMMOGameplayHttp, void (TSharedPtr<IHttpRequest, (ESPMode)0>, TSharedPtr<IHttpResponse, (ESPMode)1>, bool)>::ExecuteIfSafe(TSharedPtr<IHttpRequest, (ESPMode)0>, TSharedPtr<IHttpResponse, (ESPMode)1>, bool) const
07-19 18:59:32.516: D/UE4(16133): libUE4.so!TBaseDelegate<void, TSharedPtr<IHttpRequest, (ESPMode)0>, TSharedPtr<IHttpResponse, (ESPMode)1>, bool>::ExecuteIfBound(TSharedPtr<IHttpRequest, (ESPMode)0>, TSharedPtr<IHttpResponse, (ESPMode)1>, bool) const
07-19 18:59:32.516: D/UE4(16133): libUE4.so!FCurlHttpRequest::FinishedRequest()
07-19 18:59:32.516: D/UE4(16133): libUE4.so!FHttpManager::Tick(float)
07-19 18:59:32.516: D/UE4(16133): libUE4.so!FTicker::Tick(float)
07-19 18:59:32.516: D/UE4(16133): libUE4.so!FEngineLoop::Tick()
07-19 18:59:32.516: D/UE4(16133): libUE4.so!AndroidMain(android_app*)
07-19 18:59:32.516: D/UE4(16133): libUE4.so!android_main()
07-19 18:59:32.516: D/UE4(16133): libUE4.so![Unknown]()
07-19 18:59:32.516: D/UE4(16133): libc.so![Unknown]()
07-19 18:59:32.516: D/UE4(16133): libc.so![Unknown]()
07-19 18:59:32.516: D/UE4(16133): [2017.07.19-10.59.32:534][ 0]Assertion failed: Assertion failed: PakPrecacherSingleton [File:C:\UnrealEngine-4.15\Engine\Source\Runtime\PakFile\Private\IPlatformFilePak.cpp] [Line: 1006]
07-19 18:59:32.526: D/UE4(16133): [2017.07.19-10.59.32:543][ 0]LogWindows: FAndroidMisc::RequestExit(1)
I found the assertion is cause by PakPrecacherSingleton (in file IPlatformFilePak.cpp) equal to NULL.
And I also found:
#define USE_PAK_PRECACHE (!IS_PROGRAM && !WITH_EDITOR) // you can turn this off to use the async IO stuff without the precache
at line 50 (also in IPlatformFilePak.cpp) seems can be disable to skip the precache.
But I really don’t want to modify the source code of the engine. Is there any way to resolve this issue? Thanks.
Here is the code how I use FCoreDelegates::OnUnmountPak
PS: DebugGame and Shipping has the same issue.