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"

(Auto) asset import breaks after opening an asynchronously loaded level

We have encountered a problem where asset importing stopped working in certain situations. This happens with both automatic and manual reimporting.

It can be reproduced was as follows:

  • Open a big level through the Content Browser. (I think the reason that it should be a big level is that the level is loaded asynchronously when opened)

  • Navigate to a texture in the content browser that is referenced by one of the Actors in the level that was just opened.

  • Right-click on that texture and choose "Reimport"

  • Observe that a file selection window opens instead of the expected behaviour where the import is started.

A debug session showed that the SourceData variable in UAssetImportData for the broken assets wasn't set. This value is supposed to be set in the UAssetImportData::Serialize function. However, this function is not always being called.

Some more investigation showed that the reason Serialize is not called is that the RF_NeedLoad flag is is not set on the UAssetImportData object.

It was observed that the AssetImportData was loaded properly when it was used in a small level. The reason for the different behaviour is a branch in FLinkerLoad::CreateExport. Somewhere in the middle of the function there is the following piece of code:

    || IsAsyncLoading()
    || Export.bForcedExport
    || LinkerRoot->ShouldFindExportsInMemoryFirst()

Here we see a branch that is entered when AsyncLoading is enabled. In this branch the RF_NeedLoad flag is only being set under certain conditions:

if (!Export.Object->HasAnyFlags(RF_LoadCompleted) &&
(Export.Object->HasAnyFlags(RF_DefaultSubObject) || (ThisParent && ThisParent->HasAnyFlags(RF_ClassDefaultObject))))
    Export.Object->SetFlags(RF_NeedLoad | RF_NeedPostLoad | RF_NeedPostLoadSubobjects | RF_WasLoaded);

At this point the only flag set on the UAssetImportData object is RF_Async.

In UTexture::PostInitProperties it can indeed be observed that the UAssetImportData is constructed without any flags.

At this point I am not sure how to properly solve the problem. I am pretty certain the RF_NeedLoad flag needs to be set on the UAssetImportData objects somehow. But I don't understand the system well enough to decide how that should be achieved.

So, my question would be if someone is familiar with this system and can help me fix it, tell me if I'm looking in the right direction, or is this maybe a known issue that is already being worked on?

Product Version: UE 4.10
more ▼

asked Dec 11 '15 at 04:25 PM in Bug Reports

avatar image

1 2 3

avatar image Lovecraft_K ♦♦ STAFF Dec 11 '15 at 07:15 PM

Hi MrDean -

I am looking into this issue now and will respond back here if I have any questions or can provide you with an answer.

Thank You

Eric Ketchum

avatar image MrDean Dec 11 '15 at 09:13 PM

Nice to hear, thanks!

avatar image Lovecraft_K ♦♦ STAFF Dec 14 '15 at 03:17 PM

Hello -

I have been trying a few different internal maps including the kite demo and I am not able to get the results that you are describing above unless the source location is no longer valid for the texture asset. Do you have a sample project which demonstrates this issue that I could test? You can attach it here or link it to me via the following private message system:


Thank You

Eric Ketchum

avatar image MrDean Dec 15 '15 at 10:06 AM

I sent you a message.

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

1 answer: sort voted first

Hi Mr.Dean -

Thank You for your help, I was able to reproduce the issue and entered the report as UE-24505. As we continue to investigate a solution I will keep you informed here.

Eric Ketchum

more ▼

answered Dec 15 '15 at 03:40 PM

avatar image

Lovecraft_K ♦♦ STAFF
36.7k 702 260 735

(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