Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

UE4 crashes when I press play

When I press play UE4 crashes and I get this:

Fatal error!

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000168

0x00000000AA20CD6C UE4Editor-Engine.dll!UnknownFunction [] 0x00000000C36B5D5D UE4Editor-WaveFPS-5511.dll!AFirstPersonCharacter::BeginPlay() [f:\unreal projects\wavefps\source\wavefps\player\firstpersoncharacter.cpp:69] 0x00000000A9D472FB UE4Editor-Engine.dll!UnknownFunction [] 0x00000000AAFFA253 UE4Editor-Engine.dll!UnknownFunction [] 0x00000000AA4BEF51 UE4Editor-Engine.dll!UnknownFunction [] 0x00000000AAFE356E UE4Editor-Engine.dll!UnknownFunction [] 0x00000000AA4E3C5E UE4Editor-Engine.dll!UnknownFunction [] 0x00000000B29726F0 UE4Editor-UnrealEd.dll!UnknownFunction [] 0x00000000B2991156 UE4Editor-UnrealEd.dll!UnknownFunction [] 0x00000000B29ABAFF UE4Editor-UnrealEd.dll!UnknownFunction [] 0x00000000B241C961 UE4Editor-UnrealEd.dll!UnknownFunction [] 0x00000000B2CB9526 UE4Editor-UnrealEd.dll!UnknownFunction [] 0x000000002EC55EAC UE4Editor.exe!UnknownFunction [] 0x000000002EC66BD0 UE4Editor.exe!UnknownFunction [] 0x000000002EC66C4A UE4Editor.exe!UnknownFunction [] 0x000000002EC74149 UE4Editor.exe!UnknownFunction [] 0x000000002EC75B57 UE4Editor.exe!UnknownFunction [] 0x00000000E4801FE4 KERNEL32.DLL!UnknownFunction [] 0x00000000E585EFC1 ntdll.dll!UnknownFunction [] 0x00000000E585EFC1 ntdll.dll!UnknownFunction []

Hey is the code that is crashing

include "FirstPersonCharacter.h"

include "GameFramework/Actor.h"

include "GameFramework/Character.h"

include "Camera/CameraComponent.h"

include "Components/CapsuleComponent.h"

include "Components/InputComponent.h"

include "Components/SkeletalMeshComponent.h"

include "GameFramework/InputSettings.h"

include "../Weapons/Gun.h"

include "HeadMountedDisplayFunctionLibrary.h"

include "Kismet/GameplayStatics.h"

include "MotionControllerComponent.h"


////////////////////////////////////////////////////////////////////////// // AFirstPersonCharacter

AFirstPersonCharacter::AFirstPersonCharacter() { // Set size for collision capsule GetCapsuleComponent()->InitCapsuleSize(55.f, 96.0f);

  // set our turn rates for input
  BaseTurnRate = 45.f;     BaseLookUpRate

= 45.f;

  // Create a CameraComponent    
  FirstPersonCameraComponent =

CreateDefaultSubobject(TEXT("FirstPersonCamera")); FirstPersonCameraComponent->SetupAttachment(GetCapsuleComponent()); FirstPersonCameraComponent->RelativeLocation = FVector(-39.56f, 1.75f, 64.f); // Position the camera FirstPersonCameraComponent->bUsePawnControlRotation = true;

  // Create a mesh component that will

be used when being viewed from a '1st person' view (when controlling this pawn) Mesh1P = CreateDefaultSubobject(TEXT("CharacterMesh1P")); Mesh1P->SetOnlyOwnerSee(true); Mesh1P->SetupAttachment(FirstPersonCameraComponent); Mesh1P->bCastDynamicShadow = false; Mesh1P->CastShadow = false; Mesh1P->RelativeRotation = FRotator(1.9f, -19.19f, 5.2f); Mesh1P->RelativeLocation = FVector(-0.5f, -4.4f, -155.7f);

  // Default offset from the character

location for projectiles to spawn GunOffset = FVector(100.0f, 0.0f, 10.0f); }

void AFirstPersonCharacter::BeginPlay() { // Call the base class

  // Get GunBlueprint     Gun =

GetWorld()->SpawnActor(GunBlueprint); if (GunBlueprint == NULL) { UE_LOG(LogTemp, Warning, TEXT("GunBlueprint not found")); return; }

  // Attach gun mesh component to

Skeleton, doing it here because the skeleton is not yet created in the constructor Gun->AttachToComponent(Mesh1P, FAttachmentTransformRules(EAttachmentRule::SnapToTarget, true), TEXT("GripPoint"));

  // Set Gun's AnimInstance to the same

AnimInstance as defined in the Mesh1P Gun->AnimInstance1P = Mesh1P->GetAnimInstance();

  // Bind fire event

IE_Pressed, Gun, &AGun::OnFire);


////////////////////////////////////////////////////////////////////////// // Input

void AFirstPersonCharacter::SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) { // set up gameplay key bindings check(PlayerInputComponent);

  // Bind jump events

IE_Pressed, this, &ACharacter::Jump); PlayerInputComponent->BindAction("Jump", IE_Released, this, &ACharacter::StopJumping);

  // Enable touchscreen input

IE_Pressed, this, &AFirstPersonCharacter::OnResetVR);

  // Bind movement events

this, &AFirstPersonCharacter::MoveForward); PlayerInputComponent->BindAxis("MoveRight", this, &AFirstPersonCharacter::MoveRight);

  // We have 2 versions of the rotation

bindings to handle different kinds of devices differently // "turn" handles devices that provide an absolute delta, such as a mouse. // "turnrate" is for devices that we choose to treat as a rate of change, such as an analog joystick PlayerInputComponent->BindAxis("Turn", this, &APawn::AddControllerYawInput); PlayerInputComponent->BindAxis("TurnRate", this, &AFirstPersonCharacter::TurnAtRate); PlayerInputComponent->BindAxis("LookUp", this, &APawn::AddControllerPitchInput); PlayerInputComponent->BindAxis("LookUpRate", this, &AFirstPersonCharacter::LookUpAtRate); }

Product Version: UE 4.19
more ▼

asked Mar 31 '18 at 02:17 PM in C++ Programming

avatar image

1 1 2 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question