# Texture Data un-Serialize crash while OpenLevel

**URL:** <https://forums.unrealengine.com/t/texture-data-un-serialize-crash-while-openlevel/388215>\
**Category:** Rendering\
**Tags:** load, unreal-engine, crash, bug-report, question\
**Created:** [March 17, 2017, 3:26pm UTC](https://forums.unrealengine.com/t/texture-data-un-serialize-crash-while-openlevel/388215 "2017-03-17T15:26:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_d5193351](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d5193351](https://forums.unrealengine.com/u/anonymous_user_d5193351)\
**Post date:** [March 17, 2017, 3:26pm UTC](https://forums.unrealengine.com/t/texture-data-un-serialize-crash-while-openlevel/388215/1 "2017-03-17T15:26:01Z")

</div>

Reporting a crash since UE 4.15.0/1 (a check fail critical error):

If you try to load a UTexture’s data (eg `UpdateResource()` or `PlatformData .. Mip .. Lock/GetCopy`) inside a PostLoad of anything during an OpenLevel.

**Attached, a small UE4 repro project** , and here are the reproduction steps:

- Open in UE4Editor 4.15.0/1
- in ProjectLauncher, Launch: Windows, Default (WindowsNoEditor), DebugGame (or any), By The Book
- When opened, press [TAB]: level blueprint will OpenLevel “MapCrash”.
- “MapCrash”'s **AMyActor::PostLoad code will load a UTexture’s data, and crash** during the de-Serialize of the pixels.

here is the crash:

```
LogWindows:Error: begin: stack for UATLogWindows:Error: === Critical error: ===
LogWindows:Error: === Critical error: ===LogWindows:Error:
LogWindows:Error: LogWindows:Error: Assertion failed: CurrentPos + Count <= TotalSizeOrMaxInt64IfNotReady() [File:D:\Build\++UE4+Release-4.15+Compile\Sync\Engine\Source\Runtime\CoreUObject\Private\Serialization\AsyncLoading.cpp] [Line: 7351]
LogWindows:Error: Assertion failed: CurrentPos + Count <= TotalSizeOrMaxInt64IfNotReady() [File:D:\Build\++UE4+Release-4.15+Compile\Sync\Engine\Source\Runtime\CoreUObject\Private\Serialization\AsyncLoading.cpp] [Line: 7351] LogWindows:Error: Seeked past end of file ../../../LoadTextureCrash/Content/T_Texture.uexp (4979 / 1346)

```

More info inside the project AMyActor source code.

Did not crash on 4.14.3.

Do not crash if called during the load of the first Level (I could only repro with a Blueprint OpenLevel).

Also crashes on PS4, XboxOne, but does not seem to crash on Linux (!?).

Does not crash in UE4Editor.

My guess, is some async **Texture Streaming/Loading not perfectly thread safe**.

## Update 4.15.2 (9 May 2017):

Since 4.15.2, by default (as in default project settings) it does not crash anymore, because the **Event Driven Loader seems to have been disabled by default** :

On **4.15.1** , default project settings, it logs (and **crashes later** ):

```
LogStreaming:Display: Async Loading initialized: New Async IO: true, Event Driven Loader: true, Async Loading Thread: false

```

On **4.15.2** , default project settings, it logs (and does **NOT crash** later):

```
LogStreaming:Display: Async Loading initialized: New Async IO: false, Event Driven Loader: false, Async Loading Thread: false

```

On **4.15.2, enable Project Settings \> Streaming \> Event Driven Loader Enabled** , it logs (and **crashes again later** ):

```
LogStreaming:Display: Async Loading initialized: New Async IO: true, Event Driven Loader: true, Async Loading Thread: false

```

(Edit: moved to Bug Report section. Edit: still crashes with 4.15.1. Edit May 9: added “Update 4.15.2”)

## Update 4.17.0 (18 August 2017):

**TL;DR: Fixed.**

Could not repro the crash on 4.17, and Event-Driven Loader fixes in 4.17 changelog could be related to this bug, I’ll consider it fixed, !

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0c62419a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0c62419a](https://forums.unrealengine.com/u/anonymous_user_0c62419a)\
**Post date:** [March 22, 2017, 6:44pm UTC](https://forums.unrealengine.com/t/texture-data-un-serialize-crash-while-openlevel/388215/2 "2017-03-22T18:44:41Z")

</div>

Hey Jo\_PkFX,

Thank you for submitting this post. I have reproduced this issue and logged a report for it here: [Unreal Engine Issues and Bug Tracker (UE-43208)](https://issues.unrealengine.com/issue/UE-43208)

You can track the report’s status as the issue is reviewed by our development staff. Please be aware that this issue may not be prioritized or fixed soon.

Cheers,

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d5193351](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d5193351](https://forums.unrealengine.com/u/anonymous_user_d5193351)\
**Post date:** [March 22, 2017, 7:01pm UTC](https://forums.unrealengine.com/t/texture-data-un-serialize-crash-while-openlevel/388215/3 "2017-03-22T19:01:36Z")

</div>

Ed.  
I could not even find a condition to check to prevent the crash, I had to completely disable the feature, even if it would not have crashed in some cases. I’ll welcome any “workaround” ideas.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0c62419a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0c62419a](https://forums.unrealengine.com/u/anonymous_user_0c62419a)\
**Post date:** [March 22, 2017, 7:28pm UTC](https://forums.unrealengine.com/t/texture-data-un-serialize-crash-while-openlevel/388215/4 "2017-03-22T19:28:34Z")

</div>

I currently am unaware of a valid workaround. If I see an engineer update that ticket with additional info I will be sure to post it as a public comment so you can see it on our public tracker.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d5193351](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d5193351](https://forums.unrealengine.com/u/anonymous_user_d5193351)\
**Post date:** [August 18, 2017, 9:57am UTC](https://forums.unrealengine.com/t/texture-data-un-serialize-crash-while-openlevel/388215/5 "2017-08-18T09:57:32Z")

</div>

Hey, it seems to have been fixed in UE 4.17, !
