question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NetworkPrefab has a duplicate GlobalObjectIdHash source entry value of XYZ

See original GitHub issue

Describe the bug: Every now and then, I get this issue when trying to enter play mode:

NetworkPrefab (Example1) has a duplicate GlobalObjectIdHash source entry value of: 951099334! Removing entry from list! NetworkPrefab (Example2) has a duplicate GlobalObjectIdHash source entry value of: 951099334! Removing entry from list! NetworkPrefab (Example3) has a duplicate GlobalObjectIdHash source entry value of: 951099334! Removing entry from list!

It seems to happen with some of the prefabs in my network prefabs list. To fix it, I just revalidate the NetworkObject component (e.g., toggle one of the parameters on and off), and another GlobalObjectIdHash is generated. I tried completely removing and re-adding the NetworkObject components from each of the prefabs, however, it didn’t seem to work.

To reproduce: I unfortunately cannot seem to deterministically reproduce this error.

Screenshot: image

Environment:

  • OS: Windows 10
  • Unity Version: 2020.3.12f1
  • Netcode Version: 1.0.0-pre.3
  • Unity Transport Version: 1.0.0.-pre.10
  • Transport for Netcode Version: 1.0.0-pre.3

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:30 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
NoelStephensUnitycommented, Aug 1, 2023

Ahh… yeah there have been several updates since v1.3.1 that might avoid some of the issues you are encountering. ParrelSync has been known to cause issues with prefabs and getting out of synchronization with the primary editor instance (editor that you are making changes to a prefab within).

I was diverted to a different issue yesterday so I haven’t had a chance to get back to this bug search… but will definitely post a link to the branch once I have pushed it to the repository. 👍

1reaction
MikeSchurmancommented, Jul 31, 2023

I’m following this issue with interest as the 951099334 issue is happening more frequently for us now. For now we’ve bypassed the issue by adding a button to call OnValidate on all our NetworkObjects.

I’ve always seen this on our parrelsync clone, however just this morning every prefab in the main editor project was 951099334 for one of our team members.

I’ve added some prints this morning to GenerateGlobalObjectIdHash to see what is going on, but there’s not much of a stack with OnValidate unfortunately.

Some interesting tidbits from prints so far:

  • OnValidate seems to be called twice for each changed NetObj, most of the time, when doing a refresh on the parrelsync clone. The first time it gets the 951099334 value, but then it gets called again with the proper value.
  • One time it only got one OnValidate call, but it was the correct value.
  • On the main editor (ie not the clone) if I add a script to a netobj, it gets called 4 times:
    • 3 times from OnValidate (wrong, wrong, correct)
    • then a forth time from [Worker3], also correct.

I’ll let you know if/when I get the failure case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bug - NetworkPrefab has a duplicate GlobalObjectIdHash ...
NetworkPrefab (Example1) has a duplicate GlobalObjectIdHash source entry value of: 951099334! Removing entry from list!
Read more >
Scene objects assigned same GlobalObjectIdHash value
We started to see 'xxx has a duplicate GlobalObjectIdHash source entry value of: 951099334!' errors few weeks back.
Read more >
NetworkPrefab has a duplicate GlobalObjectIdHash source ...
NetworkPrefab (Example2) has a duplicate GlobalObjectIdHash source entry value of: 951099334! Removing entry from list! NetworkPrefab (Example3) has a duplicate ...
Read more >
MidLevel
This causes the error 'NetworkPrefab (Player) has a duplicate GlobalObjectIdHash source entry value of: 2824519432!' on entering play mode.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found