Instance editable overrides RepNotify variable on network client join ONLY WHEN

So iv’e been battling with what the hell was going on, and i finally isolated what is happening, and how to reproduce the error, or is it intended behaviour?

Tested with boolean only so far.

The bug is:
When client joins server, replicated variables are replicated as they should, but after that:
On Actor a boolean variable that replicated is also set to be Instance Editable AND HERE IS THE CATCH, if the bool is not in “default” state(Oposite state in level then in blueprint), then the Instance Editable state from Level state will be applied overwriting RepNotify state.

Thus making the variable out of sync from the server.
Example video to show it happening: Instance editable overwriting RepNotify state Unreal engine 4 bug example - YouTube

IN CASE this is intended behaviour please notify me.

Hello,

We’ve recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.

https://epicsupport.force.com/unrealengine/s/

Thanks

I am not sure if it is a bug, i tried listing over the documentation, and didn’t figure out what’s the ordering of operation, and if this is intended behavior. But as to seeing no help here, i will post on your link tommorow, gotta go to work. Ty tho, good to see the post is not lost.

The OnRep function is only called if the Server believes the client is out of sync. The instance variable you set to false and the server sets the variable to false means that the one with the default true value has changed from true to false and gets the OnRep call but the other is already known to be loaded as false and is in sync so will not receive a OnRep call. The variables should be in sync you just need to call your function on BeginPlay as well as OnRep to keep the visuals in sync.

Shows at left up corner of the screen debug output
“Client/server : Authority : OSWindowName : ActorName : IsRaisedState” the state/variable that is RepNotify.
That’s just after client joined server, we can notice that the Server and client have data miss match.

I also just tested with debug. On server the current state is false (default value in blueprint = false, but instance editable set to true).
When client joins the server, from the time begin play ticks first time, the variable is accessed only once as GET from UpdateState called at BeginPlay to update it’s state.
At actor state is true at begin play, and the variable returns it’s state as true if printed afterwards.

From what you wrote above as Engine rules. It doesn’t fit what is happening on my side.
The variable on server is different then clients and repNotify is not issued.

I tried all variations every one works fine, EXCEPT one where variable is InstanceEditable its default state doesn’t match it’s placed in level state. (In blueprint it’s set to false, but in level it’s ticked to true)

CONCLUSION:
I suspect the repNotify doesn’t check if the variable is InstanceEditable and compares to it’s blueprint default value thus mismatch.
OR the InstanceEditable logic is called after RepNotify procs thus overwriting the state.
OR somehow my steamLan1.38 that comes with UnrealEngine installation is flawed.

I will try today to get someone to help me test Online, if the problem occurs there as well. Since i am testing locally on one machine.
Kinda hoping it’s my driver, but could be oversight that repNotify doesn’t compare to InstanceEditable override, would be typical :slight_smile:

Interesting. You haven’t made the variable transient?

It’s variable of persistent actor in level with lifetime of 0(infinite).
It’s not local variable if that’s what you meant. But in grand scope it’s temporary variable since the actor is dynamic it can be destroyed, vague question, vague answer :stuck_out_tongue:

You can flag a variable as Transient so that it is zero-filled at load time. Transient variables ignore whatever variable is pre-set in the instance and expects to be set to a new value at run-time.

Still working on resolving the issue, couldn’t put more time intro it.
Newest public build has bug preventing it joining on steam network oops. Preventing testing the bug further, not to mention i have to have another player on different network to assist me.
I expect to have it tested and confirmed by end of week, at which time i’l update this post and confirm if it’s bug with minimal example build.

I’m having the same issue. I had an instance editable boolean switch to the opposite default setting that wouldn’t repnotify, but the others which kept the default value will properly repnotify.

Wanted to add found a work around by setting up two variables. One for instance settings, one for replication. On begin play they’re synced up.

Could you elaborate on how you synced them up? All the methods that I thought to do this logically aren’t working so now I’m just trying random orders of setting/getting.

I have one bool with RepNotify that runs a relevant function for true/false. This other bool you say to make isn’t replicated, right?