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

Sessions .with_desync_detection(DesyncDetection::On) always reports false positives #49

Closed
johanhelsing opened this issue Feb 9, 2023 · 1 comment · Fixed by #50
Closed
Labels
bug Something isn't working

Comments

@johanhelsing
Copy link
Collaborator

johanhelsing commented Feb 9, 2023

Describe the bug

Check out the branch in #48 , which enables desync detection in the p2p example. As soon as it starts, it reports a desync.

Expected behavior
It should not report a desync (since it doesn't desync. only the hash is different)

Desktop (please complete the following information):

  • Linux

Additional context
This happens because bevy_reflect uses ahash::AHasher::default. Since bevy uses ahasher with the default features, this means it's seeded at runtime, which means hashes will always be different across peers, see: https://docs.rs/ahash/latest/ahash/struct.AHasher.html#method.default

@johanhelsing johanhelsing added the bug Something isn't working label Feb 9, 2023
@johanhelsing
Copy link
Collaborator Author

Submitted a PR to bevy: bevyengine/bevy#7583

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant