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"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

4.11 P4 Spawned Actors not Replicating

For some reason, I haven't found this issue by searching for it, so I'm hoping it is just me.

To put it simply, if I place an actor in a level it will show up on the clients, but, if spawned, nothing I do will get it to spawn/replicate. I'm testing with an ultra basic Pawn class.

I've set "Replicates", "Net Load on Client", and "Replicates Movement" (defaults), but nothing I Spawn on the Server ends up on my clients.

alt text

As a side note, the same is happening for variables, as they refuse to replicate even on actors placed directly in the level. I've tested this by setting an Int to replicate on the same Pawn and I increment the Int on the server (works on the server), but the variable never changes on the actor on the clients.

As another side note, I'm getting a GameMode on the server and all clients, which the documentation says should only exist on the Server.

I'm really hoping this is something that can be fixed, because I simply can't make a network multiplayer game at this point.

Product Version: UE 4.11 Preview
Tags:
more ▼

asked Feb 02 '16 at 08:40 PM in Bug Reports

avatar image

krillin6
123 10 10 17

avatar image Ben Halliday STAFF Feb 02 '16 at 09:34 PM

Hi krillin6,

GameMode should only exist on the Server. How are you determining it's on the Client?

Can you give me some step-by-step instructions to reproduce the issue in a new project? I'm not seeing this behavior, but maybe I'm setting it up differently. Use images of your BP setup when appropriate. If it's easier, you can send me a link to a test project, as I asked with the other issue you posted.

Thanks!

avatar image krillin6 Feb 02 '16 at 09:59 PM

Alright. I posted this one in addition to the other issue because I had done more testing. I'm not 100% sure everything in my first post is accurate, but I do know some of it is really weird.

One thing I haven't tried yet is to run my project on another machine, so I may do that later, which is what it appears you might also want to do.

I will attempt to get a link shortly for the project itself, but in the meantime I'll show how I'm seeing the multiple game modes:

alt text

alt text

In addition to those Debug filters, I can set breakpoints and they show up on both client and server, both with Authority, but only the server version knows it is the server. (IsServer returns true on one, but not the other)

avatar image krillin6 Feb 02 '16 at 10:06 PM

Here is the compressed project - running UE4 on Windows 8.1 and the package is 7zip

DC.7z

Should be just under 15MiB.

Also, I tend to be shy, so I might not respond super quickly every time, but I will try really hard for this. Hopefully I can help you guys out with some use cases. For some reason, I often end up breaking things in ways never before seen.

avatar image krillin6 Feb 03 '16 at 02:05 AM

Small update - I decided to run a Verify on the 4.11 P4 Engine. It downloaded a few MB and wants to run the UE4 Prerequisites (x64). Not sure if that means anything or not. I said yes, and it backed up a few files (looks like a few map files [Entry.umap] and [Template_Default.umap] )

I'm really starting to worry that the issue is with my install of the engine. Not sure why that is, though.

Edit: Forgot to add that it didn't change anything.

avatar image Ben Halliday STAFF Feb 03 '16 at 08:29 PM

Well, the good news is that I can see this behavior in the project you sent me, and if I can see it then it's probably not an installation problem (since it's running the same on my engine installation). I also see two instances of the GameMode, and the IsAuthority check seems to be failing for the pawn you dropped into the level. None of this occurs in a new project that I set up to test.

I have some more things to check and I'll let you know what I find. Let me know if you think of anything else that you might have done to reproduce this. Thanks!

avatar image Ben Halliday STAFF Feb 03 '16 at 08:32 PM

Out of curiosity, does the same thing occur for you in a 4.10.2 project, if you set up a project the same way?

avatar image Ben Halliday STAFF Feb 03 '16 at 09:17 PM

Okay, so I've definitely narrowed it down to that Game Mode. I tried recreating it and replacing references, and a new Game Mode doesn't reproduce the problem. Can you do the same, and if it still occurs, give me step by step instructions for how you created the Game Mode? I might be missing a step somewhere. Thanks!

avatar image krillin6 Feb 03 '16 at 11:05 PM

So far, I can say the same thing occurs in 4.10.2 for me (different project, not a copy or anything).

I'll create a new project, and document in more detail exactly what I'm going, but that GameMode I'm using right now is ultra basic. I have a few thoughts on why it might be happening, but I'll have to test and get back later today.

avatar image krillin6 Feb 04 '16 at 04:40 AM

I will have to post my response via file, as I'm 9000 characters over the limit. I'm sure this will be enlightening. Sorry for the verbosity.

Link to current project setup to follow. DC2.7z

Please give it 15 minutes or so, my internet connection is caca.

Detailed Rundown

testing.txt (11.3 kB)
avatar image krillin6 Feb 04 '16 at 09:39 AM

Follow up on further testing:

Everything seems to be ok as long as I disable "Component Replicates" on both Actor Components. That's DC_5x5, and DC_Node.

Looks to me like there is some broken replication going on with Actor Components, maybe?

I just had a thought to try Scene Components instead. If that works, perhaps I'm misusing Actor Components?

Tested Scene Components and same result

Come to think of it, though, I might only really need an array of structs for what I'm trying to do at this point. Now I feel a bit stupid, but hopefully I've found a bug that can be fixed for later.

I find it strange that scene and actor components wouldn't be allowed to replicate, though.

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

1 answer: sort voted first

Thanks for the thorough investigation! Definitely helped narrow this down!

So, first thing, I saw the same problem with timers not stopping on the Server when pausing the simulation with players set higher than 1. I was able to reproduce that in a new project: looks like the Client pauses just fine, but for some reason the Server does not. This doesn't appear to affect actually pausing a game in a packaged game, but is rather simply an editor bug. I've created a report for that (UE-26471) and I'll post here when I see any update on it.

Second, the reason you're seeing a second GameMode and a new Player Controller is because the Client is being disconnected from the Server, thus sending it to its own game (thus a new GameMode and PC). The GameInstance should be the only thing remains when the Client is disconnected (maybe the GameState as well). This would also explain any replication issues after this point: nothing is replicated because the connection doesn't exist.

What's causing the disconnect appears to be the Component Replicates setting on your Actor Components. As you mentioned, disabling those stops this problem. I'm guessing this is because it's actually being set twice: in the component's defaults, and again once when you spawn the component. I'm going to test that scenario in a new project and get back to you with the results.

more ▼

answered Feb 04 '16 at 06:53 PM

avatar image Ben Halliday STAFF Feb 25 '16 at 06:22 PM

As an update, I was able to reproduce the disconnect by Adding an Actor Component that is set to Replicate to an Actor that is also set to Replicate. It's really as simple as that, which is probably what caused all the other issues you faced.

I've entered a bug report for that as well (UE-27454) because it happens in the 4.11 Preview and earlier versions, however I can say that it is already fixed in our internal build and should at the very least make it into 4.12. I entered the bug in hopes that the developers would be able to identify the change that fixed this issue and bring it to the 4.11 branch before release, but I can't guarantee that's possible.

Thanks again for the thorough investigation, it was very helpful in nailing down these two problems. Someone will post here when we see any updates on either.

avatar image Inph1del Feb 26 '16 at 02:18 AM

Glad to see this post I was have the same problem. My project casts a weapon to the character which is set to replicate for its future animations and effects as well.

Bout to turn off the replication to see if it suddenly in breaks the simple initialize health text Etc I followed from one of your tutorials on the ue4 YouTube.

(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