# How to avoid EnsureCanStreamBulkData in 5.1?

**URL:** <https://forums.unrealengine.com/t/how-to-avoid-ensurecanstreambulkdata-in-5-1/725565>\
**Category:** Mobile\
**Tags:** unreal-engine, question\
**Created:** [December 10, 2022, 9:38pm UTC](https://forums.unrealengine.com/t/how-to-avoid-ensurecanstreambulkdata-in-5-1/725565 "2022-12-10T21:38:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RyuMaster](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RyuMaster](https://forums.unrealengine.com/u/RyuMaster)\
**Post date:** [December 10, 2022, 9:38pm UTC](https://forums.unrealengine.com/t/how-to-avoid-ensurecanstreambulkdata-in-5-1/725565/1 "2022-12-10T21:38:52Z")

</div>

Hey!

In order to manage memory efficiently, I am loading textures for my large 2D map with soft pointers, and when users scrolls the map, I am unloading them from memory.

This worked under UE4, but now I am triggering “EnsureCanStreamBulkData”

There is extenstive explanation for it inside source code:

/\*\*

- Triggers an ensure when trying to stream inline bulk data. This is to prevent
- inconsistencies between the Zen loader loading from I/O store (utoc/ucas) and the legacy EDL loader using
- the file system (.pak). The Zen loader currenlty does not allow reloading of inline bulk data.
- The trigger can be ignored by setting [Core.System]IgnoreInlineBulkDataReloadEnsures to true in the config file.
- Ignoring this ensure will most likely break loading of bulk data when packaging with Zen/IO store (.utoc/.ucas).  
\*/

What options do I have here? I do not want textures to stay in memory, because my map is very large, I need to unload them somehow 0\_\_\_0

---

<div class="post-metadata">

**Author:** ![Vulkanic\_Anton](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Vulkanic\_Anton](https://forums.unrealengine.com/u/Vulkanic_Anton)\
**Post date:** [December 15, 2022, 8:51pm UTC](https://forums.unrealengine.com/t/how-to-avoid-ensurecanstreambulkdata-in-5-1/725565/2 "2022-12-15T20:51:22Z")

</div>

I’m getting the same error when I try to read data from texture.

> FTexture2DMipMap\* Mip0 = &AreasMap-\>GetPlatformData()-\>Mips[0];  
> FByteBulkData\* RawImageData = &Mip0-\>BulkData;  
> const FColor\* PixelData = reinterpret\_cast\<const FColor\*\>(RawImageData-\>Lock(LOCK\_READ\_ONLY));

Everything works just fine in the editor but in a packaged build I’m getting blank color data.

---

<div class="post-metadata">

**Author:** ![SilvRO](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/silvro/32/649998_2.png) [@SilvRO](https://forums.unrealengine.com/u/SilvRO)\
**Post date:** [May 10, 2023, 8:49am UTC](https://forums.unrealengine.com/t/how-to-avoid-ensurecanstreambulkdata-in-5-1/725565/3 "2023-05-10T08:49:35Z")

</div>

I have the same error with Blueprint (Add Runtime Candidate Image, for AR session)
