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"

[Bug][4.15] Client Load Level Instance Kicks Client

Whenever a client tries to stream a level in 4.15, the client is kicked from the host and loads the default loading map.

Replication: Start a new 3rd person blueprint project, create a new level, add the level to the sub-level list, make the new level current, create a single mesh in the new level for proof of loading. alt text

Add the following code: alt text

Play game with 2 players, or 1 and dedicated server. When the client loads the level, they are immediately kicked.

Loading on the server does not replicate to the client, and obviously manually streaming this causes a kick.

alt text Please advise.

Product Version: Not Selected
Tags:
more ▼

asked Mar 13 '17 at 12:44 AM in Bug Reports

avatar image

AGPStudios
24 2 3 8

(comments are locked)
10|2000 characters needed characters left

4 answers: sort voted first

Not a bug, Security Feature

I am the author of that node that is in the engine, contributed via github: https://github.com/EpicGames/UnrealEngine/pull/2320

It is not a bug, UE4 has code to prevent a client from loading a level that the Server has not loaded first. Presumably this is a security / cheating management decision, present in PlayerController.cpp

Solution

To work around this, you just need to always load the level instance on the server first, with the exact same name.

Request

I wish this security feature was optional, it makes certain aspects of dynamic level generation more complex/less stable because if there is even a slight timing difference, the client can get dc'ed making this anti-cheat feature reduce overall capability of UE4 to be handle dynamic worlds without the developer having to worry about the chance of a client getting dc'ed

The code is so embedded so as to prevent cheating that it is also impossible to work around.

As with all major engine decisions, it would be great if we as the developers had more control so that UE4 can play its role as dominant awesome engine of the world even better.

Rama

PS: This is in regards to https://issues.unrealengine.com/issue/UE-43726

More in-depth explanation of solution:

  1. UE4 will kick client if client tries to load a map with a name that is not in the server list

  2. Solution is therefore to ensure that server loads the map instance with that exact name before the client does, even if it is only by a moment

  3. Therefore, if client wants load level instead of server just doing stuff automatically

  4. Have client call the server to ask server to load it and rep that function to then load on the client with exact same name knowing it will be after the server loaded it :)

Rama

more ▼

answered May 25 '17 at 10:32 PM

avatar image

Rama
10.6k 446 343 1085

avatar image AGPStudios Jun 02 '17 at 09:51 PM

Hey there Rama, I've tried reproducing your workaround, however I was unable to have the client remain present.

I've run this top down as the server loads the map, and then the client is notified when it's loaded, even after a delay to the same result.

alt text

avatar image Ultium Sep 08 '17 at 01:46 PM

Any news ? The problem is describe in this post PlayerController.cpp line 317 : (World->StreamingLevels[i]->GetWorldAssetPackageFName() == InPackageName ) I can not find any fix for this issue :'(

avatar image Snufx Dec 13 '17 at 04:44 PM

Hi, Got the same problem on 4.18.2 I also did try to do what Rama say but i end with deconection or nothing display on clients. =/ No one have a working 'temp' solution to share ? Thanks

avatar image Fredrum Apr 26 '18 at 09:59 PM

Lucky I found this thread as I was struggling to figure out why my client player kept not working when I introduced more lag. I am doing 'LoadStreamLevel' but it seems the symptoms and fix works the same for that so maybe their behaviours are the same. This has taken me three days to figure out, trying this and that. It would have been good if this was mentioned in the Blueprint documentation.

avatar image ridley075 May 05 '18 at 01:14 AM

How was this solved? Fredrum can you go more in depth, show some blueprint code you were able to come up with that solves this? I'm getting same result as AGPStudios.

avatar image Fredrum May 07 '18 at 05:23 PM

Hi! I don't think showing my actual blueprint would help much as it is a bit particular to my case. Basically I just set up a 'report back' system where the server set a checking variable that was replicated down to the Client/Remotes GameInstance (so its persistent) and then i have a little loop (sorry) that halts the process until it detects this variable is set which means that the Server is ready and coast is clear for Remote to continue loading the instance/stream.

avatar image ridley075 May 08 '18 at 02:36 AM

How do you know when the level is loaded? I've found get streaming level, but I don't know how to get the package name for an instanced level. It doesnt seem to match the name of the tile, what is the package name exactly? I've seen references of a direct path, like /Game/Maps/etc... is that correct?

avatar image Fredrum May 08 '18 at 02:38 AM

It might not work for your case but I'm setting a 'MapID' from BeginPlay of the Map that I'm streaming/instancing in. But on the GameInstance as I mentioned.

avatar image AGPStudios May 07 '18 at 02:23 PM

I just checked the bug tracking on this, and it has been changed to "Won't Fix". https://issues.unrealengine.com/issue/UE-43726

avatar image IUMTEC May 07 '18 at 03:20 PM

Here my solution : ZeroBin Link Tell me if it work for you.

(comments are locked)
10|2000 characters needed characters left

Hello AGPStudios,

Thank you for reporting this issue. I've reproduced this issue and entered a bug report for it. You can find / track the report here: UE-43726

more ▼

answered Apr 06 '17 at 03:05 PM

(comments are locked)
10|2000 characters needed characters left
more ▼

answered May 08 '18 at 01:18 AM

avatar image

AGPStudios
24 2 3 8

avatar image ridley075 May 08 '18 at 02:33 AM

Thanks so much, this is what I was looking for, thanks!

(comments are locked)
10|2000 characters needed characters left

So I was having this issue with a level loading system and the solution was to use the node "Load Stream Level" instead.

more ▼

answered Apr 27 '19 at 02:04 PM

avatar image

deathclonic
65 11 17 19

(comments are locked)
10|2000 characters needed characters left
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