Issue: Creating a C++ Plugin with a brand new class BWActor extending off of AActor crashes whenever I try to drag the actor straight from ‘Place Actors’ box right after loading
However if I drag another actor, such as ‘Empty Actor’ first and then drag BWActor it will not crash.
// Copyright: 2020, Micah Parker & Pocket Sized Animations. All rights reserved
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "BWActor.generated.h"
UCLASS()
class BOLTWORK_API ABWActor : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
ABWActor(const FObjectInitializer& ObjectInitializer);
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
};
#include "BWActor.h"
// Sets default values
ABWActor::ABWActor(const FObjectInitializer& ObjectInitializer)
:Super(ObjectInitializer)
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = false;
}
// Called when the game starts or when spawned
void ABWActor::BeginPlay()
{
Super::BeginPlay();
}
// Called every frame
void ABWActor::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
}
Video Demo:
Log Attached: Yes
Crash Summary:
Unhandled Exception: EXCEPTION_INT_DIVIDE_BY_ZERO
UE4Editor_Engine!FSceneViewport::EnqueueBeginRenderFrame() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Engine\Private\Slate\SceneViewport.cpp:1628]
UE4Editor_Engine!FViewport::GetRawHitProxyData() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Engine\Private\UnrealClient.cpp:1634]
UE4Editor_Engine!FViewport::GetHitProxyMap() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Engine\Private\UnrealClient.cpp:1707]
UE4Editor_Engine!FViewport::GetHitProxy() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Engine\Private\UnrealClient.cpp:1756]
UE4Editor_UnrealEd!FActorPositioning::GetCurrentViewportPlacementTransform() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Editor\UnrealEd\Private\Editor\ActorPositioning.cpp:157]
UE4Editor_UnrealEd!FLevelEditorViewportClient::TryPlacingActorFromObject() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Editor\UnrealEd\Private\LevelEditorViewport.cpp:296]
UE4Editor_UnrealEd!FLevelEditorViewportClient::DropObjectsOnActor() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Editor\UnrealEd\Private\LevelEditorViewport.cpp:1017]
UE4Editor_UnrealEd!FLevelEditorViewportClient::DropObjectsAtCoordinates() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Editor\UnrealEd\Private\LevelEditorViewport.cpp:1451]
UE4Editor_LevelEditor!SLevelViewport::HandlePlaceDraggedObjects() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Editor\LevelEditor\Private\SLevelViewport.cpp:922]
UE4Editor_LevelEditor!SLevelViewport::OnDragEnter() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Editor\LevelEditor\Private\SLevelViewport.cpp:645]
UE4Editor_Slate!FEventRouter::Route<FNoReply,FEventRouter::FBubblePolicy,FDragDropEvent,<lambda_b0fa0764092bb3151c635e579781bdc5> >() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Slate\Private\Framework\Application\SlateApplication.cpp:372]
UE4Editor_Slate!FSlateApplication::RoutePointerMoveEvent() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Slate\Private\Framework\Application\SlateApplication.cpp:4971]
UE4Editor_Slate!FSlateApplication::ProcessMouseMoveEvent() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Slate\Private\Framework\Application\SlateApplication.cpp:5428]
UE4Editor_Slate!FSlateApplication::OnMouseMove() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Slate\Private\Framework\Application\SlateApplication.cpp:5356]
UE4Editor_ApplicationCore!FWindowsApplication::ProcessDeferredMessage() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsApplication.cpp:2171]
UE4Editor_ApplicationCore!FWindowsApplication::DeferMessage() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsApplication.cpp:2585]
UE4Editor_ApplicationCore!FWindowsApplication::ProcessMessage() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsApplication.cpp:1809]
UE4Editor_ApplicationCore!FWindowsApplication::AppWndProc() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsApplication.cpp:852]
user32
user32
UE4Editor_ApplicationCore!FWindowsPlatformApplicationMisc::PumpMessages() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsPlatformApplicationMisc.cpp:130]
UE4Editor!FEngineLoop::Tick() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:4762]
UE4Editor!GuardedMain() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Launch\Private\Launch.cpp:169]
UE4Editor!GuardedMainWrapper() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:137]
UE4Editor!WinMain() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:268]
UE4Editor!__scrt_common_main_seh() [d:\agent\_work\5\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
kernel32
ntdll][1]