"LinkerRoot is null" when using external actors with sublevels (PIE)

Good morning,

our project uses Unreal 5.2 (originally upgraded from 4.26) and we’re using sublevels (no world partition) in combination with external actors. Recently, I recognized crashes in PIE that are related to loading external actor assets of actors that belong to a specific sublevel (though I can’t rule out that other sublevels are affected).

I hope that someone is able to help us narrow the issue down (or maybe even encountered this issue before and knows the solution to the problem – besides disabling external actors for the affected sublevel).

Before the crash, the sublevel is loaded via a level streaming volume. At some point after that (or even at that point), I get Couldn't find file for package (LogStreaming; AsyncLoading.cpp:6235) errors in the log. Digging down using a debugger, it tries to load the asset file using a PIE-path (.../UEDPIE_0_...), which of course can only fail. However, it doesn’t crash here. I also can imagine that this error log is not directly related with the crash, however it’s important to mention it as it might be related and the affected asset files (external actor files) are the same.

The actual crash happens due to a check in UObjectGlobals.cpp:1688. I don’t know too much about the linker to fully understand all the code happening in Linker.cpp, but I assume that FLinkerLoad::CreateLinker somehow returns a linker with a null LinkerRoot. However, it’s very hard to debug it because the whole code is essentially wrapped inside a “Do-Once”, because the function first tries to find a Linker if it exists.

Funnily enough, the affected external actors are mostly standard StaticMeshActors without any references or anything. Just drag-and-drop StaticMeshActors.

Since the crash happens now and not earlier, I suspect that something in our files changed. Recently, one of our artists changed the content of those levels, it’s possible that some accident happend (e. g. a save within a PIE session, a wrong button press, …). It’s also worth mentioning that disabling external actors for this one sublevel seems to “fix” the issue, but of course this has stronger implications for our work (Edit: Converting this sublevel to internal actors resulted in another sublevel showing the same crashes).

I also tried converting the level to internal actors, saving to get rid of the external actor files, then converting it back to external actors. However, the results are the same, still crashes.

Thank you for reading this far

Details in a few words:

  • UE 5.2, no world partition, external actors
  • Windows 11, but also reported on Windows 10
1 Like

Some more details (and potential “fix” for others that run into the same issue):

It seems to be a race condition of some kind.

It’s important to note that external actors without world partition are experimental! That means that most things work (I rarely found any issues), but this thread exists for a reason.

It’s possible to “reduce” that issue. In our case, I wasn’t able to reproduce that crash at all after that change, but it’s possible that you can’t use this fix in your project, so be careful.

The “fix” is to increase the Min Time Between Volume Unload Requests in the levels window. This has some other side effects you have to consider, but in our project it seems to work (we increased from default 2s to 10s).

I write “fix” because it’s not really a fix, I think. The proper fix will be when Epic fixes the issue in code with an update (it’s possible that it’s already fixed in 5.3, but idk).

I hope this helps someone else, too.