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"

uint8 Doesn't Replicate / Trigger OnRep function if Zero

This seems like it should be a bug, but it may be intentional so posting here just in case. This issue effects a LOT of UE4's replication, especially serialized rotators. In my case it affects quantized floats.

Essentially, if a Replicated uint8 is changed on the server to be zero from a previous value - it either doesn't replicate to clients, or it doesn't trigger the OnRep function on a client.

To get around this, I have had to add a value of '1' to my packed uint8, and remove it again on the client side. This instantly fixes the problem - but of course this limits some of the useful range of the uint8, so this needs to be resolved.

Product Version: UE 4.10
more ▼

asked Nov 20 '15 at 10:06 PM in Bug Reports

avatar image

820 60 97 140

avatar image Sean L ♦♦ STAFF Dec 07 '15 at 07:11 PM


Could you please provide the code that you are working with so that we can attempt to reproduce this issue?

avatar image TheJamsh Jan 01 '16 at 12:41 PM

Hi Sean,

Apologies for the delay. I have attached the code I am working with. The comments should show how to reproduce the issue. It's possible I believe to modify ShooterGame to see the issue. Unfortunately it's quite hard to provide an example in this case!

link text

sauce.txt (5.7 kB)
avatar image Ryan Gerleve STAFF Apr 29 '16 at 03:19 PM

Hi TheJamsh,

I took a look at UE-11876, but I think it's actually unrelated to this issue. Based on the attached code, OverheatData is being modified in the OnRep function. Any modification of replicated variables on a client can cause problems with future replication of that variable, as well as OnReps, since it throws off the server's assumption about what value the client has.

I would recommend trying to refactor the OnRep function to not modify OverheatData. Granted, I'm only looking at this small snippet, but it looks like it should be possible to use OverheatData to update HeatProgressRatio without writing to OverheatData. Let us know if this fixes the issue!

avatar image TheJamsh May 16 '16 at 03:52 PM

Hey Ryan,

Thanks for looking at the code, I will go through and check it again based on your advice.

Out of interest then, does this mean that the Server uses the OnRep functions itself to determine what it thinks the client currently has? Or does the Client send it's version of the variables to the server to validate them - and the server then decides whether to send the values out or not?

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

1 answer: sort voted first


I have investigated this issue further, and have discovered that this is a known issue in our system with OnRep functions not firing on the client (UE-11876).

Have a great day

more ▼

answered Jan 05 '16 at 06:23 PM

avatar image

Sean L ♦♦ STAFF
43.5k 485 152 442

avatar image TheJamsh Jan 22 '16 at 10:09 AM

Thanks Sean,

I don't suppose you'd be able to provide the details for that case so I can avoid those issues for the meantime could you?


avatar image sds-michael Jan 25 '16 at 05:41 AM

I would really like to know the answer to this as well. This is a pretty major issue and a C++ hotfix or workaround (even if just some code pasted into an answer from an Epic engineer) would be really helpful.

avatar image Sean L ♦♦ STAFF Jan 25 '16 at 02:32 PM

This issue is still being investigated by our developers, and there is currently no timeline for when a fix will be released. I will be sure to provide updates regarding this issue as they become available.

(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