Description

Selecting an Actor with a Camera and a C++ inherited Blueprint Component that has sub-components,then compiling the BP component leads to a crash.

Upon Debugging the Crash Call Stack:

FindViewComponentForActor, all components of the actor get examined for a camera component. Every component gets accessed with a pointer. It is assumed that "GetComponents" returns only valid components. However, when the crash occurs, an additional, invalid nullptr component exists in the list of components. This nullptr component gets accessed too, therefore the engine crashes.

Steps to Reproduce

Project has been attached for easier repro steps.

  1. Download Attached Project CompileTest.zip[Image Removed]
  2. Open Project->Navigate to ThirdPersonCpp Folder-> Select the Actor Component Blueprint "BP_MyActorComp1"
  3. Compile & Save the Blueprint
  4. Inside of Editor World Viewport Window, Select ThirdPersonCharacter/TestCrashCharacter

Result: Unhandled Exception: Please see Call Stack Below.

Expected: No Unhandled Exception Crash.

Callstack
Unhandled exception

UE4Editor_UnrealEd!FLevelEditorViewportClient::FindViewComponentForActor() [d:\ue4 monteue4main\engine\source\editor\unrealed\private\leveleditorviewport.cpp:3389]
UE4Editor_UnrealEd!FLevelEditorViewportClient::FindViewComponentForActor() [d:\ue4 monteue4main\engine\source\editor\unrealed\private\leveleditorviewport.cpp:3373]
UE4Editor_UnrealEd!FLevelEditorViewportClient::GetCameraComponentForView() [d:\ue4 monteue4main\engine\source\editor\unrealed\public\leveleditorviewport.h:470]
UE4Editor_UnrealEd!FLevelEditorViewportClient::GetViewportType() [d:\ue4 monteue4main\engine\source\editor\unrealed\private\leveleditorviewport.cpp:1784]
UE4Editor_UnrealEd!FEditorViewportClient::IsPerspective() [d:\ue4 monteue4main\engine\source\editor\unrealed\private\editorviewportclient.cpp:1513]
UE4Editor_UnrealEd!UEditorEngine::Tick() [d:\ue4 monteue4main\engine\source\editor\unrealed\private\editorengine.cpp:1328]
UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [d:\ue4 monteue4main\engine\source\editor\unrealed\private\unrealedengine.cpp:403]
UE4Editor_Win64_DebugGame!FEngineLoop::Tick() [d:\ue4 monteue4main\engine\source\runtime\launch\private\launchengineloop.cpp:4213]
UE4Editor_Win64_DebugGame!GuardedMain() [d:\ue4 monteue4main\engine\source\runtime\launch\private\launch.cpp:173]
UE4Editor_Win64_DebugGame!GuardedMainWrapper() [d:\ue4 monteue4main\engine\source\runtime\launch\private\windows\launchwindows.cpp:147]
UE4Editor_Win64_DebugGame!WinMain() [d:\ue4 monteue4main\engine\source\runtime\launch\private\windows\launchwindows.cpp:277]
UE4Editor_Win64_DebugGame!__scrt_common_main_seh() [d:\agent\_work\2\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
kernel32
ntdll

Have Comments or More Details?

There's no existing public thread on this issue, so head over toAnswerHub just mention UE-74765 in the post.

0
Login to Vote

Fixed
ComponentGameplay
Affects Versions4.214.224.23
Target Fix4.22.2
Fix Commit6546428
Main Commit6546429
CreatedMay 17, 2019
ResolvedMay 17, 2019
UpdatedJun 5, 2019