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"

packaged game crashes


My game works fine in the editor (even when launched as a standalone game).

But when i package it, i get a crash with a message pointing to those lines in my code:

 // Dice declaration
 static ConstructorHelpers::FObjectFinder<UBlueprint> BP_d4Object(TEXT("Blueprint'/Game/dice/D4_Dice_BP.D4_Dice_BP'"));
 BP_d4 = (UClass*)BP_d4Object.Object->GeneratedClass;

They are in the constructor of a ACharacter derived class, nothing fancy.

The crash reporter says the last line is guilty of access violation.

I guess somehow the object can't be reached in packaged game, while it's there in the editor.

But then what can i do ?

BTW im in 4.5 and it's the first time i try to package.



Product Version: Not Selected
more ▼

asked Nov 02 '14 at 12:35 PM in Packaging & Deployment

avatar image

870 75 93 363

avatar image uced Nov 02 '14 at 01:10 PM

Maybe those lines are not guilty: i tried to comment them and i get a crash pointing in some other line in the constructor:

     CharacterMovement->SetMovementMode(MOVE_Falling, 0);

This time, there isn't any BP involved, it's a safe line (at least i hope), but the error is the same (access violation), only with a different line number.

By the way, this is my default class pawn in case it's important: i suppose it's loaded in memory early in the game ? Could all those properties be not present at startup in the packaged game ?

I am no c++ (neither ue4) guru. Maybe those things should be in the beginplay function and not in the constructor ?

Should i leave in the constructor only what concerns the editor like BP stuff ?

I have aldready packaged BP games with no problem, this is my first c++ game, so maybe there are some packaging option that i missed ?


avatar image uced Nov 02 '14 at 04:17 PM

oups, mistake in my previous post.

The access violation was pointing here:

 static ConstructorHelpers::FObjectFinder<UBlueprint> BP_YagCharacterObject(TEXT("Blueprint'/Game/Character/BP_YagCharacter.BP_YagCharacter'"));
 BP_YagCharacter = (UClass*)BP_YagCharacterObject.Object->GeneratedClass;

This time it's in the playercontroller contructor.

So obviously there is a problem with objects generated from BP, which is a good news, at least it's not random.

Is there anything special to check when packaging a game using this kind of code ?

Continuing my tests


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

1 answer: sort voted first

Ok, problem solved.

In the DefaultEditor.ini, i had this:


and i replaced it by this:


Not sure this is a good idea to let that one to true by default when creating a project.


more ▼

answered Nov 02 '14 at 04:39 PM

avatar image

870 75 93 363

(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