x

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"

Editor Crash on opening project

Adding following lines of code caused my project to crash:

 for (int i = 0; i < ItemData.ItemAreas.Num(); i++)
     {
         ItemData.ItemAreas[i].ItemAreaCollisionBox = CreateDefaultSubobject<UBoxComponent>(TEXT("Item Collision Box"));
         ItemData.ItemAreas[i].ItemAreaCollisionBox->SetWorldScale3D(FVector(1.0f, 1.0f, 1.0f));
         ItemData.ItemAreas[i].ItemAreaCollisionBox->bGenerateOverlapEvents = true;
         ItemData.ItemAreas[i].ItemAreaCollisionBox->OnComponentBeginOverlap.AddDynamic(this, &ABaseItem::OnCollisionBoxEnter);
         ItemData.ItemAreas[i].ItemAreaCollisionBox->AttachToComponent(ItemRootTransform, FAttachmentTransformRules::SnapToTargetNotIncludingScale);
     }

The OnCollisionBoxEnter function worked before adding loop.

That loop was located in the constructor ABaseItem::ABaseItem(), this is ABaseItem's header:

 // Fill out your copyright notice in the Description page of Project Settings.
 
 #pragma once
 
 #include "GameFramework/Actor.h"
 #include "BaseItem.generated.h"
 
 class ABaseItem;
 
 USTRUCT()
 struct CATALYST_API FItemArea
 {
     GENERATED_BODY()
 
 public:
     //UPROPERTY(EditAnywhere)
         //ABaseItem* OwnerItem;
 
     UPROPERTY(EditAnywhere)
         float ItemAreaDurability;
 
     UPROPERTY(EditAnywhere)
         UBoxComponent* ItemAreaCollisionBox;
 
     UPROPERTY(EditAnywhere)
         FTransform ItemAreaCollisionBoxTransform;
 
     UPROPERTY(EditAnywhere)
         FVector ItemAreaCollisionBoxExtent;
 
 
     FItemArea()
     {
         ItemAreaDurability = 100;
         ItemAreaCollisionBoxExtent.Set(50, 50, 50);
         ItemAreaCollisionBoxTransform.SetLocation(FVector(0, 0, 0));
         ItemAreaCollisionBoxTransform.SetScale3D(FVector(1, 1, 1));
         ItemAreaCollisionBoxTransform.SetRotation (FRotator(0, 0, 0).Quaternion());
     }
 
 
     
 };
 
 USTRUCT()
 struct CATALYST_API FItemData
 {
     GENERATED_BODY()
 
 public:
     UPROPERTY(EditAnywhere)
         FString ItemDisplayName;
 
     UPROPERTY(EditAnywhere)
         FStringAssetReference ItemMeshPath;
 
     UPROPERTY(EditAnywhere)
         FVector ItemMeshScale;
 
     UPROPERTY(EditAnywhere)
         TArray<FItemArea> ItemAreas;
 
     FItemData()
     {
         ItemDisplayName = FString(TEXT("Default Item"));
         ItemMeshPath = FString(TEXT("/Game/StarterContent/Shapes/Shape_Sphere.Shape_Sphere"));
         ItemAreas.AddDefaulted();
 
     }
 };
 
 UCLASS()
 class CATALYST_API ABaseItem : public AActor
 {
     GENERATED_BODY()
     
 public:    
     // Sets default values for this actor's properties
     ABaseItem();
 
     // Called when the game starts or when spawned
     virtual void BeginPlay() override;
     
     // Called every frame
     virtual void Tick( float DeltaSeconds ) override;
 
     void SetData(FItemData InputData);
 
     UPROPERTY(EditAnywhere)
         bool DefaultItem;
 
     UPROPERTY(EditAnywhere)
         FItemData ItemData;
 
     UPROPERTY(EditAnywhere)
         UStaticMeshComponent* ItemMesh;
 
     UPROPERTY(EditAnywhere)
         USceneComponent* ItemRootTransform;
     UFUNCTION()
         void OnCollisionBoxEnter(UPrimitiveComponent * OverlappedComponent, AActor * OtherActor, UPrimitiveComponent * OtherComponent, int32 OtherBodyIndex, bool bFromSweep, const FHitResult &SweepResult);
 
 };
 

Sorry if that was to long, I'm just making sure I don't miss an important detail.

As you can see I was creating multiple bindings on a UBoxComponent on a USTRUCT to a single function on a UCLASS which to be honest I doubted would work. However this caused an editor crash, that continued crashing the editor when I tried to launch the project even when the lines of code had been commented out. This brought up the Unreal Engine 4 Crash Reporter and told me: "You do not have any debugging symbols required to display the callstack for this crash." The only way I found to launch my project was to delete the folders Intermediate and .vs and remove any dll or pdb files in Binaries>Win64 that ended with numbers. Even then if I tried to compile my code the project crashed again.

I hope that somebody could tell me what is causing this problem and how to fix it. It would also be nice if I could be given an alternative to the error causing loop but that would not be necessary as long as I can get the project to launch again.

Product Version: UE 4.15
Tags:
more ▼

asked Apr 18 '17 at 06:10 PM in Bug Reports

avatar image

Bretonic
3 2 2

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

1 answer: sort voted first

Go to your My Files in your computer. File Explorer > Documents > Unreal Projects > Project Name > Content. Find the object you were editing when the crash occurred, then delete it. I know it may suck getting rid of it, but worst case scenario, you still have the rest of your game. This same thing has happened to me countless times throughout this project I am working on.

Once you delete the object, of course it will need to be recreated, but it will allow the editor to open up without any issues. And for the future, ensure that once you get this working again, you make a backup copy of your game. This will come in handy for whenever you cannot get your project back.

more ▼

answered Apr 18 '17 at 06:16 PM

avatar image

BubbaBonkers
128 4 6 9

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
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