Skip to content
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 crash #96450

Closed
wants to merge 1 commit into from
Closed

[MP] Fix division by zero crash #96450

wants to merge 1 commit into from

Conversation

Withaust
Copy link
Contributor

@Withaust Withaust commented Sep 1, 2024

While this indeed fixes #96354, I still have no idea what was a root cause of this issue in a first place.
There is this part in SceneReplicationInterface::_send_sync:

const List<NodePath> props = sync->get_replication_config_ptr()->get_sync_properties(); // This always returns no props

Reason why in my project I was getting these divisions by zero was because this line always returned no props, and yet code underneath it kept executing. It gets a resulting size of 0, submits it to the profiler and this crash would occur.
Even with this fix it feels like there is an overarching issue, since now object is still somehow synced, but the reported size is always reported as zero, even if it is actually being replicated from time to time.

Verified

This commit was created on github.com and signed with GitHub’s verified signature.
@Withaust Withaust changed the title Fix potential division by zero [MP] Fix division by zero crash Sep 1, 2024
@Withaust Withaust closed this Sep 1, 2024
@Withaust
Copy link
Contributor Author

Withaust commented Sep 1, 2024

I managed to make a MRP, no need for this bandaid fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[MP] MultiplayerSynchronizer crashes networking profiler
2 participants