Hello everyone,
I have an Unreal Engine plugin that has functionality for the editor as well as functionality for game runtime, in my plugins StartupModule() function, I am encapsulating code that essentially writes to a config .ini file and adds a new tool menu button for the unreal editor.
This is wrapped in #if WITH_EDITOR
When packaging my project, the build commands succeeds but the cook commands fails with this error:
UATHelper: Packaging (Windows): LogOutputDevice: Warning:
UATHelper: Packaging (Windows): Script Stack (0 frames) :
UATHelper: Packaging (Windows): LogWindows: Error: appError called: Assertion failed: IsValid() [File:E:\UE5\UE_5.1_Source\UnrealEngine-release\Engine\Source\Runtime\Core\Public\Templates\SharedPointer.h] [Line: 1071]
UATHelper: Packaging (Windows): LogWindows: Error: begin: stack for UAT
UATHelper: Packaging (Windows): LogWindows: Error: === Critical error: ===
UATHelper: Packaging (Windows): LogWindows: Error:
UATHelper: Packaging (Windows): LogWindows: Error: Assertion failed: IsValid() [File:E:\UE5\UE_5.1_Source\UnrealEngine-release\Engine\Source\Runtime\Core\Public\Templates\SharedPointer.h] [Line: 1071]
UATHelper: Packaging (Windows): LogWindows: Error:
UATHelper: Packaging (Windows): LogWindows: Error:
UATHelper: Packaging (Windows): LogWindows: Error:
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ff9f3703f89 UnrealEditor-Slate.dll!FSlateApplication::Get() [E:\UE5\UE_5.1_Source\UnrealEngine-release\Engine\Source\Runtime\Slate\Public\Framework\Application\SlateApplication.h:256]
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ff9f3766a49 UnrealEditor-Slate.dll!FUIAction::FUIAction() [E:\UE5\UE_5.1_Source\UnrealEngine-release\Engine\Source\Runtime\Slate\Private\Framework\Commands\UIAction.cpp:18]
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ff9c65d1312 UnrealEditor-BCClientPlugin.dll!FBCClientPlugin::StartupModule() [E:\UnrealProjects\MyProject\Plugins\MyPlugin\Source\MyPlugin\Private\MyPlugin.cpp:57]
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ff9f48dec71 UnrealEditor-Core.dll!FModuleManager::LoadModuleWithFailureReason() [E:\UE5\UE_5.1_Source\UnrealEngine-release\Engine\Source\Runtime\Core\Private\Modules\ModuleManager.cpp:617]
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ff9f443d394 UnrealEditor-Projects.dll!FModuleDescriptor::LoadModulesForPhase() [E:\UE5\UE_5.1_Source\UnrealEngine-release\Engine\Source\Runtime\Projects\Private\ModuleDescriptor.cpp:696]
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ff9f44539b4 UnrealEditor-Projects.dll!FPluginManager::TryLoadModulesForPlugin() [E:\UE5\UE_5.1_Source\UnrealEngine-release\Engine\Source\Runtime\Projects\Private\PluginManager.cpp:2078]
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ff9f443d0bf UnrealEditor-Projects.dll!FPluginManager::LoadModulesForEnabledPlugins() [E:\UE5\UE_5.1_Source\UnrealEngine-release\Engine\Source\Runtime\Projects\Private\PluginManager.cpp:2154]
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ff6016f7ae0 UnrealEditor-Cmd.exe!FEngineLoop::LoadStartupModules() [E:\UE5\UE_5.1_Source\UnrealEngine-release\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:4181]
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ff6016fada5 UnrealEditor-Cmd.exe!FEngineLoop::PreInitPostStartupScreen() [E:\UE5\UE_5.1_Source\UnrealEngine-release\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:3523]
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ff6016f32e8 UnrealEditor-Cmd.exe!GuardedMain() [E:\UE5\UE_5.1_Source\UnrealEngine-release\Engine\Source\Runtime\Launch\Private\Launch.cpp:154]
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ff6016f35ca UnrealEditor-Cmd.exe!GuardedMainWrapper() [E:\UE5\UE_5.1_Source\UnrealEngine-release\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:107]
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ff6016f6350 UnrealEditor-Cmd.exe!LaunchWindowsStartup() [E:\UE5\UE_5.1_Source\UnrealEngine-release\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:244]
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ff601707d54 UnrealEditor-Cmd.exe!WinMain() [E:\UE5\UE_5.1_Source\UnrealEngine-release\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:282]
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ff60170a2da UnrealEditor-Cmd.exe!__scrt_common_main_seh() [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ffa742a7344 KERNEL32.DLL!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ffa74fa26b1 ntdll.dll!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error:
UATHelper: Packaging (Windows): LogWindows: Error: end: stack for UAT
The line referenced in MyPlugin.cpp:55
is this:
NewSection.AddMenuEntry(
FName("My widget"),
FText::FromString("My widget"),
FText::FromString("Open my utility widget"),
FSlateIcon(),
FUIAction(
FExecuteAction::CreateRaw(this, &FMyPlugin::MenuCommand)
),
EUserInterfaceActionType::Button,
FName("My Utilities"));
There is a reference to a MenuCommand
function, its’ contents are also wrapped in #if WITH_EDITOR
like so:
void MenuCommand()
{
#if WITH_EDITOR
//my code
#endif
}
All of this code is wrapped in #if WITH_EDITOR
- I even tried #if WITH_EDITOR && WITH_EDITORONLY_DATA
, didn’t fix it.
I also tried cleaning my saved and intermediate folders, that didn’t fix it either.
I also checked Exclude editor content when cooking in project settings, didn’t fix it.
But for some reason the cooking process is still picking this up, why?