I don’t have the slightest idea what’s going on, I released a large update to my games after putting the updates up on a testing slot for a few days. I remember @Lilly_S complaining about losing connection once throughout the testing period due to this “Error while processing packet” message, but no one else ever complained about such problems so I disregarded it as a fluke.
Until I updated the public game itself.
Now everyone loses connection inexplicably after about 8-11 minutes with only this in their client logs:
The error message looks familiar to me, but I don’t remember where I’ve seen it.
I think I saw it in a project of mine with a custom replication system. Sometimes it would replicate too much at once and cause disconnections. I don’t remember if that was because of this error or not.
Are you sending/receiving a lot on the network? There should be some stats you can display to check (I’m not sure how to turn them on), and you can do some logging of it internally in your own code to make sure you don’t have a runaway loop or something similar constantly sending data. If I’m right, then it could also be adding/removing a lot of parts, too.
I’m not sure if that could be the cause, but it’s a good thing to look into. This is another one of those bugs that’s hard to fix because the cause is very unclear.
I’m just full of bad luck with hard to trace bugs, apparently haha.
The only differences between pre-update and post-update in terms of replication are the way I handled some doors in the game. I did some digging into old threads on this issue and came up with an assortment of random causes, some being traced to :FireAllClients(), some to :Kick(), and some just completely random. I’m currently testing to see if my new usage of :FireAllClients() directly before :Kick() is contributing to this, as I made that change around when this bug might have started to surface for me.
EDIT: and as soon as I posted this, my hypothesis proved incorrect. sigh
EDIT #2: Down a few more hypotheses without any change. I noticed log files being dumped that all seemed different, but pointed to the same packet ID: 131. This was noted as the problem packet in this thread from 2014.
That “Bad string length: 201326648 (packet length: 300)” probably explains it. If you send a string that’s longer than 2e5 characters (that one packet was 2e8 characters) the connection gets closed. ROBLOX also “groups” all “packets” together, so it gets sent at once each (network) tick. Maybe the packet became too big, as 201326648 is over 192MB. (I repeat: 192 MEGABYTES)
TL;DR: You probably send waaay too much data when you’re replicating bullet effects
…all I was sending was a reference to a part on the gun and a Vector3 telling the bullet trail part where to stop. Unless that Vector3 was getting incredibly large for some reason, I don’t know how this would be possible.
Vectors use floats (I think, everything in Lua 5.1 does) so (0,0,0) should be as big as (1e9,1e9,1e9). If you’re only sending such a small amount of data, could it be you’re calling FireAllClients a lot instead?
Well, you know it’s a result of FireAllClients, so you can always do print() right before using FireAllClients on the server. Maybe a custom print, which, when the server closes (game.OnClose or that better new method to add a callback), uploads your output to some site. (requestb.in works fine)
Hey, TwentyTwoPilots, we’re currently getting this issue in our game as well, do you remember what all you were doing in the bullet effects part of the script?