Description

An actor with an AbilitySystemComponent that is spawned by a ChildActorComponent will have a null AbilityActorInfo. This leads to a crash in the ASC when GetDebugTarget attempts to access AbilityActorInfo.  

Steps to Reproduce
  • Create a new actor Blueprint and add an Ability system component to it. (B_Child)
  • Create a new actor Blueprint and add a ChildActorComponent to it. (B_Parent)
  • Set Cooking->IsEditorOnly to true and set the child actor class to B_Child in B_Parent's ChildActorComponent defaults
  • Place an instance of B_Parent in the level and PIE
  • Type `showdebug abilitysystem` in the console command while in PIE to trigger a crash.
Callstack
 [Inline Frame] UnrealEditor-GameplayAbilities.dll!TSharedPtr<FGameplayAbilityActorInfo,1>::operator->() Line 1074	C++
>	UnrealEditor-GameplayAbilities.dll!GetDebugTarget(FASCDebugTargetInfo * Info) Line 2021	C++
 	UnrealEditor-GameplayAbilities.dll!UAbilitySystemComponent::OnShowDebugInfo(AHUD * HUD, UCanvas * Canvas, const FDebugDisplayInfo & DisplayInfo, float & YL, float & YPos) Line 2118	C++
 	[Inline Frame] UnrealEditor-GameplayAbilities.dll!Invoke(void(*)(AHUD *, UCanvas *, const FDebugDisplayInfo &, float &, float &) &) Line 47	C++
 	[Inline Frame] UnrealEditor-GameplayAbilities.dll!UE::Core::Private::Tuple::TTupleBase<TIntegerSequence<unsigned int>>::ApplyAfter(void(*)(AHUD *, UCanvas *, const FDebugDisplayInfo &, float &, float &) &) Line 324	C++
 	UnrealEditor-GameplayAbilities.dll!TBaseStaticDelegateInstance<void __cdecl(AHUD *,UCanvas *,FDebugDisplayInfo const &,float &,float &),FDefaultDelegateUserPolicy>::ExecuteIfSafe(AHUD * <Params_0>, UCanvas * <Params_1>, const FDebugDisplayInfo & <Params_2>, float & <Params_3>, float & <Params_4>) Line 732	C++
 	[Inline Frame] UnrealEditor-Engine.dll!TMulticastDelegate<void __cdecl(AHUD *,UCanvas *,FDebugDisplayInfo const &,float &,float &),FDefaultDelegateUserPolicy>::Broadcast(AHUD *) Line 967	C++
 	UnrealEditor-Engine.dll!AHUD::ShowDebugInfo(float & YL, float & YPos) Line 476	C++
 	UnrealEditor-Engine.dll!AHUD::PostRender() Line 170	C++
 	UnrealEditor-Engine.dll!UGameViewportClient::Draw(FViewport * InViewport, FCanvas * SceneCanvas) Line 1805	C++
 	UnrealEditor-Engine.dll!FViewport::Draw(bool bShouldPresent) Line 1610	C++
 	UnrealEditor-UnrealEd.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 1975	C++
 	UnrealEditor-UnrealEd.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 454	C++
 	UnrealEditor.exe!FEngineLoop::Tick() Line 5251	C++
 	[Inline Frame] UnrealEditor.exe!EngineTick() Line 62	C++
 	UnrealEditor.exe!GuardedMain(const wchar_t * CmdLine) Line 183	C++
 	UnrealEditor.exe!LaunchWindowsStartup(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow, const wchar_t * CmdLine) Line 272	C++
 	UnrealEditor.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * pCmdLine, int nCmdShow) Line 330	C++
 

Have Comments or More Details?

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

2
Login to Vote

Fixed
ComponentUE - Gameplay
Affects Versions5.0
Target Fix5.0
Fix Commit18507808
Main Commit18507848
Release Commit18507808
CreatedDec 2, 2021
ResolvedJan 4, 2022
UpdatedJan 26, 2023
View Jira Issue