-
-
Notifications
You must be signed in to change notification settings - Fork 22k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MP] Fix division by zero in network profiler #96464
[MP] Fix division by zero in network profiler #96464
Conversation
The debugger reports synchronizers with empty state to the editor even if no data is being sent to other peers. The editor conditional to avoid division by zero was checking the wrong variable.
Just tested this fix, it seems to be working great now! But I now have one question: @Faless, how am I supposed to debug the actual send size, if it is constantly reported as being zero? This small MRP that I have provided was ported directly from my game, where I have the exact same scenario with a variable value changes and "On Change" send rate. Since this value is replicated (even if this does not happen every frame), is it possible to somehow understand what the actual send size is? |
Currently, if it the state size is reported as zero, it means no data is being sent for state synchronization ("Always" variables). I believe the network profiler has never been updated to include delta synchronization ("On Change" variables). I'll create a proper proposal for a network profiler revamp to make the information clearer and include "On Change" states, but I think we should merge this as a crash fix in the meantime. |
Yeah, I agree, merging this first should be a priority. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM and matches code above
Thanks! |
Cherry-picked for 4.3.1. |
…ion_by_zero [MP] Fix division by zero in network profiler
The debugger reports synchronizers with empty state to the editor even if no data is being sent to other peers.
The editor conditional to avoid division by zero was checking the wrong variable.
Fixes #96354 .
Draft status:As reported in [MP] Fix division by zero crash #96450 we might want to show:0
for outgoing sync too, to clarify that no data is being set (although the synchronizer is still being processed).I'll create a proposal for a network profiler revamp to make the information clearer and include "On Change" states, but I think we should merge this as a crash fix in the meantime.