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"

C++ created Perception Component crash editor

I create AI controller with UAIPerceptionComponent via C++. When I build project there are no any trouble with compilation. After that I create BP inherited from this AIController and try to tweak some values of Sense Config. But it fails because of engine crash. I've tried on empty project - same result. Please help!!! =-\

UPD: Creating AIController and attaching Perception Component to this controller via Blueprint Editor doesn't cause this issue

UPD 2: Debugger says that ActualObjToChange is NULL (Engine\Source\Editor\PropertyEditor\Private\PropertyNode.cpp at 2400 line) alt text

 //// PerceptionTest.h
     
     #pragma once
     
     #include "AIController.h"
     #include "Perception/AIPerceptionSystem.h"
     #include "Perception/AIPerceptionComponent.h"
     #include "Perception/AISenseConfig_Sight.h"
     #include "PerceptionTest.generated.h"
     
     /**
      *
      */
     UCLASS()
     class MYPROJECT_API APerceptionTest : public AAIController
     {
         GENERATED_BODY()
     
     public:
         APerceptionTest(const FObjectInitializer& ObjectInitializer);
     
         UPROPERTY(VisibleDefaultsOnly, BlueprintReadOnly, Category = "Test")
             UAIPerceptionComponent* PerceptionComp;
     
         UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Test")
             UAISenseConfig_Sight* SightConfig;
     };
     
     //// PerceptionTest.cpp
     
     #include "MyProject.h"
     #include "PerceptionTest.h"
     
     APerceptionTest::APerceptionTest(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer)
     {
         PerceptionComp = ObjectInitializer.CreateDefaultSubobject<UAIPerceptionComponent>(this, "Perception Comp");
     
         SightConfig = CreateDefaultSubobject<UAISenseConfig_Sight>("Sight Sense");
         PerceptionComp->ConfigureSense(*SightConfig);
         PerceptionComp->SetDominantSense(SightConfig->GetSenseImplementation());
         SightConfig->DetectionByAffiliation.bDetectEnemies = true;
         SightConfig->DetectionByAffiliation.bDetectFriendlies = true;
         SightConfig->DetectionByAffiliation.bDetectNeutrals = true;
         SightConfig->PeripheralVisionAngleDegrees = 65.f;
         SightConfig->SightRadius = 1000.f;
         SightConfig->LoseSightRadius = 1500.f;
     
     }
Product Version: UE 4.10
Tags:
2.png (254.7 kB)
more ▼

asked Mar 02 '16 at 09:23 AM in Bug Reports

avatar image

napolinkinpark3r
40 2 8 11

avatar image Bino Mar 02 '16 at 11:41 AM

Can you show me the callstack?

avatar image napolinkinpark3r Mar 02 '16 at 11:56 AM
myproject.log (85.2 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Hey napolinkinpark3r-

I expereienced the crash you described and have submitted a report for investigation (UE-27729). The crash is tied to defining the UAISenseConfig_Sight in code. If you remove the lines related to UAISenseConfig_Sight and SightConfig from the .h and .cpp and instead set these values through the editor you should be able to avoid the crash.

Cheers

Doug Wilson

more ▼

answered Mar 02 '16 at 07:40 PM

avatar image napolinkinpark3r Mar 03 '16 at 07:19 AM

Thanks for reply, Doug. I should add remark that crash caused not only by Sight Sense configuration, but by other senses too (Hearing, Damage etc). Hope this issue will be fixed soon =-)

avatar image Doug E ♦♦ STAFF Mar 04 '16 at 03:36 PM

Hey napolinkinpark3r-

I found that this crash is fixed in 4.11 and is already included in the current 4.11 Preview 6 available on the Launcher. If you open a copy of your project in this version you should be able to use your current code setup without getting a crash.

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

Tough to work out from here. This seems the most positive answer I could find https://answers.unrealengine.com/questions/240416/client-crashes-when-i-try-to-set-values-on-my-sigh.html

more ▼

answered Mar 02 '16 at 12:29 PM

avatar image

Bino
269 9 5 13

avatar image napolinkinpark3r Mar 02 '16 at 12:41 PM

@Bino I'll try this out, but I think this is very rough workaround. As I can understand, issue I described is UI related, not AI or Perception

(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