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"

Crash when levels containing speedtrees get streamed out


We've setup our level using the world composition system. As we move around levels get loaded and unloaded. If a level that has a speed tree in it is unloaded we get a crash on the render thread in FScene::UpdateSpeedTreeWind.

The problem seems to be that a UStaticMesh can be GC'ed before the UStaticMeshComponents that use it are GC'ed. Because the speed tree wind data is only cleaned up by the UStaticMeshComponent::OnUnregister, if the UStaticMesh is GC'ed before the component it seems possible that the render thread can wake up and try to update the speed tree wind data that is now referenced by a dead UStaticMesh pointer.

I've currently fixed this by putting an instances of each of our speed trees under the ground in our persistent level, so that the UStaticMesh object never gets GC'ed.



Product Version: Not Selected
more ▼

asked Dec 15 '14 at 03:10 AM in Bug Reports

avatar image

95 8 10 33

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

1 answer: sort voted first

Hi Ryan,

I've tried to reproduce this but have not been able to to get a crash with this. In my test setup everything loads and unloads properly for the levels.

Here is my setup. Let me know if I'm missing something or not doing it the same and I'll adjust to your method and see if I can get the same issue.

  • I have a persistent level and 2 sub levels (Level 1 and Level 2)

  • In my Persistent I only have a platform for my guy to stand on

  • Level 1 is loading in floor and nothing else

  • Level 2 is loading in the SpeedTree asset (Used the broadleaf desktop from the free SpeedTree sample pack)

  • I have the Level BP set on start to load in Level 1, then unload after 5 seconds, load in Level 2, then unload after 5 seconds, and repeat this process a couple of times.

  • I also have the load and unload level tied to a key press toggle for loading an unloading each level independently.

This is the gist of my setup. Is this how you've set yours up as well?



more ▼

answered Dec 15 '14 at 09:04 PM

avatar image

Tim Hobson ♦♦ STAFF
48.8k 887 101 878

avatar image LuaChunk Dec 15 '14 at 10:24 PM

If you only have one speed tree placed then it shouldn't cause a crash. You'll need to put lots of speed tree instances down so that there's lots of UStaticMeshComponents in the level for the one UStaticMesh object. If the UStaticMesh gets garbage collected before the UStaticMeshComponent and the render thread tries to render them, then it should crash.

Also, the speed tree needs to have wind data associated with it. Make sure your trees a animating with the wind :)

So for the crash to trigger it will be a combination of garbage collection happening post stream out and it randomly GC'ing the UStaticMesh before any of the UStaticMeshComponents and the render thread trying to update the speed tree wind data before the rest of the UStaticMeshComponents being GC'ed.

avatar image Tim Hobson ♦♦ STAFF Dec 17 '14 at 03:32 PM

Hi Ryan,

I've gone back and tried this again still with no crash. I've used my level streaming test scene and placed ~1500 SpeetTrees along with testing with and without the directional wind source to add the effect to my trees.

Are you able to make a small test project as an example that crashes. I would like to test on my end and see if there is a repro for this.

Since I'm not able to get a crash (at the moment with this) can you attach your crash logs and dmp (Your project folder > Saved > Logs) and a copy of your call stack from crash reporter in a text file?



avatar image LuaChunk Dec 18 '14 at 12:06 AM

Hi Tim,

I've attached the crash stack, dump file and log file. The stack was to big for a comment so I had to put it in a file.

Also, I noticed when I reproduced the crash to get the crash stack that I had to run the game standalone. i.e. UE4Editor.exe submerged -game -log

Running the game in the editor window didn't reproduce the crash. Something else to try with your test level.



link text

logs.zip (89.0 kB)
avatar image Tim Hobson ♦♦ STAFF Dec 19 '14 at 03:58 PM

Hi Ryan,

Thanks for that tip! I'm trying to nail down an exact repro. While I was able to get the crash in a previous project I had already setup level streaming with. When I just tried to re-test in a completely new project I'm not getting the crash. I'm trying to figure out where I've missed a step or if something else is going on. I need to get a clear repro and make sure all my steps are in line to get a good bug report submitted so the developer can repro themselves.

Thank you for the logs. I'll update you once I've got this finalized and submitted.


avatar image LuaChunk Dec 20 '14 at 12:41 AM

Great! Thanks, Tim.

avatar image Tim Hobson ♦♦ STAFF Jan 21 '15 at 07:30 PM

Hi Ryan,

Apologies for the delayed response here. The JIRA for this issue is UE-7977.

I'll update this post once a fix has been submitted and verified.

Thank you!


avatar image joshezzell Feb 26 '15 at 12:28 AM

Any change on this? This is a crucial fix that our team requires in order to release our game around April.

avatar image Tim Hobson ♦♦ STAFF Feb 26 '15 at 09:23 PM

The target fix is 4.8, but this is not definitive at the moment until a fix has been submitted. When a fix has been submitted I will be sure to update the post here.

Thank you!


(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