BoltEngine / Bolt-Tracker

New issue tracker for Photon Bolt
10 stars 2 forks source link

Calling BoltNetwork.Instantiate() with a protocol token >~1200B results in a silent error. #155

Closed tkgszaluga closed 4 years ago

tkgszaluga commented 4 years ago

Calling BoltNetwork.Instantiate() with a protocol token >~1200B appears to succeed (there are no errors logged, no exceptions, etc.), but entity never replicates to connected clients.

To Reproduce Steps to reproduce the behavior:

  1. On the server, create & register a token with more than 1200B of data
  2. After starting Bolt, try to instantiate a prefab with Bolt Entity using BoltNetwork.Instantiate()
  3. Notice that there are no errors logged, but the entity does not show up on the server or client(s)

Expected behavior Since event data >1200B gets split into multiple packets (according to this page), I'd expect protocol tokens to work in a similar way. Alternatively, an exception should be thrown or an error message logged to the console.

Actual behavior Prefab fails to instantiate without any error.

Desktop

Additional context

DirtyHippy00 commented 4 years ago

This isn't a bug. That page you link is for Photon and not Bolt. Bolt doesn't recombine packets. This is described on the bolt documentation pages here:

https://doc.photonengine.com/en-us/bolt/current/community-wiki/extra-bits/packets

tkgszaluga commented 4 years ago

Ah, I see. Thank you for pointing me in the right direction.

Still, logging a message when packet is overflown (especially in debug) while spawning an entity would be very helpful. I expect unreliable events to be dropped silently, but not entity instantiate requests. When this sort of error happens, entity gets spawned on the server but not on any of the clients, with absolutely no indication that something went wrong (leading to things like invisible obstacles, for example). At the same time server needlessly keeps trying to re-serialize the offending token every frame.

DirtyHippy00 commented 4 years ago

Yes, I agree this should be failed elegantly and logged appropriately.

ramonmelo commented 4 years ago

Included warning on the next release.

Thanks for your feedback.