Image wrapper Module is nullptr in shipping builds


(/home/alkaline) #1

In shipping builds, The Peacenet is unable to save images to the in-game filesystem which causes a crash while Peacegate OS installs its default wallpapers. This is because the Unreal Engine’s Image Wrapper Module is nullptr.

Access violation - code c0000005 (first/second chance not available)

ProjectOglowia_Win64_Shipping!UImageLoader::SaveImage<FColor>() [c:\users\alkaline\documents\peacenet-ue\source\projectoglowia\private\imageloader.cpp:244]
ProjectOglowia_Win64_Shipping!UImageLoader::GetBitmapData() [c:\users\alkaline\documents\peacenet-ue\source\projectoglowia\private\imageloader.cpp:183]
ProjectOglowia_Win64_Shipping!USystemContext::UpdateSystemFiles() [c:\users\alkaline\documents\peacenet-ue\source\projectoglowia\private\usystemcontext.cpp:500]
ProjectOglowia_Win64_Shipping!<lambda_6cc5118a5b065a4dfd3832af5f8903fd>::operator()() [c:\users\alkaline\documents\peacenet-ue\source\projectoglowia\private\peacenetworldstateactor.cpp:421]
ProjectOglowia_Win64_Shipping!TGraphTask<FAsyncGraphTask>::ExecuteTask()
ProjectOglowia_Win64_Shipping!FNamedTaskThread::ProcessTasksUntilIdle()
ProjectOglowia_Win64_Shipping!FFrameEndSync::Sync()
ProjectOglowia_Win64_Shipping!FEngineLoop::Tick()
ProjectOglowia_Win64_Shipping!GuardedMain()
ProjectOglowia_Win64_Shipping!GuardedMainWrapper()
ProjectOglowia_Win64_Shipping!WinMain()
ProjectOglowia_Win64_Shipping!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
kernel32
ntdll

This crash occurs on line 244 of ImageLoader.cpp, the file which contains functionality for loading and saving Unreal UTexture2D objects from/to the in-game filesystem as PNG files.

FImageWriter ImageWriter(ImageWrapperModule.CreateImageWrapper(EImageFormat::PNG));

ImageWrapperModule is defined on line 17 in that same file:

static IImageWrapperModule& ImageWrapperModule = FModuleManager::LoadModuleChecked<IImageWrapperModule>(TEXT("ImageWrapper"));

This indicates that Unreal is unable to find a module of type IImageWrapperModule named "ImageWrapper" in shipping builds.


Game not loading assets in standalone builds
(/home/alkaline) #2

Fixed by way of nukes.