ValveSoftware / ValveSoftware/source-sdk-2013

[Any] VPhysics x64 crashes in 2 places when vehicles are not modelscale 1.0

Open
#1,961 0 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
10k
Forks
3k
Avg merge
8d 11h
Merged PRs (30d)
2

Description

VPhysics crashes in 2 points with NULL access or other access violations.
First place is: fourwheelvehiclephysics.cpp inside bool CFourWheelVehiclePhysics::Think()
m_pVehicle->Update( gpGlobals->frametime, m_controls);
which is: void IPhysicsVehicleController::Update( float dt, vehicle_controlparams_t &controls )

The second place is any function that uses: IPhysicsFrictionSnapshot *IPhysicsObject::CreateFrictionSnapshot()

To test on any Source Engine game that uses VPhysics x64 and has the model + vehiclescript use:
ent_create prop_vehicle_jeep model models/buggy.mdl vehiclescript scripts/vehicles/jeep_test.txt modelscale 0.5

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the crash in a Source Engine game with the provided ent_create command and modelscale 0.5. Then inspect fourwheelvehiclephysics.cpp in CFourWheelVehiclePhysics::Think(), IPhysicsVehicleController::Update(), and callers of IPhysicsObject::CreateFrictionSnapshot(). Done means the two reported access violations no longer occur with the non-1.0 model scale.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.