Never Stream crash

Hi!

We’ve encountered an issue related to texture streaming that results in a crash on both Android and iOS platforms. We have a cutscene with a close-up camera fly-by, as the camera passes a specific object, its texture is streamed in, which causes a noticeable visual pop. To address this, we tried setting the NeverStream flag on the texture. However, after doing so, the application crashes on both platforms just after opening the level that contains the modified texture and the cutscene:

libUnreal +0x13d20f54 UTexture::GetResourcePostInitState (Texture.cpp:1686) libUnreal +0x13d238f4 UTexture2D::CreateResource (Texture2D.cpp:1044) libUnreal +0x13d1e578 UTexture::UpdateResource (Texture.cpp:318) libUnreal +0x13d22ca4 UTexture2D::UpdateResource (Texture2D.cpp:746) libUnreal +0x0df15078 UObject::ConditionalPostLoad (Obj.cpp:1269) libUnreal +0x0dd2bd0c FAsyncPackage2::Event_DeferredPostLoadExportBundle (AsyncLoading2.cpp:6912) libUnreal +0x0dd20618 FEventLoadNode2::Execute (AsyncLoading2.cpp:4319) libUnreal +0x0dd20618 FAsyncLoadEventQueue2::PopAndExecute (AsyncLoading2.cpp:4460) libUnreal +0x0dd2d91c FAsyncLoadingThread2::ProcessLoadedPackagesFromGameThread (AsyncLoading2.cpp:7158) libUnreal +0x0dd324c0 FAsyncLoadingThread2::TickAsyncLoadingFromGameThread (AsyncLoading2.cpp:7420) libUnreal +0x0dd386b4 FAsyncLoadingThread2::ProcessLoadingFromGameThread (AsyncLoading2.cpp:8567) libUnreal +0x0dd3c148 ProcessAsyncLoading (AsyncPackageLoader.cpp:314) libUnreal +0x0e0af090 StaticTick (UObjectGlobals.cpp:816) libUnreal +0x12f7ca54 UGameEngine::Tick (GameEngine.cpp:1719) libUnreal +0x148bd9c0 FEngineLoop::Tick (LaunchEngineLoop.cpp:5819) libUnreal +0x148b67f0 AndroidMain (LaunchAndroid.cpp:613) libUnreal +0x148c5d00 android_main (LaunchAndroid.cpp:859) libUnreal +0x148ee6d4 android_app_entry (android_native_app_glue.c:226) libc +0x000e6a00 <unknown> libc +0x00084c6c <unknown>

We’d like to know if using the NeverStream flag is the correct approach for preventing streaming during such cutscenes, or if there’s a recommended alternative. Also, could this crash be caused by an incorrect setup on our end? Any guidance would be appreciated.

Best regards,

Daniil

Hi Daniil,

We’ve attempted to reproduce a level with a NeverStream’d texture against stock 5.3 and did no see the crash on level load. We set the NeverStream flag under the texture’s settings Advanced -> Never Stream in editor. Are you able to share a repro project or more details on where the crash is occurring if you can catch it in debugger?

Best regards.

Hi Stéphane,

I’ll try to reproduce the issue on stock 5.3 and/or provide more details this week.

By the way regarding the question: using NeverStream is the right thing to do to avoid popping, right?

Best regards.

Hi Daniil,

It should be the correct thing to force pre-streaming and void camera cut related artifacts, but can’t say 100% without seeing the visual pop in question.

Best regards

Hi once again!

I’ve finally got an update on this: I’ve ended up not trying to repro this on stock engine but figured out the issue with our modified one. It’s the difference in the TextureLODGroup setting during cooking and on the actual device, we have MaxLODSize set to 2048 while cooking and 1024 on the device (although it’s still 2048 for some other devices), and this difference causes ExpectedAssetLODBias to be non zero in Texture.cpp:1678 which leads to failed check expression few lines below.

So it seems that for textures with steaming checkbox disabled we have to have zero ExpectedAssetLODBias by design. Could you please clarify if I’m right about that?

Best regards,

Daniil.

Hi Daniil,

It appears the failing check in question may be invalid as it has been removed since 5.3. https://github.com/EpicGames/UnrealEngine/commit/3103c95bcca895f86404edb66c1dfab873be11aa

Best regards.

Hi [Content removed]

Thanks! Then we’ll just do a temporary fix until we do an update and after the update it’s most likely to work as expected. Thanks once again.

Regards,

Daniil.

You’re very welcome Daniil,

Please circle back to this case should the problem not be resolved post update.

Best regards.

Hi Daniil,

Additionally, UEngine::AddTextureStreamingLoc could be used as an alternative to Never Stream to avoid permanent usage of memory for the popping texture in question.

Best regards.