Skip to content

fix(net): guard invalid vehicle archetype pointers - #4100

Open
rafaadeveloper wants to merge 1 commit into
citizenfx:masterfrom
rafaadeveloper:fix/4083-vehicle-crash-validation
Open

fix(net): guard invalid vehicle archetype pointers#4100
rafaadeveloper wants to merge 1 commit into
citizenfx:masterfrom
rafaadeveloper:fix/4083-vehicle-crash-validation

Conversation

@rafaadeveloper

Copy link
Copy Markdown

Goal of this PR

Prevent a client crash caused by dereferencing an invalid vehicle archetype pointer during remote vehicle updates.

This change adds a defensive validation before the affected game-side path is reached, preventing malformed or corrupted vehicle archetype pointers from being passed to GTA's internal code.

How is this PR achieving the goal

  • Adds a guard that validates vehicle archetype pointers before they are dereferenced.
  • Rejects updates that contain an invalid or non-dereferenceable archetype pointer.
  • Preserves the normal update path for valid vehicle entities.
  • Prevents malformed network state from propagating into the game code where the reported crash occurs.

This PR applies to the following area(s)

  • FiveM
  • Networking
  • Vehicle synchronization

Successfully tested on

Game builds: b3258

Platforms: Windows

Note: This change is a defensive mitigation. The original corruption source has not yet been conclusively identified, but the guard prevents invalid archetype pointers from reaching the reported crash location.

Checklist

  • Code compiles and has been tested successfully.
  • Code explains itself well and/or is documented.
  • My commit message explains what the changes do and what they are for.
  • No extra compilation warnings are added by these changes.

Fixes issues

Related to #4083

@github-actions github-actions Bot added the invalid Requires changes before it's considered valid and can be (re)triaged label Aug 2, 2026
@DaniGP17

DaniGP17 commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

This is not a good solution, the fix should address the root cause.

@rafaadeveloper

Copy link
Copy Markdown
Author

This is not a good solution, the fix should address the root cause.

Thanks for the feedback. I agree that the root cause should be fixed.

This was intended as a defensive mitigation since I couldn’t identify where the corruption originates from the information available in the issue. If there’s a reproducible case or additional context, I’d be happy to investigate the underlying cause.

@mas7or123

Copy link
Copy Markdown

any idea how to fix it in my server for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalid Requires changes before it's considered valid and can be (re)triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants