Server-side spawned vehicles/peds sometimes frozen in place with godmode

Bug Report

  1. Client and FXServer version
  • Client: b3258
  • FXServer: FXServer-master v1.0.0.20072 linux
  1. What you expected to happen
  • Vehicles spawned server-side should always behave normally (driveable, obey physics, interactable).
  • Peds spawned server-side should be able to move and not be stuck in godmode.
  1. What actually happens
  • Vehicles spawned server-side are often frozen (stuck in ground/air, immovable).
  • Re-spawning the same vehicle again usually fixes it, the second time is drivable as expected.
  • Peds spawned server-side are usually frozen too and have god-mode enabled.
  1. Category of bug
  • Server :arrow_right: entity spawning (vehicles, peds)
  • Possibly related to entity networking/initialization.
  1. Reproducible steps (with example)
    Minimal example:
This simply happens with `/car` command in ESX Framework
Any other script using server side spawns causes this issues too, sooner or later.
  1. Steps to reproduce:

    1. Run /car spawned vehicle is frozen/stuck.
    2. Delete last vehicle
    3. Run /car again - new vehicle is not frozen, drivable as expected.
    4. Run any spawnped function in server side - ped spawns frozen and in godmode.
  2. Notes / Workarounds

  • Issue occurs mainly on live server (few players connected). I can’t recall seeing it happen on a local dev server.
  • Spawning the same vehicle again usually resolves the issue (haven’t tried with peds).
  • Happens even with networked flag set to true.
  • Vehicles can be unfrozen manually with noclip (e.g., txAdmin), but that’s not a real fix.
  • Rare issue, but not only I’ve experienced it, other server owners have reported the same behavior.
1 Like

@Manason did a few months of testing with server-side spawning. As far as we know, you shouldn’t be using it—there are too many issues with it at the moment.

I believe this is the same issue I reported experiencing in this thread. After doing some research and testing on our server, even though we spawn client-side, I believe that when players go in and out of buckets, ownership of entities can be lost, causing similar behaviour.

I remember experiencing this issue a lot more when we tried to spawn server-side.

  • Issue occurs mainly on live server (few players connected). I can’t recall seeing it happen on a local dev server.

You’ll also notice cars disappearing and other weird issues, like the customization of vehicles being missing. I would avoid using it for now, I don’t forsee a fix any time soon.

1 Like

Can confirm all of these issues. I got workarounds for all of them, but the one for “frozen” vehicles is very annoying for the enduser to work with (requires adding a file that replaces FreezeEntityPosition to any script that actually needs to freeze vehicles and setting a config option).

The most annoying one by far is a race condition that seems to happen when spawning a vehicle, then deleting it after a long timeout (up to 30 seconds we tested). This is extremely rare and I’ve only managed to reproduce this with another user with weak hardware like twice (out of hundreds of tries).
It seems like the vehicle is actually deleted on server side, but the sync data still manages to get to that client who then replicates the vehicle. The created vehicle has a different server side handle and network id than the initial vehicle spawned using CreateVehicleServerSetter. Impossible to reproduce on command, seems to have to be frame perfect for it to happen. Although having ~200 different vehicle models loaded at the same time makes it easier for the client to run into such a long timeout.

3 Likes