Custom characters w/ constraints can permanently change network owner + make others locally invisible

As I’m sure most people know by this point, I have a snake character in my game.
It’s made of a chain of ballsockets connected to the HumanoidRootPart, and it works very well in most cases. However, recently I added a new creature that’s somewhat heavy and has a longer rootpart than most other creatures.

When this creature jumps on the snake, it causes the ballsocket chain to freak out, explode, and violently launch parts in all directions.

But this is not the problem.

The problem is that extremely occasionally when the character explodes, the player loses network ownership of their own character, and I can’t seem to prevent it from doing this, or even set it back to the player.

image

image

I’ve also experienced smaller, simpler creatures with short ballsocket chain tails doing this while moving normally. (In these cases, they spontaneously teleport to 0,0,0, get stuck in the ground, and experience #1 from below)
(The console errors are not important)
https://gyazo.com/9b6ecc6dca7cce78cd91583ace41ac36.gif

When they permanently lose network ownership, several strange things can happen.

  1. The affected character will have extreme latency in their movement and blink out of existence, lose control of their camera, and see all shadows in the world disappear periodically. The character can also flop around when this happens. In my repro, one time I kicked them off the edge of the baseplate and they respawned still in this affected state.
  1. Sometimes if the other character is interacting with the affected character as it enters this weird network ownership state, they can become inexplicably invisible locally. However, they can move fine, all their parts still exist, are in the correct locations, and have the correct children and properties, and other clients and the server still see them properly. Putting any new parts into the character will also result in them becoming invisible too.

While testing this in my game, when jumping on the snake there was also a small chance I would inexplicably permanently lose the ability to jump, but everything else appeared to work fine. Didn’t get that to happen in my repro, but maybe I haven’t tried enough.

All of this happens here, but it can be very difficult to reproduce:

I have the repro file from the videos above available upon request, since I don’t want to leak my characters. A more general repro file will take me too much time to produce, since character mass is important to causing this. Attempting to cut down the repro file stopped this effect from happening, and I don’t have time to try to tune it so it happens again.

The steps to reproduce are as simple as:

  1. Grind the snake’s face into the lizard
  2. Have the lizard jump on the snake’s head

The earliest report I have of this issue is from June 5, 2018, but back then it was triggered by separating the physically simulated part of your character from the rootpart by a very large distance and letting it try to reconnect to your body through parts in the map. (Teleport tool before I fixed it to properly move tails)

8 Likes

Because a repro is not available for us, I would need more information:

1 Like

Repro is available, just not to the public.


My characters use standard character features, they only differ in that they’re custom rigs running custom animations. So yes, they have a humanoid, a head, are the player’s character, etc, etc.

The snake character cannot possibly have all of its parts return the same root, due to the nature of how it’s constructed. The other character returns the HumanoidRootPart for all parts. When the player spawns, it owns all of its own parts. I’ve also attempted manually setting the network owner of all the character’s parts to the player, but that didn’t change anything.

> for i,v in pairs(workspace.exocet:GetChildren()) do if v:IsA("BasePart") then print(v,"-", v:GetRootPart()) end end

  Right Leg - Right Leg
  CollisionSegment - CollisionSegment
  Right Arm - HumanoidRootPart
  CollisionSegment - CollisionSegment (x7)
  Head - HumanoidRootPart
  CollisionSegment - CollisionSegment (x22)
  HumanoidRootPart - HumanoidRootPart
  Torso - HumanoidRootPart
  BBeak - HumanoidRootPart
  LBeak - HumanoidRootPart
  RBeak - HumanoidRootPart
  UBeak - HumanoidRootPart
  Face - HumanoidRootPart
  Mouth - HumanoidRootPart
  Eye 1 - HumanoidRootPart (x3)
  Claw - CollisionSegment (x3)
  Claw - Right Leg
  Claw - CollisionSegment (x2)
  AttackMouth - HumanoidRootPart
  Segment - CollisionSegment
  Segment - Right Leg
  Segment - CollisionSegment (x29)
  HeadSpike - HumanoidRootPart
  Claw - CollisionSegment (x2)

No physics errors / rejections are printed when this happens.

Mechanisms:
(Nothing interesting to see)

Owners:
(You can see the affected character change owner to the server)

1 Like

I’d guess some parts got deleted due to FallenPartsDestroyHeight, is that correct?

I saw the client reported that the snake was owned by the server, does that happen in the server’s view too?

Are all parts reassambled to the character after the glitch?

No. All characters are whole. I have verified this by counting the number of children in the character before and after the issue occurs.

It appears on the server that the player periodically regains ownership for an extremely brief moment, then ownership is forced back to the server.
Also on the same period, character names appear to render regardless of distance on the affected client.

Not sure what you mean by “reassembled”. The roots of all parts do not change.

Just managed to trigger local invisibility on myself without getting the other character permanently stuck being owned by the server. Something weird happened physically to trigger it though. Nothing was printed unfortunately.

And again, but I lost network ownership of myself instead of the snake. After a couple of seconds the network owner reset to myself though, so this seems to be related to the constraints forcing network owner back to the server. Didn’t fix the invisibility though.

And again, but this time the lizard character was also teleported to 0,0,0.


I checked the property panel on one of the snake’s parts the moment the character blinked out of existence and found this, but only on the client.

image

I cannot reproduce the network ownership issue and the invisibility issue now that the new LDL-PGS solver has been released.

The issue might not be fixed and may just be much harder to reproduce now that mechanisms are more stable. However, I’m going to mark this thread as solved for the time being since I can no longer reproduce it.

1 Like

I am now getting this same issue but with AlignPosition constraints.

Occasionally any parts (with network ownership set to the player) using AlignPosition to align with attachments that are being moved locally will freak out and disable network ownership of every part in the workspace that’s also using body align.

Any parts that are not using AlignPosition continue to have NetworkOwnership set to the player.
Just like OP, my parts also blinked out of existence suddenly.

  • I am getting nothing from PrintPhysicsError.
  • AreOwnersShown is enabled and confirming that objects are losing network ownership at the same time

Additionally
I tried setting network ownership to auto to see what would happen.
When the same bug appeared and NetworkOwnership was lost, the parts that are being constrained with AlignPosition keep flashing in and our of the workspace. When they appear for a split second, they have a red outline. They do this with a consistent interval of a few seconds.

image

Heads of animals appear with a red outline for a split second
image

1 Like

Update on this issue and a bit of a TL;DR

  • After further testing, it appears that this bug occurs when a part that is controlled by a AlignPosition with NetworkOwnership has its position set to (nan,nan,nan) (I am not sure why it is setting to this)
  • This seems to set the NetworkOwnership to nil of every other part constrained by a AlignPosition as well.
  • Once the NetworkOwnership is broken, it cannot be set back to the player.

Very strange bug. I’d greatly appreciate if someone could get back to me on this!

For now I suppose I have to make sure my parts are never having their position set to (nan,nan,nan) and it would be a fault in my code if this happened. However the fact that it breaks the NetworkOwnership of every part when this does happen is quite concerning.

8 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.