This is a regression.
This does not affect UE5.
Creating a function with parameter type TEnumAsByte<MyEnum> will crash while compiling. In 4.26 and UE5 the code compiles without issue, and the user is able to access the enum.
#include "Containers/EnumAsByte.h"
UENUM() enum Button { N UMETA(DisplayName = "N"), E UMETA(DisplayName = "E"), S UMETA(DisplayName = "S"), W UMETA(DisplayName = "W"), };
public: UFUNCTION(BlueprintPure) uint8 ReturnTwo(TEnumAsByte<Button> SelectedButton);
5. Open MyDataAsset.cpp if it isn't already (Soulution Explorer: Source/<ProjectName>/Private)
6. In MyDataAsset.cpp below the '#include' add:
uint8 UMyDataAsset::ReturnTwo(TEnumAsByte<Button> SelectedButton) { return 2; }
7. Press Ctrl+Shift+S to save all
8. Back in the Editor Press Compile in the Toolbar
Expected Results:
The code compiles and the user is able to reference the Enum in blueprints by search MyDataAsset with Context Sensitive disabled.
Actual Results:
Editor Crashes while compiling, and will crash on launch.
Windows GetLastError: The operation completed successfully. (0) Error: === Critical error: === Error: Error: Assertion failed: !GeneratedWrappedTypes.Contains(TypeRegistryName) [File:D:/Build/++UE4/Sync/Engine/Plugins/Experimental/PythonScriptPlugin/Source/PythonScriptPlugin/Private/PyWrapperTypeRegistry.cpp] [Line: 1780] Error: Error: Error: Error: [Callstack] 0x00007fff1c69a839 KERNELBASE.dll!UnknownFunction [] Error: [Callstack] 0x00007ffec2f60216 UE4Editor-Core.dll!ReportAssert() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsPlatformCrashContext.cpp:1644] Error: [Callstack] 0x00007ffec2f64218 UE4Editor-Core.dll!FWindowsErrorOutputDevice::Serialize() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsErrorOutputDevice.cpp:78] Error: [Callstack] 0x00007ffec2c8242d UE4Editor-Core.dll!FOutputDevice::LogfImpl() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Misc\OutputDevice.cpp:61] Error: [Callstack] 0x00007ffec2bd6a45 UE4Editor-Core.dll!AssertFailedImplV() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Misc\AssertionMacros.cpp:104] Error: [Callstack] 0x00007ffec2bd80a0 UE4Editor-Core.dll!FDebug::CheckVerifyFailedImpl() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Misc\AssertionMacros.cpp:461] Error: [Callstack] 0x00007ffe75ab07db UE4Editor-PythonScriptPlugin.dll!FPyWrapperTypeRegistry::GenerateWrappedEnumType() [D:\Build\++UE4\Sync\Engine\Plugins\Experimental\PythonScriptPlugin\Source\PythonScriptPlugin\Private\PyWrapperTypeRegistry.cpp:1780] Error: [Callstack] 0x00007ffe75ab458d UE4Editor-PythonScriptPlugin.dll!FPyWrapperTypeRegistry::GenerateWrappedTypesForReferences() [D:\Build\++UE4\Sync\Engine\Plugins\Experimental\PythonScriptPlugin\Source\PythonScriptPlugin\Private\PyWrapperTypeRegistry.cpp:544] Error: [Callstack] 0x00007ffe75ab3ac3 UE4Editor-PythonScriptPlugin.dll!FPyWrapperTypeRegistry::GenerateWrappedTypesForModule() [D:\Build\++UE4\Sync\Engine\Plugins\Experimental\PythonScriptPlugin\Source\PythonScriptPlugin\Private\PyWrapperTypeRegistry.cpp:493] Error: [Callstack] 0x00007ffe75a2f787 UE4Editor-PythonScriptPlugin.dll!FPythonScriptPlugin::OnModulesChanged() [D:\Build\++UE4\Sync\Engine\Plugins\Experimental\PythonScriptPlugin\Source\PythonScriptPlugin\Private\PythonScriptPlugin.cpp:1344] Error: [Callstack] 0x00007ffe75a11b5c UE4Editor-PythonScriptPlugin.dll!TBaseRawMethodDelegateInstance<0,FPythonScriptPlugin,void __cdecl(FName,enum EModuleChangeReason),FDefaultDelegateUserPolicy>::ExecuteIfSafe() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:469] Error: [Callstack] 0x00007ffec2cc1af8 UE4Editor-Core.dll!TMulticastDelegate<void __cdecl(FName,enum EModuleChangeReason),FDefaultDelegateUserPolicy>::Broadcast() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateSignatureImpl.inl:955] Error: [Callstack] 0x00007ffec2ce1665 UE4Editor-Core.dll!FModuleManager::LoadModuleWithFailureReason() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Modules\ModuleManager.cpp:547] Error: [Callstack] 0x00007fff05176433 UE4Editor-Projects.dll!FModuleDescriptor::LoadModulesForPhase() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Projects\Private\ModuleDescriptor.cpp:643] Error: [Callstack] 0x00007fff0517674f UE4Editor-Projects.dll!FProjectManager::LoadModulesForProject() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Projects\Private\ProjectManager.cpp:62] Error: [Callstack] 0x00007ff625455642 UE4Editor.exe!FEngineLoop::LoadStartupModules() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:3880] Error: [Callstack] 0x00007ff625459000 UE4Editor.exe!FEngineLoop::PreInitPostStartupScreen() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:3263] Error: [Callstack] 0x00007ff625450d2c UE4Editor.exe!GuardedMain() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Launch\Private\Launch.cpp:132] Error: [Callstack] 0x00007ff6254510ba UE4Editor.exe!GuardedMainWrapper() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:137] Error: [Callstack] 0x00007ff6254540dd UE4Editor.exe!LaunchWindowsStartup() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:273] Error: [Callstack] 0x00007ff625465984 UE4Editor.exe!WinMain() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:320] Error: [Callstack] 0x00007ff62546853a UE4Editor.exe!__scrt_common_main_seh() [d:\agent\_work\5\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288] Error: [Callstack] 0x00007fff1cc77bd4 KERNEL32.DLL!UnknownFunction [] Error: [Callstack] 0x00007fff1e8cced1 ntdll.dll!UnknownFunction [] Error: Executing StaticShutdownAfterError
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-138934 in the post.
0 |
Component | UE - Editor - Workflow Systems |
---|---|
Affects Versions | 4.27 |
Target Fix | 5.0 |
Created | Jan 11, 2022 |
---|---|
Resolved | Jan 19, 2022 |
Updated | Jan 22, 2024 |