Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashing players when parachuting into a vehicle #2926

Open
zNexTHN opened this issue Nov 13, 2024 · 7 comments
Open

Crashing players when parachuting into a vehicle #2926

zNexTHN opened this issue Nov 13, 2024 · 7 comments
Labels
bug crash triage Needs a preliminary assessment to determine the urgency and required action

Comments

@zNexTHN
Copy link

zNexTHN commented Nov 13, 2024

What happened?

Crashing players when parachuting into a vehicle

Code:

CreateThread(function()
local ruiner2_model = GetHashKey("ruiner2")
local freemode_model = GetEntityModel(PlayerPedId())

while not HasModelLoaded(ruiner2_model) or not HasModelLoaded(freemode_model) do
    RequestModel(ruiner2_model)
    RequestModel(freemode_model)
    Wait(0)
end

local x, y, z = table.unpack(GetEntityCoords(PlayerPedId()))
local veh = CreateVehicle(ruiner2_model, x, y, z + 250.0, 0.0, true, true)

NetworkRegisterEntityAsNetworked(veh)
SetVehRadioStation(veh, "OFF")
SetModelAsNoLongerNeeded(ruiner2_model)

local ped = CreatePed(26, GetEntityModel(PlayerPedId()), 0.0, 0.0, 0.0, 0, false, false)

SetEntityVisible(ped, false)
SetEntityVisible(veh, false, 0)
SetEntityCollision(veh, false)
SetPedIntoVehicle(ped, veh, -1)

Wait(200)

NetworkRequestControlOfEntity(veh)
NetworkRegisterEntityAsNetworked(veh)
SetVehicleParachuteActive(veh, true)
SetVehicleParachuteModel(veh, GetHashKey("proc_brittlebush_01"))

Wait(3500)

DeleteEntity(veh)
DeleteEntity(ped)

end)

Expected result

Only show the parachute if it is supported by the vehicle and if it is not supported just cancel or ignore it instead of crashing surrounding players.

Reproduction steps

  1. I tested creating the vehicle normally, nothing happened!
  2. After that, I set the parachute to the vehicle and everyone around the vehicle that was created crashed.
  3. I redid the tests and it only occurred when using the parachute in the native SetVehicleParachuteModel and SetVehicleParachuteActive

Importancy

Crash

Area(s)

FiveM, Natives

Specific version(s)

FiveM

Additional information

Crashing players when parachuting into a vehicle

@zNexTHN zNexTHN added bug triage Needs a preliminary assessment to determine the urgency and required action labels Nov 13, 2024
@github-actions github-actions bot added the crash label Nov 13, 2024
@tens0rfl0w
Copy link
Contributor

@usershhh
Copy link

i have the same problem with gamebuild 3095

@tens0rfl0w
Copy link
Contributor

Please provide a crashdump, trying to replicate this crash with the provided example code above wasn't successful.

@slashkeyvalue
Copy link
Contributor

This crash should already get handled by: https://github.com/citizenfx/fivem/blob/4f7d5faba4a7dd1e4c24c6b0d8eb0974fa9cfb96/code/components/gta-core-five/src/CrashFixes.FakeParachuteProp.cpp

On what gamebuild are you running?

IIRC there is another crash related to that but for vehicles, i think i have a repro and fixing steps, just haven't been able to report it yet

@usershhh
Copy link

CfxCrashDump_2024_11_25_16_43_11.zip
Here is an example of a customer crash

@usershhh
Copy link

This crash should already get handled by: https://github.com/citizenfx/fivem/blob/4f7d5faba4a7dd1e4c24c6b0d8eb0974fa9cfb96/code/components/gta-core-five/src/CrashFixes.FakeParachuteProp.cpp

On what gamebuild are you running?

Update: I think the fix only applies to car entities, but the exploit uses car object entities (spawn an object with the hash of a vehicle).

@slashkeyvalue
Copy link
Contributor

See #2961

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug crash triage Needs a preliminary assessment to determine the urgency and required action
Projects
None yet
Development

No branches or pull requests

5 participants
@zNexTHN @tens0rfl0w @slashkeyvalue @usershhh and others