Project falls when I'm trying to create an AI Blackboard

Hello, I want to create a Blackboard for AI through the code, but when I select the parent class BlackboardData, compilation starts after which the project falls. I compiled through the VS2013, but the project still does not start.

To repeat an error, you need to create a blank project and “Add code to project->BlackboardData”.

I tried it in 4.7 also falls.

My file Build.cs

PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "AIModule" });

Not sure that this is a bug, but thanks anyway!

Crash report data:

    MachineId:508819504AD7D802427B558374AD8077
    EpicAccountId:50063f7e990142f3b7002428d42f707d
    
    Unknown exception - code 00000001 (first/second chance not available)
    
    "Assertion failed: !DelegateInstanceInterface->IsSameFunction(*InDelegateInstance) [File:d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\public\delegate
    
    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_AIModule!TBaseMulticastDelegate<void,UBlackboardData * __ptr64>::AddDelegateInstance() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\public\delegates\delegatesignatureimpl_variadics.inl:997]
    UE4Editor_AIModule!TBaseMulticastDelegate<void,UBlackboardData * __ptr64>::AddStatic<>() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\public\delegates\delegatesignatureimpl_variadics.inl:599]
    UE4Editor_AIModule!UBlackboardData::UBlackboardData() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\aimodule\private\behaviortree\blackboarddata.cpp:28]
    UE4Editor_AIProj_4907
    UE4Editor_CoreUObject!UClass::CreateDefaultObject() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\class.cpp:2587]
    UE4Editor_CoreUObject!UObjectLoadAllCompiledInDefaultProperties() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:706]
    UE4Editor_CoreUObject!ProcessNewlyLoadedUObjects() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:797]
    UE4Editor_CoreUObject!TBaseStaticDelegateInstance<void __cdecl(void)>::ExecuteIfSafe() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\public\delegates\delegateinstancesimpl_variadics.inl:921]
    UE4Editor_Core!TBaseMulticastDelegate<void>::Broadcast() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\public\delegates\delegatesignatureimpl_variadics.inl:1031]
    UE4Editor_Core!FModuleManager::LoadModuleWithFailureReason() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\modules\modulemanager.cpp:431]
    UE4Editor_Projects!FModuleDescriptor::LoadModulesForPhase() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\projects\private\moduledescriptor.cpp:370]
    UE4Editor_Projects!FProjectManager::LoadModulesForProject() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\projects\private\projectmanager.cpp:52]
    UE4Editor!FEngineLoop::LoadStartupModules() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\launchengineloop.cpp:1922]
    UE4Editor!FEngineLoop::PreInit() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\launchengineloop.cpp:1444]
    UE4Editor!GuardedMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\launch.cpp:110]
    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]

I think I know what’s going on. I’ve file this as UE-17016 for investigation and fixing.

However, UBlackboardData was never meant to be derived from. Why do you want to do that? UBlackboardData is an asset, which you should be able to create and populate procedurally, but you shouldn’t need to derive from its class, unless you’re planning to implement a bunch of extra BT nodes that would take advantage of any extra info you might want to put in your custom class.

Cheers,

–mieszko

Thanks for the answer! I have long wanted to ask you, сreating and using a Bihavior Tree and Blackboards from code and not from code is very different performance? Does it make sense to do all in code?

I don’t think there’s any significant gain in doing any of these in code.