Description

No user comments in crash group

 2143       		// We should always be the one creating an instance in this case.
 2144       		check(bCreateInstance);
 2145       
 2146       		// Dummy object that's instanced for any editor-only subobject dependencies.
 2147 ***** 		const FString ActualClass = Context.FindGloballyMappedObject(ObjectClass, UClass::StaticClass());
 2148       		const FString NativeType = FEmitHelper::GetCppName(Context.GetFirstNativeOrConvertedClass(ObjectClass));
 2149       		if(!ObjectClass->IsNative())
 2150       		{
 2151       			// make sure CDO has been created for NativeType:
 2152       			Context.AddLine(FString::Printf(TEXT("%s::StaticClass()->GetDefaultObject();"), *NativeType));
 2153       		}
 2154       		Context.AddLine(FString::Printf(
 2155       			TEXT("auto %s = NewObject<%s>(%s, %s, TEXT(\"%s\"));")
 2156       			, *LocalNativeName
 2157       			, *NativeType
 2158       			, *OuterStr
 2159       			, *ActualClass
 2160       			, *Object->GetName().ReplaceCharWithEscapedChar()));
 2161       	}
Steps to Reproduce
  1. Launch the editor with a new, blank C++ project.
  2. Create a new C++ class based on ActorComponent (MyActorComponent).
  3. Wait for compilation/reload to finish, then add to the 'public' section of the UMyActorComponent class in MyActorComponent.h as follows:
    UPROPERTY()
    class USceneComponent* NestedEditorOnlyScene;
    
  4. Also add to the end of UMyActorComponent() constructor in MyActorComponent.cpp as follows:
    NestedEditorOnlyScene = CreateEditorOnlyDefaultSubobject<USceneComponent>(TEXT("MyNestedEditorOnlyScene"));
    
  5. Compile code changes in Visual C++, then either wait for hot reload to finish or close/relaunch the editor to pick them up.
  6. After relaunching the editor with code changes, create a new Actor-based Blueprint class (MyBlueprint).
  7. Double-click the new Blueprint class to edit it, then add a new 'My Actor' component. Compile, save and close the Blueprint editor.
  8. Drag an instance of the new Blueprint class into the current scene and save it (NewMap).
  9. Choose Edit->Project Settings... and under "Maps & Modes" change the game/startup maps to 'NewMap'.
  10. Under "Packaging" change the Blueprint Nativization Method to "Inclusive."
  11. Choose File->Package Project->Windows->Win64, choose a location and wait for packaging to finish.
  12. Note that cooking will fail with the given callstack.
Callstack
Assertion failed: bCreateInstance [File:D:\Build\++UE4+Release-4.19+Compile\Sync\Engine\Source\Developer\BlueprintCompilerCppBackend\Private\BlueprintCompilerCppBackendValueHelper.cpp] [Line: 2145]

UE4Editor_BlueprintCompilerCppBackend!FEmitDefaultValueHelper::HandleInstancedSubobject() [blueprintcompilercppbackendvaluehelper.cpp:2148]
UE4Editor_BlueprintCompilerCppBackend!FDefaultSubobjectData::EmitPropertyInitialization() [blueprintcompilercppbackendvaluehelper.cpp:828]
UE4Editor_BlueprintCompilerCppBackend!FEmitDefaultValueHelper::GenerateConstructor() [blueprintcompilercppbackendvaluehelper.cpp:1877]
UE4Editor_BlueprintCompilerCppBackend!FBlueprintCompilerCppBackendBase::GenerateCodeFromClass() [blueprintcompilercppbackendbase.cpp:445]
UE4Editor_KismetCompiler!FKismetCompilerContext::CompileFunctions() [kismetcompiler.cpp:4092]
UE4Editor_KismetCompiler!FKismet2CompilerModule::CompileBlueprintInner() [kismetcompilermodule.cpp:133]
UE4Editor_KismetCompiler!FKismet2CompilerModule::CompileBlueprint() [kismetcompilermodule.cpp:235]
UE4Editor_BlueprintNativeCodeGen!FBlueprintNativeCodeGenUtils::GenerateCppCode() [blueprintnativecodegenutils.cpp:456]
UE4Editor_BlueprintNativeCodeGen!FBlueprintNativeCodeGenModule::GenerateSingleAsset() [blueprintnativecodegenmodule.cpp:496]
UE4Editor_BlueprintNativeCodeGen!FBlueprintNativeCodeGenModule::GenerateFullyConvertedClasses() [blueprintnativecodegenmodule.cpp:398]
UE4Editor_UnrealEd!UCookOnTheFlyServer::CookByTheBookFinished() [cookontheflyserver.cpp:5440]
UE4Editor_UnrealEd!UCookOnTheFlyServer::TickCookOnTheSide() [cookontheflyserver.cpp:1829]
UE4Editor_UnrealEd!UCookCommandlet::CookByTheBook() [cookcommandlet.cpp:904]
UE4Editor_UnrealEd!UCookCommandlet::Main() [cookcommandlet.cpp:584]
UE4Editor_Cmd!FEngineLoop::PreInit() [launchengineloop.cpp:2195]
UE4Editor_Cmd!GuardedMain() [launch.cpp:127]
UE4Editor_Cmd!GuardedMainWrapper() [launchwindows.cpp:134]
UE4Editor_Cmd!WinMain() [launchwindows.cpp:210]
UE4Editor_Cmd!__scrt_common_main_seh() [exe_common.inl:253]
kernel32!BaseThreadInitThunk()
ntdll!RtlUserThreadStart()

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-56316 in the post.

1
Login to Vote

Fixed
ComponentUE - Gameplay - Blueprint Compiler
Affects Versions4.19
Target Fix4.19.1
Fix Commit3962782
CreatedMar 20, 2018
ResolvedMar 23, 2018
UpdatedApr 27, 2018