Access Violation UE 5.0 EA (solved-ish)

After refactoring I’m getting an Access Violation error when I call SetHand here.

void AVRCharacter::BeginPlay()
{
	Super::BeginPlay();

	if (BlinkerMaterialBase == nullptr) return;
	BlinkerDynamicMaterialInstance = UMaterialInstanceDynamic::Create(BlinkerMaterialBase, this, TEXT("BlinkerMaterialBase"));
	PostProcessComponent->AddOrUpdateBlendable(BlinkerDynamicMaterialInstance);

	LeftController = GetWorld()->SpawnActor<AHandController>(HandControllerClass);
	if (LeftController == nullptr || VRRoot == nullptr || this == nullptr) return;
	LeftController->SetOwner(this);
	LeftController->AttachToComponent(VRRoot, FAttachmentTransformRules::KeepRelativeTransform);
	LeftController->SetHand(EControllerHand::Left);

	RightController = GetWorld()->SpawnActor<AHandController>(HandControllerClass);
	if (RightController == nullptr || VRRoot == nullptr || this == nullptr) return;
	RightController->SetOwner(this);
	RightController->AttachToComponent(VRRoot, FAttachmentTransformRules::KeepRelativeTransform);
	RightController->SetHand(EControllerHand::Right);
}

and

I just installed the debugging symbols for UE 5.0, I did not realize that I had to install those for each version, I thought once you had them you were good for any version. The actual error I am getting is

It just keeps getting deeper!

Hi,
There is a bug in the VR Subsystem inside the early access release. This is basically the same as 4.27 but it was corrected for 4.27.2 and not in the early access build. The unreal team themselves mentioned this during a webinar on the new VR system they’ve created a couple of months ago.

It is possible it has been addressed in the source code version of the UE5 Engine but you’d have to build this yourself - you need about 260GB of free disk space, probably about a day of time and you’ll need Visual Studio 2022 to build it as well (so another 50GB or thereabouts of disk)

Right now, my advice to you would be to stick with UE 4.27 - even the source is just an alpha version so is buggy and tends to crash.

1 Like

Thank you so much! I was really convinced that it was an Unreal issue but I’ve thought that a few times and it never was.

1 Like

Also sorry, I should have addressed this before as well: Debug symbols - yes, for each version. The code is different for each release of the Unreal Engine so they need separate debug symbols to match the code.

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

Privacy & Terms