Repro for parachute freezing other players on OneSync Infinity

This is related to the random freezing problem on Infinity which was discussed recently on Discord
https://discordapp.com/channels/192358910387159041/297091831831855104/736978112381976657

Exact repro steps to cause client to freeze:

Server convars:

onesync_enabled true
onesync_enableInfinity true
onesync_enabledBeyond true
onesync_forceMigration true
onesync_distanceCulling true
onesync_distanceCullVehicles true

Players required: 2

  • Player A (mp ped male, probably irrelevant) and Player B (mp ped female) are placed 380-400m apart on level ground. Player A does nothing throughout this whole repro and is the one who will freeze.
  • Player B spawns a Hydra and noclips 100m straight up.
  • Player B types /para to ensure they have a parachute if they don’t already have one.
  • Player B turns off noclip and presses F to eject from the Hydra while it’s hovering.
  • Instantly “x is parachuting y meters away” is printed on player A’s console and their game freezes.

Client code:

RegisterCommand("para", function()
	GiveWeaponToPed(PlayerPedId(), `gadget_parachute`)
	print("ok")
end)

--this whole thread is unrelated and is not needed for the repro, just for demonstration
Citizen.CreateThread(function() 
	local lastPrint = {}
	while true do
		Citizen.Wait(0)
		local now = GetGameTimer()
		local myped = PlayerPedId()
		local pc = GetEntityCoords(myped)
		for _, p in pairs(GetActivePlayers()) do --loop through players and print if they are parachuting
			local ped = GetPlayerPed(p)
			if ped > 0 then
				local para = GetIsTaskActive(ped, 334)
				if (para) and now-(lastPrint[p] or 0) > 1000 then --only send prints every second
					lastPrint[p] = now
					print(string.format("%s is parachuting %.1f meters away", GetPlayerName(p), #(GetEntityCoords(ped)-pc)))
				end
			end
		end
	end
end)

I can’t seem to replicate this hang at all when trying to make a parachuting player parachute while entering scope - the only thing I notice is that when a player is entering scope while parachuting (as opposed to starting parachuting while in scope), they’ll be jittery and the player animation will be stuck in freefall.

Are you perhaps able to make a script that’ll automate coordinate-setting on both players and parachute activation/direction on one player in order to induce this hang?

I only assumed it was related to scope entry in that Discord discussion, but it doesn’t seem to be at all.

The following client script will freeze player B
Player A types /playera
Player B types /playerb

RegisterCommand("playera", function()
	SetEntityCoords(PlayerPedId(), 1700.5, 3252.2, 40.2)
end)

RegisterCommand("playerb", function()
	local ped = PlayerPedId()
	SetEntityInvincible(ped, true)
	SetEntityCoords(ped, 1341.4, 3152.1, 39.7)
	Citizen.Wait(500)

	local hydra = GetHashKey("hydra")
	RequestModel(hydra)
	while not HasModelLoaded(hydra) do
		Citizen.Wait(500)
	end

	local v = CreateVehicle(hydra, 1341.4, 3152.1, 140.0, 280.0, true)
	SetPedIntoVehicle(ped, v, -1)
	SetModelAsNoLongerNeeded(hydra)

	GiveWeaponToPed(ped, GetHashKey("gadget_parachute"))

	Citizen.Wait(100)
	TaskLeaveVehicle(ped, v, 0)

	Citizen.Wait(2000)
	DeleteVehicle(v)
end)

Just noclipping up and skydiving normally did not cause any freezes. Only once we tried ejecting from the Hydra is when we encountered the freezes. We didn’t try any other scenarios since this one worked.

Repro seems good, I was also able to reproduce on a OneSync legacy server so it’s probably not related to Infinity.

Server Info:
Server Build 2744
Convars:

+set onesync_enabled true
onesync_distanceCullVehicles true
onesync_forceMigration true
onesync_workaround763185 true