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"

crash when loading child actor component in packaged game

Hey !

Since 4.16 i get a crash in the packaged game with the following error (problem still occuring in 4.16.1):

 [2017.06.03-06.43.04:997][  0]LogWindows:Error: Fatal error: [File:D:\Build\++UE4+Release-4.16+Compile\Sync\Engine\Source\Runtime\CoreUObject\Private\Serialization\AsyncLoading.cpp] [Line: 3095] 
 [2017.06.03-06.43.04:997][  0]LogWindows:Error: YagUIBranchMain /Game/Yag/Game/BP_YagDefaultPawn.Default__BP_YagDefaultPawn_C:TrayComponent.TrayComponent_YagUIBranchMain_CAT was found in memory and is an export but does not have all load flags.

TrayComponent is a child actor component in the default pawn for the player controller (AGameMode::DefaultPawnClass)

YagDefaultPawn inherits from APawn:

 class YAG_API AYagDefaultPawn : public APawn

And here is how TrayComponent is defined:

 // YagDefaultPawn.h
 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Yag)
     UChildActorComponent* TrayComponent;
 
 ----------------------------------------------------------------
 
 // YagDefaultPawn constructor:
 // TrayComponent
 TrayComponent = ObjectInitializer.CreateDefaultSubobject<UChildActorComponent>(this, TEXT("TrayComponent"));
 TrayComponent->DetachFromComponent(FDetachmentTransformRules::KeepWorldTransform);
 TrayComponent->SetChildActorClass(AYagUIBranchMain::StaticClass());
 TrayComponent->SetWorldRotation(FRotator(0.f));
 TrayComponent->SetRelativeScale3D(FVector(4.f));
 TrayComponent->SetIsReplicated(false);

AYagUIBranchMain is a very complex object (lots of components and it loads a lot of object libraries).

Everything works fine when playing in the editor (PIE and standalone are OK).

I get the crash only when trying to launch the packaged game.

In 4.15 and previous versions, everything worked well even in the packaged game. Crash in packaged game came with 4.16.

I enclose the full log here.

Thanks for your help^^ link text Cedric

Product Version: UE 4.16
Tags:
yag.log (10.2 kB)
more ▼

asked Jun 03 '17 at 07:10 AM in Bug Reports

avatar image

uced
810 71 89 358

avatar image shared_pointer Jun 05 '17 at 06:36 AM

Hi, I'm having the same problem, did you figure out what was going wrong?

avatar image Matthew J ♦♦ STAFF Jun 05 '17 at 06:56 PM

Hello uced,

Have you attempted moving this ChildComponent to a fresh project to see if it alone is causing the problem? When looking up that message you received in the source code, I found that this message is brand new to 4.16 so it's possible that there is a new check in place and I'll need to ask the developer who implemented it about this. I'll let you know when I have more information.

Edit: Before that however, could you provide the full log for the packaging process itself? There could be some information in a warning or something of the sort that could point to what exactly is causing this.

avatar image uced Jun 10 '17 at 09:21 AM

Hey Matthew,

Apologies for my delayed answer, quite busy with work currently !

Here are the packaging logs.

Cheers

Cedric link text

avatar image nynjed Jun 07 '17 at 07:31 AM

Hi, my project have same problem. I'm too using child actor inside character and set it like yours:

 TrayComponent->SetChildActorClass(AYagUIBranchMain::StaticClass());

As workaround I found that if I remove setting ChildActorClass from native code, and set it from blueprint of my Character - it will not crash anymore.

avatar image uced Jun 10 '17 at 09:32 AM

Hey Ninjed,

Thanks for the tip but unfortunately it didn't work for me, as soon as i comment the line, the editor crashes on launch.

Thanks though !

Cedric

avatar image nynjed Jun 10 '17 at 09:53 AM

Try do this in following order:

  1. Load in editor(before commenting line) and set ChildActorClass to null and save Pawn BP.

  2. Close editor and comment that line

  3. After rebuild project load editor again and set ChildActorClass to that class again

Maybe this time it helps

avatar image uced Jun 10 '17 at 11:44 AM

Nicely done my friend, thanks a lot !

I pushed your logic further and put the line in PostInitializeComponents(), it works well and no BP code involved.

So the packaging problem seems to come from SetChildActorClass being called in the constructor.

This is the first time i am able to launch my packaged game in 4.16 and strangely enough, it launches straight in full screen. Is that a new feature ?

Anyway, thanks again Nynjed for this workaround, at least and at last i can work on my network problems again :-)

Cheers

Cedric

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

I'm glad that you found a workaround. I just put in a bug for another issue that seems like it could be related to this. The reproduction is different but since blueprint nativization turns the blueprint logic into code, it's most likely the same issue. Please take a look at this post for further information. The workaround seems similar as well.

more ▼

answered Jun 14 '17 at 05:07 PM

avatar image

Matthew J ♦♦ STAFF
31.8k 526 90 417

avatar image MaxDBlack Sep 15 '18 at 05:38 PM

Hello Matthew! I've encountered similar bug on 4.19 without nativization. Here's my code:

 ChildCameraComponent = CreateDefaultSubobject<UChildActorComponent>(TEXT("CharBarCamera"));
 ChildCameraComponent->SetChildActorClass(ABarCamera::StaticClass());
 ChildCameraComponent->SetupAttachment(SpringArmComp);

If I do it in Pawn constructor only packaged game crashes, but if I try to move this logic to postinitialization (pre init and init as well), my code triggers break points at data table load. The data table contains refs to my Pawns. I do not use nativization.

(comments are locked)
10|2000 characters needed characters left
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