Custom component crashes cooking

Hello,

Today I added a custom component to my character. It inherits from UStaticMeshComponent and serves as a template so that other classes can inherit and specialize it. Everything works fine in the editor but I wanted to try it on mobile. I’ve got the following error during packaging or if I try to cook contents for Windows.

Unknown exception - code 00000001 (first/second chance not available)

"Assertion failed: 0 [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.8\Engine\Source\Runtime\Engine\Private\LightMap.cpp] [Line: 1838] 
"

KERNELBASE
UE4Editor_Core!FOutputDeviceWindowsError::Serialize() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\windows\windowsplatformoutputdevices.cpp:95]
UE4Editor_Core!FOutputDevice::Logf__VA() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\misc\outputdevice.cpp:144]
UE4Editor_Core!FDebug::AssertFailed() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\misc\outputdevice.cpp:355]
UE4Editor_Engine!operator<<() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\engine\private\lightmap.cpp:1838]
UE4Editor_Engine!operator<<() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\engine\private\components\staticmeshcomponent.cpp:1967]
UE4Editor_Engine!operator<<() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\public\containers\array.h:1201]
UE4Editor_Engine!UStaticMeshComponent::Serialize() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\engine\private\components\staticmeshcomponent.cpp:286]
UE4Editor_CoreUObject!FLinkerLoad::Preload() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3051]
UE4Editor_CoreUObject!EndLoad() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1216]
UE4Editor_CoreUObject!LoadPackageInternal() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1006]
UE4Editor_UnrealEd!UCookOnTheFlyServer::TickCookOnTheSide() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\unrealed\private\cookontheflyserver.cpp:1163]
UE4Editor_UnrealEd!UCookOnTheFlyServer::Tick() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\unrealed\private\cookontheflyserver.cpp:446]
UE4Editor_UnrealEd!FTickableEditorObject::TickObjects() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\unrealed\public\tickableeditorobject.h:15]
UE4Editor_UnrealEd!UEditorEngine::Tick() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\unrealed\private\editorengine.cpp:1111]
UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\editor\unrealed\private\unrealedengine.cpp:366]
UE4Editor!FEngineLoop::Tick() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\launchengineloop.cpp:2359]
UE4Editor!GuardedMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\launch.cpp:142]
UE4Editor!GuardedMainWrapper() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]

If I remove my component from the project I can launch and cook fine so I the error comes from there. However I have no idea what I’m doing wrong because everything works fine in editor and I have no errors/warnings during compilation. I’m attaching the files.

link text

Hi Swiftle,

We had a very unpleasant crash that was affecting users’ packaged projects that was fixed for the 4.8.1 update, and the call stack you posted looks similar. Can you update to the latest and try your project again and see if it has been fixed?

Please make a copy of your project before doing so just to be safe, and feel free to delete the intermediate and saved folders from your project just to make sure there’s no lingering issues with that asset.

Thanks!

Hello,

I’m already using 4.8.1 unfortunately.

EDIT: Also, is there something wrong with my custom component? I initially tried the same setup on another project and it worked fine but inside my main project it causes problems and I have no idea why. I also removed all the folders except for content and source. Tried cooking again and got the same error.

Hi Swiftle,

I saw you were receiving assistance re: the custom component in this other thread. As that has been resolved are you still seeing a problem in your packaging?

Hello,

It looks like 4.8.2 fixed the problem. I just tried it yesterday and I was able to package my app for android and successfully launched it on Android.