Level Blueprint actor references invalid after servertravel

Using 4.17.1, when hosting a listen server, having one more separate client connecting to it atleast, servertraveling to another map and back to the same one will have invalidated level blueprint actor references.

In the level im testing this, im using a simple trigger volume to teleport a player stepping into it to a target actor location. After servertravel, instead of teleporting to the usual target actor location, all trigger volumes now teleport the player to world origin 0 . 0 . 0

Im using the “target actor” as a location marker for the teleports, they work great untill servertraveling.

I have not yet tested this out in a new project, but will do so when I get time.

If there are NO other clients connected besides the hosting client, this bug does not happen on servertravel, there has to be atleast one more connected client(s).

So far im only finding this bug in levels updated from earlier UE4 versions, new levels don’t seem to have this bug. This bug affects all actor references in those maps Level Blueprint’s.

have you tried saving that location reference to the game instance and then loading it back into the level script once servertravel is complete?

Greetings, and thanks for your reply.
I tested this out just now, and it still teleports the player to world origin 0.0.0

I created 3 new trigger volumes, and 1 new target point actor.
Volume 1 teleports to the target point actor, Volume 2 reads the saved reference from the game instance and teleports to that actor location, and Volume 3 saves the target point actor reference into the game instance.

After servertraveling to a different map and back again, nither of the teleporters work.
My emergency workaround is currently to replace ALL use of the level bp’s as they are non functional at this point, and instead rewriting all functionality into actor classes…

Hey MADHOUSE,

Sorry for the extended delay on this. Are you still seeing this issue? If so, would you be able to provide a project that I can convert up to 4.17 to experience the issue, as like you stated I’m unable to see this behavior in a clean project currently.

Any information you can provide would be great.

Thanks!

I am not a MADHOUSE, but I am experiencing this issue.

Update way to reproduce

  1. Enable seamless travel in game mode.
  2. Create level with any actors you want.
  3. Use actors from the level as references in level blueprint. For example, print to logs are they valid or not on level tick.
  4. Create Actor reference Variable in your level Blueprint, and mark it as Replicated.
  5. Save the map.
  6. Launch two game instances on this map. One is listen server, one is client.
  7. Call a seamless level restart. (i ve done it by AGameMode::RestartGame)
  8. Your actor references in level blueprint will be invalid.

Engine version was 4.16

Reason is one of my actor reference variable in level blueprint marked as Replicated. It brokes everything in level blueprint


UPD:

I’ve simplified my level as musch as I can, and this issue was fixed. Now I will try to compare what was wrong with my blueprints, or objects on the level.

Do not check it right now. I will check it by myself and write results.


UPD2:

One of my actors in level blueprint was marked as Replicated.
After I clear this flag references started to work!
I’ve updated steps to reproduce according to this


UPD3
For first level load (Server with client configuration)
ReinstanceHelper->UpdateBytecodeReferences(); (Kismet2.cpp)
is called

for second load it was skipped.

MADHOUSE, It’s known issue appeared in 4.16.
There is a patch already, hope it will be add to the new Unreal Engine.
For now as a workaround delete all Replicated variables and Network calls from your level blueprints.

Reason is that network objects (your level script is one of them, if contains replication) have different destroy rules, so their old versions are still in memory after level reload. So their blueprint wasn’t regenerated and still reffers to old objects.

Hey MADHOUSE,

I’m marking this topic as resolved for tracking purposes, as we haven’t heard from you in a few days. If this issue persists, feel free to respond to this thread. For any new issues, please create a new Answerhub topic.

Have a great day

Yes you where correct! This should be fixed by now. My workaround was to reimplement everything I had in the level BPs into BP actors instead, which is probably how I should have done it in the first place, making things more modular and much more easy to edit and reuse. ^^
Sry for the late reply.

This BUG is relevant for 4.19.2. Is there a ticket for this?

Can you supply a link to the patch or issue, if you have it? It will be really helpful to see if we have it in our Engine version.

This is still happening in 4.20.2

I don’t remember when they fixed it sry, but I think it was mentioned in the patch notes at some point

Yeah I can confirm that. Not tested it yet with 4.20.3.
Should probably not use level BPs but create placeable bp actors instead. (Thats how I had to solve it the last time :F )

This thread covers what I think is the same issue and provides an engine change that fixes it.

I was able to integrate their patch by combining the patch diffs with some of the other things they discussed that were wrong with it. So far, the final product is working (with replication still enabled in our level blueprints). I’m attaching a diff of the final product that has worked for me here.

Cheers,