20tab / UnrealEnginePython

Embed Python in Unreal Engine 4
MIT License
2.74k stars 743 forks source link

Problem cooking with custom subclass of ProceduralMeshComponent #681

Open boristsr opened 5 years ago

boristsr commented 5 years ago

I am having problems when cooking. The project is very barebones. Things work as expected in the editor, however when cooking I get this error:

UATHelper: Cooking (Windows):   LogWindows: Error: Fatal error: [File:D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\Serialization\AsyncLoading.cpp] [Line: 734]
UATHelper: Cooking (Windows):   LogWindows: Error: Attempt to process /Script/ProceduralMeshComponent/Default__CustomProceduralMeshComponent before it has been added.

Full error log:

UATHelper: Cooking (Windows): ********** COOK COMMAND STARTED **********
UATHelper: Cooking (Windows): Running UE4Editor Cook for project C:\p4\RainbowImporters\MyProject.uproject
UATHelper: Cooking (Windows): Commandlet log file is C:\Program Files\Epic Games\UE_4.21\Engine\Programs\AutomationTool\Saved\Cook-2019.02.24-23.36.38.txt
UATHelper: Cooking (Windows): Running: C:\Program Files\Epic Games\UE_4.21\Engine\Binaries\Win64\UE4Editor-Cmd.exe C:\p4\RainbowImporters\MyProject.uproject -run=Cook  -TargetPlatform=WindowsNoEditor -fileopenlog -unversioned -iterate -iterateshash -abslog="C:\Program Files\Epic Games\UE_4.21\Engine\Programs\AutomationTool\Saved\Cook-2019.02.24-23.36.38.txt"
 -stdout -CrashForUAT -unattended -NoLogTimes  -UTF8Output
UATHelper: Cooking (Windows):   LogConsoleResponse: Display: Failed to find resolution value strings in scalability ini. Falling back to default.
UATHelper: Cooking (Windows):   LogInit: Display: Running engine for game: MyProject
UATHelper: Cooking (Windows):   LogStreaming: Display: Took  0.075s to configure plugins.
UATHelper: Cooking (Windows):   LogStreaming: Display: Took  0.003s to delete old logs.
UATHelper: Cooking (Windows):   LogHAL: Display: Platform has ~ 32 GB [34212397056 / 34359738368 / 32], which maps to Largest [LargestMinGB=32, LargerMinGB=12, DefaultMinGB=8, SmallerMinGB=6, SmallestMinGB=0)
UATHelper: Cooking (Windows):   LogStreaming: Display: Took  0.338s to InitEngineTextLocalization.
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP AllDesktopTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP MacClientTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP MacNoEditorTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP MacServerTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP MacTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP WindowsClientTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP WindowsNoEditorTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP WindowsServerTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP WindowsTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP AndroidTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP AndroidTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP AndroidTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP AndroidTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP AndroidTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP AndroidTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP AndroidTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP AndroidTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP AndroidTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP AndroidTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP AndroidTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP AndroidTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP AndroidTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP AndroidTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP AndroidTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP AndroidTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP AndroidTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP AndroidTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP HTML5TargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP IOSTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP IOSTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP TVOSTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP TVOSTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP LinuxClientTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP LinuxNoEditorTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP LinuxServerTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP LinuxTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP LuminTargetPlatform
UATHelper: Cooking (Windows):   LogTemp: Display: Loaded TP LuminTargetPlatform
UATHelper: Cooking (Windows):   LogTargetPlatformManager: Display: Building Assets For WindowsNoEditor
UATHelper: Cooking (Windows):   LogShaderCompilers: Display: Using Local Shader Compiler.
UATHelper: Cooking (Windows):   LogDerivedDataCache: Display: Max Cache Size: 512 MB
UATHelper: Cooking (Windows):   LogDerivedDataCache: Display: Loaded Boot cache: C:/Users/philipedwards/AppData/Local/UnrealEngine/4.21/DerivedDataCache/Boot.ddc
UATHelper: Cooking (Windows):   LogDerivedDataCache: Display: Pak cache opened for reading ../../../Engine/DerivedDataCache/Compressed.ddp.
UATHelper: Cooking (Windows):   LogPython: Warning: CustomProceduralMeshComponent
UATHelper: Cooking (Windows):   LogPython: Warning: (<unreal_engine.UObject object at 0x0000022201283BA0>,)
UATHelper: Cooking (Windows):   LogPython: Warning: {'__module__': 'UnrealImporters.ImportSOB', '__qualname__': 'CustomProceduralMeshComponent', '__doc__': 'A ProceduralMeshComponent with the ability to convert RenderableArray geometry', '__init__': <function CustomProceduralMeshComponent.__init__ at 0x0000022201496598>, 'ReceiveBeginPlay': <function CustomP
roceduralMeshComponent.ReceiveBeginPlay at 0x0000022201529598>, 'import_renderable': <function CustomProceduralMeshComponent.import_renderable at 0x000002220153A1E0>}
PackagingResults: Warning: CustomProceduralMeshComponent
PackagingResults: Warning: (<unreal_engine.UObject object at 0x0000022201283BA0>,)
PackagingResults: Warning: {'__module__': 'UnrealImporters.ImportSOB', '__qualname__': 'CustomProceduralMeshComponent', '__doc__': 'A ProceduralMeshComponent with the ability to convert RenderableArray geometry', '__init__': <function CustomProceduralMeshComponent.__init__ at 0x0000022201496598>, 'ReceiveBeginPlay': <function CustomProceduralMeshComponent.Re
ceiveBeginPlay at 0x0000022201529598>, 'import_renderable': <function CustomProceduralMeshComponent.import_renderable at 0x000002220153A1E0>}
UATHelper: Cooking (Windows):   LogWindows: Error: begin: stack for UAT
UATHelper: Cooking (Windows):   LogWindows: Error: === Critical error: ===
UATHelper: Cooking (Windows):   LogWindows: Error:
UATHelper: Cooking (Windows):   LogWindows: Error: Fatal error: [File:D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\Serialization\AsyncLoading.cpp] [Line: 734]
UATHelper: Cooking (Windows):   LogWindows: Error: Attempt to process /Script/ProceduralMeshComponent/Default__CustomProceduralMeshComponent before it has been added.
UATHelper: Cooking (Windows):   LogWindows: Error:
UATHelper: Cooking (Windows):   LogWindows: Error:
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fffab195549 KERNELBASE.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff30dfcd1a UE4Editor-Core.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff30bda967 UE4Editor-Core.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff30b10df7 UE4Editor-Core.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff30331061 UE4Editor-CoreUObject.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff30330cbd UE4Editor-CoreUObject.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff30398890 UE4Editor-CoreUObject.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff3028eb82 UE4Editor-CoreUObject.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05b565ef UE4Editor-UnrealEnginePython.dll!unreal_engine_new_uclass() [c:\p4\rainbowimporters\plugins\unrealenginepython\source\unrealenginepython\private\uepymodule.cpp:1610]
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05b5742d UE4Editor-UnrealEnginePython.dll!unreal_engine_py_init() [c:\p4\rainbowimporters\plugins\unrealenginepython\source\unrealenginepython\private\uepysubclassing.cpp:36]
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05780437 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff0576fb0b python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff0576f49e python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05787e0a python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05788737 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05788d71 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05771390 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05753dc0 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05753c85 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff0576fe22 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff0576d4c2 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05789a42 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05771390 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff057886a2 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff057891d3 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff057884e7 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05788d29 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff057884e7 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05788d71 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff057884e7 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05788d71 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05770f3d python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05779b1f python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff057799e5 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff057929aa python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff057797d8 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05747e4d python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff0576d551 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff0576d3f5 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05789a42 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05771390 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff057886a2 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05788d71 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05771390 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff0577101a python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05779b1f python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff057799e5 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05779833 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05779d0d python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05789fee python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05771390 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05753dc0 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05753c85 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff0576fe22 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff0576d4c2 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05789a42 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05771390 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff057886a2 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff057891d3 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff057884e7 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05788d29 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff057884e7 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05788d71 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff057884e7 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05788d71 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05770f3d python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05779b1f python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff057799e5 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff057929aa python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff057797d8 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05747e4d python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff0576fe3d python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff0576fbba python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff057688be python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05753fff python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05753b30 python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05753a2f python37.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff05b5ece5 UE4Editor-UnrealEnginePython.dll!FUnrealEnginePythonModule::StartupModule() [c:\p4\rainbowimporters\plugins\unrealenginepython\source\unrealenginepython\private\unrealenginepython.cpp:499]
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff30bd9eda UE4Editor-Core.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff7133cfec UE4Editor-Projects.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff71351b64 UE4Editor-Projects.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fff7133cd64 UE4Editor-Projects.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007ff6a6d083ba UE4Editor-Cmd.exe!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007ff6a6d0dc6b UE4Editor-Cmd.exe!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007ff6a6d05783 UE4Editor-Cmd.exe!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007ff6a6d059ea UE4Editor-Cmd.exe!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007ff6a6d148da UE4Editor-Cmd.exe!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007ff6a6d1584e UE4Editor-Cmd.exe!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fffacb181f4 KERNEL32.DLL!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007fffae4ea251 ntdll.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error:
UATHelper: Cooking (Windows):   LogWindows: Error: end: stack for UAT
PackagingResults: Error: begin: stack for UAT
PackagingResults: Error: === Critical error: ===
PackagingResults: Error: Fatal error: [File:D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\Serialization\AsyncLoading.cpp] [Line: 734]
PackagingResults: Error: Attempt to process /Script/ProceduralMeshComponent/Default__CustomProceduralMeshComponent before it has been added.
PackagingResults: Error: [Callstack] 0x00007fffab195549 KERNELBASE.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff30dfcd1a UE4Editor-Core.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff30bda967 UE4Editor-Core.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff30b10df7 UE4Editor-Core.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff30331061 UE4Editor-CoreUObject.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff30330cbd UE4Editor-CoreUObject.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff30398890 UE4Editor-CoreUObject.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff3028eb82 UE4Editor-CoreUObject.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05b565ef UE4Editor-UnrealEnginePython.dll!unreal_engine_new_uclass() [c:\p4\rainbowimporters\plugins\unrealenginepython\source\unrealenginepython\private\uepymodule.cpp:1610]
PackagingResults: Error: [Callstack] 0x00007fff05b5742d UE4Editor-UnrealEnginePython.dll!unreal_engine_py_init() [c:\p4\rainbowimporters\plugins\unrealenginepython\source\unrealenginepython\private\uepysubclassing.cpp:36]
PackagingResults: Error: [Callstack] 0x00007fff05780437 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff0576fb0b python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff0576f49e python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05787e0a python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05788737 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05788d71 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05771390 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05753dc0 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05753c85 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff0576fe22 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff0576d4c2 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05789a42 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05771390 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff057886a2 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff057891d3 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff057884e7 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05788d29 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff057884e7 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05788d71 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff057884e7 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05788d71 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05770f3d python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05779b1f python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff057799e5 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff057929aa python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff057797d8 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05747e4d python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff0576d551 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff0576d3f5 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05789a42 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05771390 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff057886a2 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05788d71 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05771390 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff0577101a python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05779b1f python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff057799e5 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05779833 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05779d0d python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05789fee python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05771390 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05753dc0 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05753c85 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff0576fe22 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff0576d4c2 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05789a42 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05771390 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff057886a2 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff057891d3 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff057884e7 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05788d29 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff057884e7 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05788d71 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff057884e7 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05788d71 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05770f3d python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05779b1f python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff057799e5 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff057929aa python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff057797d8 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05747e4d python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff0576fe3d python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff0576fbba python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff057688be python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05753fff python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05753b30 python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05753a2f python37.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff05b5ece5 UE4Editor-UnrealEnginePython.dll!FUnrealEnginePythonModule::StartupModule() [c:\p4\rainbowimporters\plugins\unrealenginepython\source\unrealenginepython\private\unrealenginepython.cpp:499]
PackagingResults: Error: [Callstack] 0x00007fff30bd9eda UE4Editor-Core.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff7133cfec UE4Editor-Projects.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff71351b64 UE4Editor-Projects.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fff7133cd64 UE4Editor-Projects.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ff6a6d083ba UE4Editor-Cmd.exe!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ff6a6d0dc6b UE4Editor-Cmd.exe!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ff6a6d05783 UE4Editor-Cmd.exe!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ff6a6d059ea UE4Editor-Cmd.exe!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ff6a6d148da UE4Editor-Cmd.exe!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ff6a6d1584e UE4Editor-Cmd.exe!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fffacb181f4 KERNEL32.DLL!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007fffae4ea251 ntdll.dll!UnknownFunction []
LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMultiByProfile.End
LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMultiForObjects.End
LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceSingle.End
LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceSingleByProfile.End
LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceSingleForObjects.End
LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:CapsuleTraceMulti.End
LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:CapsuleTraceMultiByProfile.End
LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:CapsuleTraceMultiForObjects.End
LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:CapsuleTraceSingle.End
LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:CapsuleTraceSingleByProfile.End
LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:CapsuleTraceSingleForObjects.End
LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:DrawDebugCylinder.End
LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:LineTraceMulti.End
LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:LineTraceMultiByProfile.End
LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:LineTraceMultiForObjects.End
LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:LineTraceSingle.End
LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:LineTraceSingleByProfile.End
LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:LineTraceSingleForObjects.End
LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:SphereTraceMulti.End
LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:SphereTraceMultiByProfile.End
LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:SphereTraceMultiForObjects.End
LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:SphereTraceSingle.End
LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:SphereTraceSingleByProfile.End
LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.KismetSystemLibrary:SphereTraceSingleForObjects.End
LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or BoolProperty /Script/Landscape.LandscapeSplineConnection:End
LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/Engine.BatchedLine:End
LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/AIModule.NavLocalGridManager:FindLocalNavigationGridPath.End
LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/FunctionalTesting.FunctionalTestUtilityLibrary:TraceChannelTestUtil.End
LogUObjectHash: Warning: Ambiguous search, could be StructProperty /Script/Engine.KismetSystemLibrary:BoxTraceMulti.End or StructProperty /Script/MeshEditor.OverlayLine:End
PackagingResults: Error: end: stack for UAT
UATHelper: Cooking (Windows): Took 12.0008848s to run UE4Editor-Cmd.exe, ExitCode=3
UATHelper: Cooking (Windows): ERROR: Cook failed.
UATHelper: Cooking (Windows):        (see C:\Users\philipedwards\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.21\Log.txt for full exception trace)
UATHelper: Cooking (Windows): AutomationTool exiting with ExitCode=25 (Error_UnknownCookFailure)
UATHelper: Cooking (Windows): BUILD FAILED
PackagingResults: Error: Cook failed.

The code for CustomProceduralMeshComponent looks like this:

from unreal_engine.classes import ProceduralMeshComponent

class CustomProceduralMeshComponent(ProceduralMeshComponent):
    """A ProceduralMeshComponent with the ability to convert RenderableArray geometry"""
    def __init__(self):
        self.CurrentMeshSectionIndex = 0

    def ReceiveBeginPlay(self):
        """Called when the actor is beginning play, or the world is beginning play"""
        self.CurrentMeshSectionIndex = 0

    def import_renderable(self, renderable, materials):
        """Adds the specified renderable as a mesh section to this procedural mesh component"""
        vertexArray = []
        #Repack vertices into array of FVectors, and invert X coordinate
        for vertex in renderable.vertices:
            tempVertex = FVector(vertex[0], vertex[1], vertex[2])
            #tempVertex = tempVertex - FVector(32611.490234, 31651.273438, 32911.394531)
            tempVertex = KismetMathLibrary.RotateAngleAxis(tempVertex, 90.0, FVector(1.0, 0.0, 0.0))
            vertexArray.append(tempVertex)

        normalArray = []
        for normal in renderable.normals:
            tempVertex = FVector(normal[0], normal[1], normal[2])
            tempVertex = KismetMathLibrary.RotateAngleAxis(tempVertex, 90.0, FVector(1.0, 0.0, 0.0))
            normalArray.append(tempVertex)

        uvArray = []
        for UV in renderable.UVs:
            uvArray.append(FVector2D(UV[0], UV[1]))

        colorArray = []
        for color in renderable.vertexColors:
            newColor = []
            for element in color:
                newColor.append(int(element * 255))
            colorArray.append(FColor(newColor[0], newColor[1], newColor[2]))

        indexArray = []
        #Repack face vertex indices into flat array
        for face in renderable.triangleIndices:
            indexArray.append(face[2])
            indexArray.append(face[1])
            indexArray.append(face[0])

        self.CreateMeshSection(self.CurrentMeshSectionIndex, vertexArray, indexArray, normalArray, UV0=uvArray, VertexColors=colorArray, bCreateCollision=True)

        if renderable.materialIndex != R6Constants.UINT_MAX:
            self.SetMaterial(self.CurrentMeshSectionIndex, materials[renderable.materialIndex])

        self.CurrentMeshSectionIndex += 1

I've tried filling out my ue_site.py to no avail. Currently it looks like this:

"""This module should import and initialize all modules required by unreal"""

from PIL import Image
from unreal_engine.classes import ProceduralMeshComponent
from UnrealImporters import ImportSOB

Any help would be much appreciated. Thanks.

boristsr commented 5 years ago

I've been unable to solve this issue. It seems to be with any class that using the Subclassing API. Any blueprint or C++ class used as a parent to a python class causes this cooking error for me.

I have worked around it by refactoring my code so that I have implemented the CustomProceduralMesh in C++, and the actors that then showed similar problems I've changed to using the PyActor method.

dfb commented 5 years ago

We ran into something similar in our project. Below are a few things to try - they are not official fixes, are kinda hacky, and may not work for you, but might be worth a shot (they worked for us).

(1) There's a chance that the problem is specific to cooking and won't happen once your project is fully packaged, and depending on how you're using Python in your project, there might not really be a need for your Python classes to be invoked during cooking. So one option is to simply not import your classes during cooking.

In our project, for example, we have our build script set an environment variable like 'BUILD_IS_UNDERWAY=1' and then our ue_site.py has something like:

import os
if os.environ.get('BUILD_IS_UNDERWAY') == '1': # note that it's a string not an int here
    pass # do nothing, since the build is underway (maybe log a message so you know what's happening)
else:
    # otherwise, proceed with importing your classes

(2) If the above gets you through cooking, but the problem still happens when you run the packaged game, it might be that simply delaying your import a little longer will do the trick. Continuing in ue_site.py you could do something like:

def FinishInit():
    pass # this is where you import your py classes

import os
if os.environ.get('BUILD_IS_UNDERWAY') == '1': # note that it's a string not an int here
    pass # or log a message
else:
    def CallFinishInit(*args):
        ue.create_and_dispatch_when_ready(FinishInit)
    import threading
    t = threading.Thread(target=CallFinishInit)
    t.daemon = True
    t.start()

The above asks the engine to call FinishInit once it is more ready (the background thread is to work around some problem where I think it detects we're already on the game thread, so it refuses to wait - so we introduce a thread just so the call happens from another thread, and that is enough to make it wait to call our code back).

If this works, then one modification you'll want to make is to make it so that you do the thread-based call to FinishInit only if you are running a packaged build. If you are running in the editor, then you really want to just call FinishInit() right away instead of starting a thread. So if the above works, lemme know and I can help you with that.

(3) There's a good chance that one of the above options will work. If neither work, however, then a more invasive workaround is to temporarily override the engine global variable GIsInitialLoad while creating your class default object. This requires modifying UnrealEnginePython, so I won't go into details unless you need them, but basically you change things so that when creating the CDO for any Python classes, you save the current value of GIsInitialLoad, set it to false, call Super::CreateDefaultObject(), and then restore GIsInitialLoad to its saved value. This feels gross and hacky... but it worked for us. :)

Maybe one of the project devs will chime in with better advice too!

sutongkui commented 4 years ago
from unreal_engine.classes import ProceduralMeshComponent, KismetProceduralMeshLibrary

but it shows NameError: name 'UKismetProceduralMeshLibrary' is not defined, seems that unreal_engine.classes doesn't have KismetProceduralMeshLibrary, how can I use this class?

boristsr commented 4 years ago

On the main readme.md check out the section called Referencing Objects, it has a sample like below which might work for you.

texture_class = ue.find_class('Texture2D')
a_specific_texture = ue.load_object(texture_class, '/Game/Textures/logo2')