Description

Crash is caused by incorrect cast to display ActorComponent in viewport (gizmo used to move it should not be present)

Steps to Reproduce

1. Create a C++ first person template project.
2. Press PIE from the default example map.
3. Eject from Pawn, and move the viewport camera, so that the Player Character Pawn Model and cube geometry is within view.
4. Select a piece of geometry in the map. (Cube meshes)
5. Select the First Person Pawn->Select Character Movement Component
6. Move the Transform Gizmo of the Character Movement Component in the viewport editor.

Result: Crash: See Call Stack for Full

Fatal error: [File:D:/UE4 MonteUE4Main/Engine/Source/Runtime/CoreUObject/Private/Templates/Casts.cpp] [Line: 10] 
Cast of CharacterMovementComponent /Game/FirstPersonCPP/Maps/UEDPIE_0_FirstPersonExampleMap.FirstPersonExampleMap:PersistentLevel.FirstPersonCharacter_C_0.CharMoveComp to SceneComponent failed

Expected: No Crash.

Callstack
[Inline Frame] UE4Editor-CoreUObject.dll!CastLogError::__l11::<lambda_85a69443e79372a632c30a14da020d5f>::operator()() Line 10
	at d:\ue4 monteue4main\engine\source\runtime\coreuobject\private\templates\casts.cpp(10)
UE4Editor-CoreUObject.dll!CastLogError(const wchar_t * FromType, const wchar_t * ToType) Line 10
	at d:\ue4 monteue4main\engine\source\runtime\coreuobject\private\templates\casts.cpp(10)
[Inline Frame] UE4Editor-UnrealEd.dll!CastChecked(UObject *) Line 219
	at d:\ue4 monteue4main\engine\source\runtime\coreuobject\public\templates\casts.h(219)
UE4Editor-UnrealEd.dll!FLevelEditorViewportClient::TrackingStopped() Line 2991
	at d:\ue4 monteue4main\engine\source\editor\unrealed\private\leveleditorviewport.cpp(2991)
UE4Editor-UnrealEd.dll!FMouseDeltaTracker::EndTracking(FEditorViewportClient * InViewportClient) Line 306
	at d:\ue4 monteue4main\engine\source\editor\unrealed\private\mousedeltatracker.cpp(306)
UE4Editor-UnrealEd.dll!FEditorViewportClient::StopTracking() Line 2766
	at d:\ue4 monteue4main\engine\source\editor\unrealed\private\editorviewportclient.cpp(2766)
UE4Editor-UnrealEd.dll!FEditorViewportClient::InputKey(FViewport * InViewport, int ControllerId, FKey Key, EInputEvent Event, float __formal, bool __formal) Line 2701
	at d:\ue4 monteue4main\engine\source\editor\unrealed\private\editorviewportclient.cpp(2701)
UE4Editor-UnrealEd.dll!FLevelEditorViewportClient::InputKey(FViewport * InViewport, int ControllerId, FKey Key, EInputEvent Event, float AmountDepressed, bool bGamepad) Line 2694
	at d:\ue4 monteue4main\engine\source\editor\unrealed\private\leveleditorviewport.cpp(2694)
UE4Editor-LevelEditor.dll!FViewportClient::InputKey(const FInputKeyEventArgs & EventArgs) Line 789
	at d:\ue4 monteue4main\engine\source\runtime\engine\public\unrealclient.h(789)
UE4Editor-Engine.dll!FSceneViewport::OnMouseButtonUp(const FGeometry & InGeometry, const FPointerEvent & InMouseEvent) Line 568
	at d:\ue4 monteue4main\engine\source\runtime\engine\private\slate\sceneviewport.cpp(568)
UE4Editor-Slate.dll!SViewport::OnMouseButtonUp(const FGeometry & MyGeometry, const FPointerEvent & MouseEvent) Line 213
	at d:\ue4 monteue4main\engine\source\runtime\slate\private\widgets\sviewport.cpp(213)
[Inline Frame] UE4Editor-Slate.dll!FSlateApplication::RoutePointerUpEvent::__l8::<lambda_6c1f6b862bcfb82ea6dcab28fbcc9463>::operator()(const FArrangedWidget &) Line 5647
	at d:\ue4 monteue4main\engine\source\runtime\slate\private\framework\application\slateapplication.cpp(5647)
UE4Editor-Slate.dll!FEventRouter::Route<FReply,FEventRouter::FToLeafmostPolicy,FPointerEvent,<lambda_6c1f6b862bcfb82ea6dcab28fbcc9463> >(FSlateApplication * ThisApplication, FEventRouter::FToLeafmostPolicy RoutingPolicy, FPointerEvent EventCopy, const FSlateApplication::RoutePointerUpEvent::__l8::<lambda_6c1f6b862bcfb82ea6dcab28fbcc9463> & Lambda) Line 273
	at d:\ue4 monteue4main\engine\source\runtime\slate\private\framework\application\slateapplication.cpp(273)
UE4Editor-Slate.dll!FSlateApplication::RoutePointerUpEvent(const FWidgetPath & WidgetsUnderPointer, const FPointerEvent & PointerEvent) Line 5633
	at d:\ue4 monteue4main\engine\source\runtime\slate\private\framework\application\slateapplication.cpp(5633)
UE4Editor-Slate.dll!FSlateApplication::ProcessMouseButtonUpEvent(const FPointerEvent & MouseEvent) Line 6238
	at d:\ue4 monteue4main\engine\source\runtime\slate\private\framework\application\slateapplication.cpp(6238)
UE4Editor-Slate.dll!FSlateApplication::OnMouseUp(const EMouseButtons::Type Button, const FVector2D CursorPos) Line 6211
	at d:\ue4 monteue4main\engine\source\runtime\slate\private\framework\application\slateapplication.cpp(6211)
UE4Editor-ApplicationCore.dll!FWindowsApplication::ProcessDeferredMessage(const FDeferredWindowsMessage & DeferredMessage) Line 1880
	at d:\ue4 monteue4main\engine\source\runtime\applicationcore\private\windows\windowsapplication.cpp(1880)
UE4Editor-ApplicationCore.dll!FWindowsApplication::DeferMessage(TSharedPtr<FWindowsWindow,0> & NativeWindow, HWND__ * InHWnd, unsigned int InMessage, unsigned __int64 InWParam, __int64 InLParam, int MouseX, int MouseY, unsigned int RawInputFlags) Line 2332
	at d:\ue4 monteue4main\engine\source\runtime\applicationcore\private\windows\windowsapplication.cpp(2332)
UE4Editor-ApplicationCore.dll!FWindowsApplication::ProcessMessage(HWND__ * hwnd, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 1560
	at d:\ue4 monteue4main\engine\source\runtime\applicationcore\private\windows\windowsapplication.cpp(1560)
UE4Editor-ApplicationCore.dll!FWindowsApplication::AppWndProc(HWND__ * hwnd, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 790
	at d:\ue4 monteue4main\engine\source\runtime\applicationcore\private\windows\windowsapplication.cpp(790)
[External Code]
[Inline Frame] UE4Editor-ApplicationCore.dll!WinPumpMessages() Line 108
	at d:\ue4 monteue4main\engine\source\runtime\applicationcore\private\windows\windowsplatformapplicationmisc.cpp(108)
UE4Editor-ApplicationCore.dll!FWindowsPlatformApplicationMisc::PumpMessages(bool bFromMainLoop) Line 123
	at d:\ue4 monteue4main\engine\source\runtime\applicationcore\private\windows\windowsplatformapplicationmisc.cpp(123)
UE4Editor.exe!FEngineLoop::Tick() Line 4173
	at d:\ue4 monteue4main\engine\source\runtime\launch\private\launchengineloop.cpp(4173)
[Inline Frame] UE4Editor.exe!EngineTick() Line 62
	at d:\ue4 monteue4main\engine\source\runtime\launch\private\launch.cpp(62)
UE4Editor.exe!GuardedMain(const wchar_t * CmdLine, HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, int nCmdShow) Line 173
	at d:\ue4 monteue4main\engine\source\runtime\launch\private\launch.cpp(173)
UE4Editor.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow) Line 265
	at d:\ue4 monteue4main\engine\source\runtime\launch\private\windows\launchwindows.cpp(265)
[External Code]

Have Comments or More Details?

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

4
Login to Vote

Fixed
ComponentTools
Affects Versions4.214.224.23
Target Fix4.24
Fix Commit7659051
Main Commit8614014
CreatedJul 23, 2019
ResolvedJul 30, 2019
UpdatedSep 19, 2019