Can not find why I get this error in UMover::SetShouldMove()

When I run the game from the editor the unreal crash and I get this log:

Error        LogWindows                === Critical error: ===
Error        LogWindows                Fatal error!
Error        LogWindows                Unhandled Exception: EXCEPTION_ACCESS_VIOLATION writing address 0x00000000000000dc
Error        LogWindows                [Callstack] 0x00007ffd9b3e7b50 UnrealEditor-CryptRaider.patch_0.exe!UMover::SetShouldMove() [C:\Unreal\CryptRaider2\Source\CryptRaider\Mover.cpp:19]

And this is the code of SetShouldMove

TriggerComponent.h :


public:

	UTriggerComponent();
	
	// Called every frame
	virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;

	UFUNCTION(BlueprintCallable)
	void SetMover(UMover* Mover);
	
private:
	UPROPERTY(EditAnywhere)
	FName AcceptedActorTag;

	UMover* Mover;
	AActor* GetAcceptedActor();

TriggerComponent.cpp

void UTriggerComponent::SetMover(UMover* NewMover)
{
	Mover = NewMover;
}

Mover.cpp

void UMover::SetShouldMove(bool NewShouldMove)
{      // this is line 19
	ShouldMove = NewShouldMove;
}

Morning,

I have noticed that the post is in the talk section, as opposed to ask.
the talk header is usually for general discussions

I will move your post to the Ask section and hopefully someone will be able to help you get back on track.

DaZ

1 Like

Thanks I am stuck for a week on this problem

1 Like

That is essentially saying Mover is nullptr. Did you set it in Unreal?

it is added , the crash ocurr when I press on play in the editor

That is node is BeginOverlap not BeginPlay

1 Like

When I connect begin play node I get same crash


Unhandled Exception: EXCEPTION_ACCESS_VIOLATION writing address 0x00000000000000dc

UnrealEditor_CryptRaider_patch_0!UMover::SetShouldMove() [C:\Unreal\CryptRaider2\Source\CryptRaider\Mover.cpp:19]

But if I removed this node I get no crash but the secret door does not move of course

What if you remove the components and re-add them or create a new blueprint?

1 Like

I will repeat the last 15 leasons because I have short memory and hope I get it right this time. Will update after I finish, thanks.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms