Ue4 crash, VTable ptr and FVTableHelper

Hi,
I am newbie in ue4 and several days ago I encounter problem, which I can’t solve. In moments like adding new c++ class, ue4 crashing with “We are currently retrieving VTable ptr. Please use FVTableHelper constructor instead.” message. I heard about class(FVTableHelper& Helper) constructor, but i don’t know how to use it. As far as i search, there is nothing about it in documentation.

There is classes when problem occur:

UCLASS()
class GOLDENEGG_API ANPC : public ACharacter
{
public: 
	GENERATED_UCLASS_BODY()

	UPROPERTY(VisibleDefaultsOnly, BlueprintReadOnly, Category = Item)
		APickupItem * item = NewObject<APickupItem>();

	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Collision)
		USphereComponent* ProxSphere;

	// This is the NPC's name
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = NPCMessage)
		FString NpcName;

	// This is the NPC's message that he has to tell us.
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = NPCMessage)
		FString NpcMessage;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = NPCMessage)
		UTexture2D* Face;

	UFUNCTION(BlueprintNativeEvent, Category = "Collision")
		void Prox(UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult & SweepResult);
	
	void BeginPlay(); 
	void Tick(float);
	void SetupPlayerInputComponent (class UInputComponent*);
};



ANPC::ANPC(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer)
{
	static ConstructorHelpers::FObjectFinder<UTexture2D> Texture(TEXT("/Game/Unreal_Engine_3_logo_and_wordmark3.Unreal_Engine_3_logo_and_wordmark3"));
	item->Icon = Texture.Object;

	ProxSphere = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(this,
		TEXT("Proximity Sphere"));
	ProxSphere->bGenerateOverlapEvents = true;
	ProxSphere->AttachTo(RootComponent);
	ProxSphere->SetSphereRadius(400);

	ProxSphere->OnComponentBeginOverlap.AddDynamic(this, &ANPC::Prox);

	NpcMessage = "Hi";

}

UCLASS()
class GOLDENEGG_API APickupItem : public AActor
{
	GENERATED_UCLASS_BODY()

	virtual void BeginPlay() override;
	virtual void Tick( float DeltaSeconds ) override;
public: 
	// added just for test
	APickupItem(FVTableHelper& Helper)
		: Super(Helper)
	{}

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Item)
	FString Name;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Item)
		int32  Quantity;

	UPROPERTY(VisibleDefaultsOnly, BlueprintReadWrite, Category = Item)
		USphereComponent* ProxSphere;
	
	UPROPERTY(VisibleDefaultsOnly, BlueprintReadWrite, Category = Item)
		UStaticMeshComponent* Mesh;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Item)
		UTexture2D* Icon;

	UFUNCTION(BlueprintNativeEvent, Category = "Collision")
		void Prox(UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult & SweepResult);

};


APickupItem::APickupItem(const FObjectInitializer& ObjectInitializer ) : Super(ObjectInitializer)
{
	Name = "UNKNOWN_ITEM";
	Quantity = 1;

	UE_LOG(LogTemp, Warning, TEXT("APickupItem Contructor"));
	ProxSphere = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(this, TEXT("Prox Sphere"));

	ProxSphere->OnComponentBeginOverlap.AddDynamic(this,
		&APickupItem::Prox);

	Mesh = ObjectInitializer.CreateDefaultSubobject<UStaticMeshComponent>(this,
		TEXT("Mesh"));
	RootComponent = Mesh;

	Mesh->SetSimulatePhysics(true);
	ProxSphere->AttachTo(Mesh); 
}

Thanks in advance.

Any news about this problem?

I have the same problem! Did you manage to fix it?

The problem is line 8:

APickupItem * item = NewObject();

You can’t use NewObject like this, but can do this in constructor funciton.