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"

Editor Crash when loading 1001st Streaming Level Instance

[Version 4.12.5]

While working on an endless runner prototype where my Tiles are created as Streaming Levels, I ran into a supposed hardcoded limit for Streaming Level Instances.

I can add (exactly) 1,000 streaming levels this way:

crash_1001

But the 1,001st results in a crash.

Some observations:

  • only levels that were at one point set to ShouldBeLoaded = true count towards the limit.

  • it doesn't matter how many levels are visible/loaded at a given time.

  • setting the "bIsRequestingUnloadAndRemoval" (in C++) makes no difference.

  • log file output:

    [861]LogWindows:Error: === Critical error: === Fatal error: [File:D:\Build\++UE4+Release-4.12+Compile\Sync\Engine\Source\Runtime\CoreUObject\Private\Serialization\AsyncLoading.cpp] [Line: 2181] LoadPackageAsync failed to begin to load a package because the supplied package name was neither a valid long package name nor a filename of a map within a content folder: ''

Not sure if 1000 is the allocation limit for the internal array of level instances, maybe it is changeable in the settings? If there was a way to assign a new map to an existing instance, I could reuse those, but I do not see such an option.

Product Version: UE 4.12
Tags:
1001crash.jpg (107.2 kB)
more ▼

asked Jul 28 '16 at 07:16 PM in Bug Reports

avatar image

Cpt.Trips
107 2 10 20

avatar image Adam Davis STAFF Jul 29 '16 at 03:11 PM

Hi Hoaxx,

  • Can you post your crash logs so I can take a look? They can be found at \Unreal Projects\PROJECTNAME\saved\logs\

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

  • What steps can I take to reproduce this on my end?

avatar image Cpt.Trips Jul 29 '16 at 06:29 PM

Hello Adam,

Can you post your crash logs so I can take a look?

I'll attach them to this comment.

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

Clean project. I'll attach that as well (I have excluded the Intermediate folder to save bandwidth).

What steps can I take to reproduce this on my end?

To reproduce in a blank project:

  1. create a level (in my case I added only a simple sphere to it to help visualize);

  2. drag that level to the "Levels" window under your persistent level;

  3. In persistent level's LevelBlueprint (or anywhere else really) create event that loads the level from 1. the way seen on the screenshot in the first post
    (i.e. CreateInstance with GetStreamingLevel(path to map) as Target and a unique id as name, set ShouldBeLoaded to true);

  4. Execute event from 3. 1001 times (e.g. on a timer).

To reproduce the issue In my attached project, make sure "map_Main" is the selected persistent level, all code is in it's level blueprint (timer set on BeginPlay, all code executed in the timer's event). No further steps required, play and it should crash right after it sets the 1001st instance to be loaded (CreateInstance->ShouldBeLoaded true). It crashes out of scope of any particular blueprint node (I am therefore assuming it crashes while loading the level in the engine code).

Project Folder Logs Folder

project.rar (1.0 MB)
logs.rar (71.5 kB)
avatar image Adam Davis STAFF Aug 01 '16 at 07:37 PM

Hi Hoaxx,

I've been running a number of tests on my end, and have found that the error in question seems limited to your test map. Try creating a new sublevel and spawning instances of it. Do you see the same error?

avatar image Cpt.Trips Aug 01 '16 at 09:41 PM

Hi Adam,

First some more observations, later I'll address your suggestions. Sorry in advance for the amounts of text, I'm pretty bad at keeping it short.

One major thing I just noticed: The issue is less evidently noticeable if the ue4 window is not in focus. That is because as the loading slows down while in background (which I assume is normal behavior) way more instances can already be created than actually loaded.

To observe the issue more clearly, the best place to count the instances would be in an OnLevelLoaded event. I have tried exactly that on my end with the conclusion that the critical number still is 1,000, even though there can be way more instances created than that (but not yet loaded).

In essence: I can create any number of instances, but only have 1,000 get loaded.


I have recreated this issue numerous times at this point. Isolated the problem from a complex project and moved just the basic functionality to a clean Third Person template and finally put together the clean project I attached in the previous post, which was void of almost any additional debug measures.

The map that's being instanced is a plain new level with just a sphere added there for me to be able to see if the assets actually are being loaded (as pointed out, if the instances are created but never loaded, the crash doesn't occur).

Anyway, following your suggestion I have created a new, completely empty, sublevel in the project I attached before, and spawned 1001 instances of that map instead, with the same result - crash right after the 1001st instance is set to ShouldBeLoaded=true (i.e. a thousand instances works fine, any more results in a crash - it is this exact number, every time).

PS: if hardware is a concern, my system is more than capable at handling anything of that sorts with ease (i7-5820K, 32GB Ram, 2GB Gfx card, SSD drive), additionally I've been able to test the issue on a secondary system with the exact same results.

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

2 answers: sort voted first

Update: issue was caused by using the Format Text node to build the string used as the unique instance name.

Solution: Avoiding FText and using FString without conversion instead solved the issue.

more ▼

answered Sep 08 '16 at 05:38 PM

avatar image

Cpt.Trips
107 2 10 20

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

Hi Hoaxx,

While I was not able to reproduce the error outside of your provided project, I was able to do so with the project given. I have logged a report for it here. You can track the report's status as the issue is reviewed by our development staff.

more ▼

answered Aug 02 '16 at 02:04 PM

avatar image Cpt.Trips Aug 02 '16 at 02:43 PM

Hi Adam,

Would you be able to post an overview/screenshot of your setup, or the project files where the issue does not occur?

There has to be some form of difference, which could narrow down the issue further.

avatar image Adam Davis STAFF Aug 02 '16 at 04:54 PM

I remade the core functionality that reproduces the crash in your project. The only major differences being that I did not have the format text plugged into the unique instance pin, and on Get Streaming Level I manually typed in the map name instead of getting it from an asset path. Having said that, I had attempted both of these to not success in previous iterations, so unfortunately I am not certain what the major difference is. The best thing to do is to keep an eye on the public bug tracker link above for a fix/update.

avatar image Cpt.Trips Sep 03 '16 at 04:56 PM

Hi Adam,

I've been able to track down the cause of the crash to a single node.

It is indeed the Format Text node (plugged into Create Instance).

If for example I replace it with Append String or Integer To String the crash does not occur.

It is still a crash bug, but related to text allocation as it would seem.

avatar image Jamie Dale STAFF Sep 08 '16 at 02:11 PM

Using the localisation system means you get localised and pretty number formats, so it eventually generates a map name that looks like this: /Game/Maps/UEDPIE_0_instance_1,000

That's not a valid name, so you should use a non-localised way to append the number to the string.

avatar image Cpt.Trips Sep 08 '16 at 05:31 PM

Hi Jamie, I was not aware that I was using any localization features, thought I was just building a formatted string.

I now have read up in the docs, where it says "FText does not offer any mutation functions, because making changes to display strings is a very unsafe operation." - I reckon that this is related to my crash?

Anyhow, I'll have to research more about when and how to use FText, but that is a matter for another topic, I guess.

(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