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"

UE Corrupts loaded Data Assets on crash.

I have some DataAssets with level descriptions, which are stored in array in Game Instance class. If my game crash, it corrupts editor asset files. And these assets disappear from content browser.

Product Version: UE 4.10
Tags:
more ▼

asked Mar 30 '16 at 08:46 AM in Bug Reports

avatar image

Yata
554 39 50 69

avatar image Adam Davis STAFF Mar 30 '16 at 06:46 PM

Hi Yata,

  • Does this occur in a clean, blank project with no additional content or is it limited to one project?

  • What steps did you take just before the crash occurred?

  • Can you post your crash logs from the crash?

  • Before the crash, did you save the assets that become corrupt?

avatar image Yata Mar 31 '16 at 06:16 AM

Hi Adam,

The crash log is unrelated to DataAssets, it can be any gameplay code crash, like access violation or something like that. I wonder why UE is even writing something to DataAssets, maybe I am using them wrong way. I thought they are just constant structs of data. About saving i think yes... or maybe no, Still they are not reverted to any unsaved state, but a corrupted to the state they are not readable at all.

Not sure if I can reproduce it in blank project, but will try this weekend. For sure I can tell you, that only loaded DataAssets are corrupted - those which have memory references during crash.

avatar image Adam Davis STAFF Apr 04 '16 at 02:58 PM

Hi Yata,

Have you had a chance to try this on your end in a clean project? If so, what were the results of that test? Do you have any steps I can take to recreate this on my end?

avatar image Yata Apr 05 '16 at 08:06 AM

Actually it is very hard to reproduce. And I am puzzled why this happens, but some time some DataAssets get corrupted for no reason. This can be on Hot Reload, or on project Load, or after crash. Hard to tell. Looks like data asset files are just written incomplete sometime.

avatar image Adam Davis STAFF Apr 05 '16 at 05:03 PM

Is this a c++ or blueprint project?

avatar image Yata Apr 06 '16 at 02:39 AM

с++, with some blueprints.

avatar image Yata Apr 06 '16 at 08:12 AM

It looks like only some header part is written to DataAssets, while all data is missing from them.

avatar image Sean L ♦♦ STAFF Apr 06 '16 at 07:23 PM

How do you have your asset set up? Knowing this will help us reproduce this on our end.

If you can cause the crash to occur again, please provide your Machine ID from the Crash Reporter window and ensure to hit send on the report. If we can stop the crash from occurring, this should prevent the asset from becoming corrupted.

As far as the asset being corrupted on Hot Reload or project load, do you have any repro case that we can use to see this on our end?

avatar image Yata Apr 07 '16 at 10:17 AM

I have a class UMyAsset subclassed from UDataAsset, and resource of this class is created in Content Browser. Occasionally they became corrupted.

avatar image Yata Apr 07 '16 at 10:17 AM
 UCLASS(BlueprintType)
 class GEAL_API UGealLevelDescription : public UDataAsset
 {
     GENERATED_BODY()
 
 
 
 public:
     UPROPERTY(Category = "Level", EditAnywhere, BlueprintReadOnly)
     FString Name;
 
     UPROPERTY(Category = "Level", EditAnywhere, BlueprintReadOnly)
     FString Description;
 
     UPROPERTY(Category = "Level", EditAnywhere, BlueprintReadOnly)
     class UTexture2D* LogoImage;
 
     UPROPERTY(Category = "Level", EditAnywhere, BlueprintReadOnly)
     TArray<TAssetPtr<UWorld>> Levels;
 };

sample of one of such classes.

avatar image Sean L ♦♦ STAFF Apr 07 '16 at 03:32 PM

After performing a few tests, I haven't seen the data asset being corrupted. If you are able to determine repro steps when you attempt to reproduce it in a clean project, please share those with me.

How often are you seeing these assets become corrupted?

avatar image Yata Apr 11 '16 at 02:09 PM

I think that is happens when resource go to that strange Transient state after Hot Reloading, like here https://answers.unrealengine.com/questions/379851/have-no-idea-why-this-ever-happen-after-hotreloadi.html But for DataAssets it does not show that message and silently corrupts data.

What do you think, epics?

avatar image Sean L ♦♦ STAFF Apr 12 '16 at 04:58 PM

It's possible, but unfortunately I still have not seen this issue occurring in my tests. Have you been able to determine any repro after additional testing? Are there any methods that you've found that seem to corrupt the asset on a more regular basis?

avatar image Yata Apr 13 '16 at 02:59 AM

It is hard to reproduce these errors, but i think the test case can be following.

  1. Create some UDataAsset. compile code and create object of it in CB fill it with data and save.

  2. Then open it in CB, and make some edits, but not save.

  3. While data asset is open, chang it's code in visual studio and recompile to trigger hot reload.

  4. Try to save data asset and close the project.

maybe it will fail. Transient errors are usually appear to me when ue hot reloads while have open asset windows.

avatar image Sean L ♦♦ STAFF Apr 18 '16 at 02:30 PM

I've performed some tests using the steps that you've provided, but I have not been able to see the same behavior on my end. I will continue to investigate the issue to see if I can get one of my data assets to become corrupted. In the meantime, please reply with additional information if you come across any. Thank you.

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

1 answer: sort voted first

Hello,

I am marking this topic as resolved for tracking purposes, as we have not heard from you in a few days. If this issue persists, feel free to respond to this thread. For any new issues, please create a new Answerhub topic.

Have a great day

more ▼

answered Apr 22 '16 at 02:35 PM

avatar image

Sean L ♦♦ STAFF
43.5k 485 152 442

(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