Native call crashes / hangs

What happened?

I tried to call GetDlcWeaponData or GetDlcWeaponDataSp without or with a random integer argument.
It resulted in the fivem process hanging

Expected result

Returning an error and not hanging the process

Reproduction steps

print(GetDlcWeaponData(3))

Importancy

Slight inconvenience

Area(s)

FiveM, Natives

Specific version(s)

FiveM b3095

Additional information

image

Then I also found out that some natives will make you crash if called without any arguments : ClearGarageArea & ClearObjectsInsideGarage crashes · Issue #2507 · citizenfx/fivem · GitHub
CanPayGoon() causes a crash · Issue #2506 · citizenfx/fivem · GitHub

Note that I’m not planning on using those natives BUT :

  • Them not working could reveal a sub-problem that can impact other fields as well
  • I strongly believe that no native should make the player crash / hang, but they need to throw an exception instead !
1 Like