Cooking fails when nativizing some UMG widgets

When I try to package my project with nativization set to Inclusive it fails with the following call stack in my output log

UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: begin: stack for UAT
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: === Critical error: ===
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: 
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: Fatal error!
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: 
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000002d
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: 
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: ucrtbase.dll!0x0000000021DC015C
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: ucrtbase.dll!0x0000000021DACFD2
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: ucrtbase.dll!0x0000000021DAC853
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: UE4Editor-Core.dll!FString::Printf__VA() [d:\build\++ue4+release-4.16+compile\sync\engine\source\runtime\core\private\containers\string.cpp:1181]
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: UE4Editor-BlueprintCompilerCppBackend.dll!FString::Printf<wchar_t const * __ptr64,wchar_t const * __ptr64,wchar_t const * __ptr64,wchar_t const * __ptr64,wchar_t const * __ptr64>() [d:\build\++ue4+release-4.16+compile\sync\engine\source\runtime\core\public\containers\unrealstring.h:1366]
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: UE4Editor-BlueprintCompilerCppBackend.dll!FBackendHelperUMG::EmitWidgetInitializationFunctions() [d:\build\++ue4+release-4.16+compile\sync\engine\source\developer\blueprintcompilercppbackend\private\blueprintcompilercppbackendumg.cpp:97]
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: UE4Editor-BlueprintCompilerCppBackend.dll!FEmitDefaultValueHelper::GenerateCustomDynamicClassInitialization() [d:\build\++ue4+release-4.16+compile\sync\engine\source\developer\blueprintcompilercppbackend\private\blueprintcompilercppbackendvaluehelper.cpp:1622]
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: UE4Editor-BlueprintCompilerCppBackend.dll!FBlueprintCompilerCppBackendBase::GenerateCodeFromClass() [d:\build\++ue4+release-4.16+compile\sync\engine\source\developer\blueprintcompilercppbackend\private\blueprintcompilercppbackendbase.cpp:427]
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: UE4Editor-KismetCompiler.dll!FKismetCompilerContext::CompileFunctions() [d:\build\++ue4+release-4.16+compile\sync\engine\source\editor\kismetcompiler\private\kismetcompiler.cpp:4047]
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: UE4Editor-UMGEditor.dll!FUMGEditorModule::Compile() [d:\build\++ue4+release-4.16+compile\sync\engine\source\editor\umgeditor\private\umgeditormodule.cpp:160]
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: UE4Editor-KismetCompiler.dll!FKismet2CompilerModule::CompileBlueprintInner() [d:\build\++ue4+release-4.16+compile\sync\engine\source\editor\kismetcompiler\private\kismetcompilermodule.cpp:119]
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: UE4Editor-KismetCompiler.dll!FKismet2CompilerModule::CompileBlueprint() [d:\build\++ue4+release-4.16+compile\sync\engine\source\editor\kismetcompiler\private\kismetcompilermodule.cpp:247]
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: UE4Editor-BlueprintNativeCodeGen.dll!FBlueprintNativeCodeGenUtils::GenerateCppCode() [d:\build\++ue4+release-4.16+compile\sync\engine\source\developer\blueprintnativecodegen\private\blueprintnativecodegenutils.cpp:384]
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: UE4Editor-BlueprintNativeCodeGen.dll!FBlueprintNativeCodeGenModule::GenerateSingleAsset() [d:\build\++ue4+release-4.16+compile\sync\engine\source\developer\blueprintnativecodegen\private\blueprintnativecodegenmodule.cpp:462]
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: UE4Editor-BlueprintNativeCodeGen.dll!FBlueprintNativeCodeGenModule::GenerateFullyConvertedClasses() [d:\build\++ue4+release-4.16+compile\sync\engine\source\developer\blueprintnativecodegen\private\blueprintnativecodegenmodule.cpp:364]
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: UE4Editor-UnrealEd.dll!UCookOnTheFlyServer::CookByTheBookFinished() [d:\build\++ue4+release-4.16+compile\sync\engine\source\editor\unrealed\private\cookontheflyserver.cpp:6206]
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: UE4Editor-UnrealEd.dll!UCookOnTheFlyServer::TickCookOnTheSide() [d:\build\++ue4+release-4.16+compile\sync\engine\source\editor\unrealed\private\cookontheflyserver.cpp:2192]
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: UE4Editor-UnrealEd.dll!UCookCommandlet::CookByTheBook() [d:\build\++ue4+release-4.16+compile\sync\engine\source\editor\unrealed\private\commandlets\cookcommandlet.cpp:926]
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: UE4Editor-UnrealEd.dll!UCookCommandlet::Main() [d:\build\++ue4+release-4.16+compile\sync\engine\source\editor\unrealed\private\commandlets\cookcommandlet.cpp:589]
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: UE4Editor-Cmd.exe!FEngineLoop::PreInit() [d:\build\++ue4+release-4.16+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:2070]
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: UE4Editor-Cmd.exe!GuardedMain() [d:\build\++ue4+release-4.16+compile\sync\engine\source\runtime\launch\private\launch.cpp:127]
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: UE4Editor-Cmd.exe!GuardedMainWrapper() [d:\build\++ue4+release-4.16+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:134]
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: UE4Editor-Cmd.exe!WinMain() [d:\build\++ue4+release-4.16+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:210]
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: UE4Editor-Cmd.exe!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:264]
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: KERNEL32.DLL!0x0000000022AC8364
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: ntdll.dll!0x00000000253F70D1
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: ntdll.dll!0x00000000253F70D1
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: 
UATHelper: Packaging (Windows (32-bit)): Cook: LogWindows:Error: end: stack for UAT

Making a guess (based on the fact that “UMGEditor.dll” shows up in there) I excluded all my widget blueprints and that did allow the project to package. I’m not entirely sure which widgets in my project are causing this but I was able to find one (excluding just that one did not fix it). I tried removing everything from that widget (nodes, everything in the designer) and it still failed packaging but doesn’t fail if I migrate it to another project and package. Is there anything else I can do to help track down this problem?

Hello ,

I have a couple of questions to help narrow down the issue you are experiencing:

  1. Can you reproduce your issue in a new project?
  2. if so could you provide a detailed list of steps so that I can reproduce your issue on our end?
  3. Could you upload the full cooking log for the build that failed?
  4. For the project where the build failed, did you delete your saved and intermediate folder?

Thanks!

I haven’t been able to repro this in a new project, I tried creating some new UMG widgets and packaging with nativization turned on and it worked fine. The crash doesn’t really say much so it’s hard to know what about my project is causing the problem.

Here is my log from attempting to package this morning. I made sure to delete my saved and intermediate folders beforehand with the same result.

If you’d like I can try to strip down my project as much as possible and isolate the files that are causing problems.

I went ahead and just did it anyway. This is my project with all content and source removed except for one of the UMG widgets that cause this issue. Hopefully that’ll help you track this down.

I have reviewed the log you have sent to me and I have noticed some warnings and errors that may relate your failed build.

Your project throws warnings several times trying to access indexs in JointRotation.

As for errors, you have one error that relates to a widget and is displayed as such:

LogUMG:Warning: Widget Class W_RTSPlayerUI_C Template Error - Fast CreateWidget Warning! This class can not be created using the fast path, because the property Canvas on W_MiniMap_C references MiniMapCanvas_2. Please add the ‘Instanced’ flag to this property…

resolving these errors may allow your package to build.

Fixed those errors in my main project and I still get the same issue. Here’s the log from the project I uploaded after my original log where the files that were causing the errors in the original log don’t even exist.

After reviewing your newest log, I am still seeing a few warnings including:

Warning: Profile (BunchingTest) - Custom Channel Name = ‘GameTraceChannel10’ hasn’t been found

Can’t find file '/Game/FirstPerson/FirstPersonOverview

Resolving these issues, and re-deleting may allow your package to finish building. If your project does not build again, could you upload the new log?

Ok, this log doesn’t have any warnings in it and the only errors are the one I’m reporting and one that occurs before cooking starts (and it’s about not being able to find some directory for mobile devices) so I think it’s safe to ignore that one.

In regards to your most recent log, I have a couple more questions for you.

  1. Have you deleted your saved and intermediate folders and packages each time you try a new package?
  2. What system are you packaging for?
  3. What nativization method are you using?

Thanks!

With the update to Preview 2 this error has stopped happening but I’ll answer your questions anyway in case this crops up again.

  1. Not every time but I had for the most recent log (#3)
  2. Windows 32-bit
  3. Inclusive

I am still unable to reproduce your issue. To investigate your issue further I would like to see your project directly. You can message me privately on the forums here:

I actually attached a project that contained one of my widgets that was causing the issue up above in my second reply. However, as I said it’s no longer happening in Preview 2 so I guess something in the update fixed my issue.

Hello, I also face this issue, but mine is a little different. After I face the issue in my project, I can’t do nativization even in a new blank project. It’s like something triggers something, and BlueprintCompilerCppBackend module is unloaded while cooking.