[4.16] Cannot load maps with many sub-levels

Hi,

Our problem is simple enough: We’ve updated to 4.16, and we can’t load our main (and big) levels that contains a lot of sub-levels for streaming (it crashes instantly at 0%), but we can load every single sub-level separately without problem. It worked fine in 4.15.

Just to make sure we understand each other, here’s what we call a sub-level:

139186-sublevel.png

We’ve played around with the problem, and the error seems to be happening when we try to load a level with 30-ish sub-levels, but I don’t think it’s related to the number of sub-levels, since we created a test project and added 128 empty sub-levels and everything worked fine. Basically I can’t find a way to reproduce the error in an empty project. It looks like we have something too big that busts some buffer, but it worked fine in 4.15.

Now here are the errors we get when we load two different levels with a lot of sub-levels.

Our biggest level sends this error:

Assertion failed: ReaderPos + Num <= ReaderSize [File:D:\Build\++UE4+Release-4.16+Compile\Sync\Engine\Source\Runtime\Core\Public\Serialization/BufferReader.h] [Line: 53] 

UE4Editor_Core!FDebug::AssertFailed() [d:\build\++ue4+release-4.16+compile\sync\engine\source\runtime\core\private\misc\assertionmacros.cpp:349]
UE4Editor_CoreUObject!FBufferReaderBase::Serialize() [d:\build\++ue4+release-4.16+compile\sync\engine\source\runtime\core\public\serialization\bufferreader.h:54]
UE4Editor_Core!operator<<() [d:\build\++ue4+release-4.16+compile\sync\engine\source\runtime\core\private\containers\string.cpp:1273]
UE4Editor_CoreUObject!operator<<() [d:\build\++ue4+release-4.16+compile\sync\engine\source\runtime\core\public\containers\array.h:1113]
UE4Editor_CoreUObject!operator<<() [d:\build\++ue4+release-4.16+compile\sync\engine\source\runtime\coreuobject\private\uobject\packagefilesummary.cpp:260]
UE4Editor_CoreUObject!FArchiveAsync2::ReadCallback() [d:\build\++ue4+release-4.16+compile\sync\engine\source\runtime\coreuobject\private\serialization\asyncloading.cpp:6776]
UE4Editor_Core!IAsyncReadRequest::SetComplete() [d:\build\++ue4+release-4.16+compile\sync\engine\source\runtime\core\public\async\asyncfilehandle.h:157]
UE4Editor_Core!FAsyncTask<FGenericReadRequestWorker>::DoWork() [d:\build\++ue4+release-4.16+compile\sync\engine\source\runtime\core\public\async\asyncwork.h:264]
UE4Editor_Core!FAsyncTask<FGenericReadRequestWorker>::DoThreadedWork() [d:\build\++ue4+release-4.16+compile\sync\engine\source\runtime\core\public\async\asyncwork.h:288]
UE4Editor_Core!FQueuedThread::Run() [d:\build\++ue4+release-4.16+compile\sync\engine\source\runtime\core\private\hal\threadingbase.cpp:442]
UE4Editor_Core!FRunnableThreadWin::Run() [d:\build\++ue4+release-4.16+compile\sync\engine\source\runtime\core\private\windows\windowsrunnablethread.cpp:76]

And one of our modestly big level sends this one:

Assertion failed: Ar.Tell() < MAX_SUMMARY_SIZE / 2 [File:D:\Build\++UE4+Release-4.16+Compile\Sync\Engine\Source\Runtime\CoreUObject\Private\Serialization\AsyncLoading.cpp] [Line: 6783] 

UE4Editor_Core!FDebug::AssertFailed() [d:\build\++ue4+release-4.16+compile\sync\engine\source\runtime\core\private\misc\assertionmacros.cpp:349]
UE4Editor_CoreUObject!FArchiveAsync2::ReadCallback() [d:\build\++ue4+release-4.16+compile\sync\engine\source\runtime\coreuobject\private\serialization\asyncloading.cpp:6783]
UE4Editor_Core!IAsyncReadRequest::SetComplete() [d:\build\++ue4+release-4.16+compile\sync\engine\source\runtime\core\public\async\asyncfilehandle.h:157]
UE4Editor_Core!FAsyncTask<FGenericReadRequestWorker>::DoWork() [d:\build\++ue4+release-4.16+compile\sync\engine\source\runtime\core\public\async\asyncwork.h:264]
UE4Editor_Core!FAsyncTask<FGenericReadRequestWorker>::DoThreadedWork() [d:\build\++ue4+release-4.16+compile\sync\engine\source\runtime\core\public\async\asyncwork.h:288]
UE4Editor_Core!FQueuedThread::Run() [d:\build\++ue4+release-4.16+compile\sync\engine\source\runtime\core\private\hal\threadingbase.cpp:442]
UE4Editor_Core!FRunnableThreadWin::Run() [d:\build\++ue4+release-4.16+compile\sync\engine\source\runtime\core\private\windows\windowsrunnablethread.cpp:76]

Side note, I checked the engine source code and next to the line that causes the error these comments are written:

//@todoio change header format to put the TotalHeaderSize at the start of the file
check(Ar.Tell() < MAX_SUMMARY_SIZE / 2); // we need to be sure that we can at least get the size from the initial request. This is an early warning that custom versions are starting to get too big, relocate the total size to be at offset 4!

Any clue on what has changed in 4.16 that would cause this error? Is there any way to fix this? 4.16 has added many features that we absolutely want in our project, so staying on 4.15 would be a huge pain.

Any help would be greatly appreciated, if anyone needs more info/files, we can provide them.

Cheers!

Hi CyanBalloon,

Could you also post the log file from your projects Saved folder?

The Epic ID / Machine ID from the callstack would also be helpful. Just make sure you submit the crash report.

We have the same problem.

Here is my attached callstack of the crash.

Callstack

Here are our IDs:

LoginId:c7a054ba413b1fd0af373d849ea39768

EpicAccountId:97eb77af95544d3c8043e7bd9998b65f

And the crash log: Crash log

Also, we’ve already sent the crash reports.

If you feel like anything else would be useful, we can provide it.

I’ve been researching the crash logs and call stack, but so far I haven’t found any internal reports, workarounds, or a way to reproduce this crash.

Could you get a test project to me that has the issue so I can get an in-house repro?

Sorry about the size, I wanted to create a quick repro project, didn’t really bother to reduce the size. https://we.tl/xuiLDJFLF0

To reproduce the behavior:

  1. Open the project.
  2. Open FirstPersonExampleMap (with no number)
  3. It should crash instantly (at least it does on our side, on two different PC)

Thank you for the project. I was able to reproduce the crash so I’ve created JIRA UE-45563 and our developers will be investigating further. Follow that link to monitor the status of the report.

I wasn’t able to find a workaround for you but hopefully after more digging we’ll find something that might help.

-TJ

Thanks for this, I’m having the exact same crash on my project from 4.15 → 4.16 upgrade too.

It will also have the same crash when doing a packaged build of the game.

As I can see, the problem has been resolved, but it’s written “Target fix: 4.17”. Does that mean that it will not be available until the 4.17 release?

I have to agree with you there, doesn’t seem like a minor bug to me. I’m kind of wondering if it there won’t be another engine breaking bug such as this one that prevents us from using even 4.17.

Using the fix that was commited to github…

This assert is fixed:
Assertion failed: Ar.Tell() < MAX_SUMMARY_SIZE / 2

This other assert is not fixed:
Assertion failed: ReaderPos + Num <= ReaderSize

If you disable event driven loader and async loading thread the second asset goes away.

Is your game multiplayer? And if so, do any of your Level Blueprints contain multicast calls?

Same thing here. The 4.16.2 fix did not fix the ReaderPos + Num <= ReaderSize.

Please fix it with 4.16.2 or 4.16.3 You can’t expect developers to wait for a major release and stop working on projects due to bugs like these.

That seems so and it wouldn’t be good at all. Minor versions should include all bug fixes, otherwise why do they exist in the first place? They fixed the bug already so 4.16.2 or 4.16.3 should have it included. No? Why forcing a major upgrade to 4.17 (and a 3 monhts+ delay on any project) to get bug fixes ?

After some tests using 4.15.x I need to start level design of some large maps and so multiple sub-levels with 4.16.x … BUT if Epic Games doesn’t re-target the bug fix to 4.16.2 I can’t. And if I use 4.15.x I don’t get new features and bug fixes on packages bought on the marketplace either.
This is not a minor bug. It prevents using level streaming. They fixed it. So why is not targeted for inclusion in upcoming 4.16.2 hotfix release ?

Now they changed the status for merging the bug fix “Target Fix 4.17, 4.16.2”
As soon as 4.16.2 gets released and hoping no more critical bugs we should be able to commence project work with UE 4.16.2 … otherwise it would have been a serious problem being forced with 4.15.x due to the fact that practically almost all marketplace assets don’t get bug fixes and new features for previous releases but just for the latest one.

I just want to add some weight to this. I’ve just converted our project from 4.13.2 to 4.16.2 and am getting the same assert and crash on ReaderPos + Num <= ReaderSize.

The whole game lives in one level that contains multiple sub-levels and streams landscape tiles.

A prompt fix for this would be most appreciated, otherwise we’ll have to go with 4.15 instead.