Very reproducible client crash with OneSync after spawned human ped goes aggressive from another player trigger
Client
Using canary? Canary and Release
Windows version: Win 10
System specifications: (Been replicated across various PCs and clients)
Server
Operating system: Win 10
Artifact version: 5049 (ongoing for a while, doesn’t seem to matter)
IP address:
Resources: minimal - base RedM setup
System specifications: N/A
Incident
Summary: Spawned human peds, capable of aggression, will crash the player that spawned them when another player aggro’s the ped. Interesting thing is that the ped aims at the player that spawned it, but not the player that aggro’s it.
Expected behavior: No client crash
Actual behavior: Client crash with OneSync
Steps to reproduce: OneSync enabled. Easy to replicate with two players, cl2 or otherwise. Player 1 spawns a human ped networked that can be aggressive (if they don’t have a weapon by default, give them a weapon). Player 2 then aggro’s (shoots, punches, knifes, etc.) the ped spawned by Player 1. Player 1 crashes immediately with lemon-salami-california.
Server/Client? Client crash
Files for repro (if any):
Error screenshot (if any):
.dmp files/report IDs: lemon-salami-california
CfxCrashDump_2021_12_15_02_13_46.zip (2.1 MB)
Any additional info:
RegisterCommand("spawnnpc", function(source, args, rawCommand)
Citizen.CreateThread(function()
local playerCoords = GetEntityCoords(PlayerPedId())
local npc = {
model = 'MP_U_M_M_LEGENDARYBOUNTY_09',
coords = playerCoords + 1
}
spawnNpc(npc)
end)
end)
local spawnedPeds = {}
function spawnNpc(npc)
local model = GetHashKey(npc.model)
RequestModel(model)
while not HasModelLoaded(model) do
Wait(50)
end
local createdped = 0
while createdped == 0 do
local heading = 0
createdped = CreatePed(model, npc.coords.x, npc.coords.y , npc.coords.z, heading, true, true, false, false)
Wait(500)
end
Citizen.InvokeNative(0x283978A15512B2FE, createdped, true) -- SetRandomOutfitVariation
table.insert(spawnedPeds,{ped = createdped})
SetModelAsNoLongerNeeded(model)
end