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"

FObjectFinder fails only in packaged game

We're able to successfully package our game for Windows with no errors, but the actual executable throws a null reference exception when loading the game mode's DefaultPlayerPawn via FObjectFinder:

 static ConstructorHelpers::FObjectFinder<UClass> PlayerPawnBPClass(TEXT("Class'/Game/Blueprints/NNRCharacterBP.NNRCharacterBP_C'"));
     if (PlayerPawnBPClass.Object != NULL)
     {
         DefaultPawnClass = PlayerPawnBPClass.Object;
     }

This works just fine when launching from the editor.

Here's the relevant portion of the call stack.

  NNR-Win64-DebugGame.exe!LoadPackage(UPackage * InOuter, const wchar_t * InLongPackageName, unsigned int LoadFlags) Line 822    C++
  NNR-Win64-DebugGame.exe!StaticLoadObject(UClass * ObjectClass, UObject * InOuter, const wchar_t * InName, const wchar_t * Filename, unsigned int LoadFlags, UPackageMap * Sandbox, bool bAllowObjectReconciliation) Line 671    C++
 >NNR-Win64-DebugGame.exe!ConstructorHelpersInternal::FindOrLoadObject<UClass>(FString & PathName) Line 31    C++

Unfortunately this is not a full-source project, but a separate C++ game module created via the editor New Project Wizard (is "content-only project" the proper designation for that?). This won't allow me to see StaticLoadObject() or LoadPackage(), so I'm not able to follow what exactly is failing. Line 822 in UObjectGlobals.cpp corresponds to:

 Linker->LinkerRoot->ThisRequiresLocalizationGather(Linker->RequiresLocalizationGather());
 

So something in there is null. "Linker" is checked for null prior to this line and the stack doesn't show either function is entered, so I assume "LinkerRoot" is the culprit, but I'm not sure what to make of that.

I'm hoping I've just missed something simple and said enough to ring a bell for someone. Been at this for a while and would really appreciate any help. If you'd like more info please ask. Thanks everyone!

-Dan

Edit: Here's the log

Product Version: Not Selected
Tags:
nnr.txt (2.3 kB)
more ▼

asked Apr 19 '14 at 01:55 AM in Packaging & Deployment

avatar image

DanH
31 2 3 7

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

1 answer: sort voted first

I felt I would report this here in case this is an engine bug. I had this same issue and upon debugging I found it was triggered by a circular dependency.

I'm assuming the engine allows circular dependencies to some degree, so I think it may be an engine bug. Specifically the crash occurs inside the LoadPackage() call you are refering too above, but the same package gets loaded recursively again as the result of Linker->LoadAllObjects(), and Linker->LinkerRoot is set to NULL at some point as the result of this.

I only noticed this when running with cooked data over a real network (it may also be a race condition kind of situation where if the package loads normally with the map because it is required in the map it is fine). It happened when the offending package is told to load as the result of replication of an object which needs the package (and LoadPackage is called from FNetGUIDCache::GetObjectFromNetGUID).

Not sure if the problem is on my end or an engine bug, but I felt I would share what I understand as best as I understand it in case it is an engine bug.

Note that I am running 4.4, so if it is an engine bug, it is there in the latest version.

more ▼

answered Sep 27 '14 at 11:46 AM

avatar image

Merlin
76 4 6 11

(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