citizenfx / fivem

The source code for the Cfx.re modification frameworks, such as FiveM, RedM and LibertyM, as well as FXServer.
https://cfx.re/
3.52k stars 2.07k forks source link

Crashing due to extra-natives-five.dll!CPedEquippedWeapon_SetupAsWeapon #2576

Open SheriffMayhem9 opened 4 months ago

SheriffMayhem9 commented 4 months ago

What happened?

Many players are suffering a crash which appears to be resulting from line 190 in WeaponExtraNatives.cpp

The line of code is; return origSetupAsWeapon( thisptr, weapInfo, totalAmmo, a4, targetPed, weaponAddr, a7, a8 );.

The crash info is; [ 181500] [b2699_DumpServ] 20252/ Legacy crash hash: north-cola-lithium [ 181500] [b2699_DumpServ] 20252/ Stack trace: [ 181500] [b2699_DumpServ] 20252/ GTA5_b2699.exe!sub_1410486E8 (0xa3) [ 181500] [b2699_DumpServ] 20252/ GTA5_b2699.exe!sub_141048660 (0x23) [ 181500] [b2699_DumpServ] 20252/ GTA5_b2699.exe!sub_140FF80FC (0x409) [ 181500] [b2699_DumpServ] 20252/ GTA5_b2699.exe!sub_1410072B8 (0x142) [ 181500] [b2699_DumpServ] 20252/ GTA5_b2699.exe!sub_1410415C0 (0x52) [ 181500] [b2699_DumpServ] 20252/ extra-natives-five.dll!CPedEquippedWeapon_SetupAsWeapon (0x18b) (WeaponExtraNatives.cpp:190) [ 181500] [b2699_DumpServ] 20252/ GTA5_b2699.exe!sub_14100895C (0x118) [ 181500] [b2699_DumpServ] 20252/ [ 188375] [b2699_DumpServ] 20252/ Crash report service returned si-3e4f7aaf03b14cfd86d5feb26d9b38bc

It only happens to some people and always happens when loading into server before the framework for character selection or just after selecting a character.

Not sure what it is but its always happening.

Expected result

Load into server without crashing

Reproduction steps

Load into server and reach the framework stage If still working select character If still working repeat steps

Importancy

Crash

Area(s)

FiveM

Specific version(s)

Fivem 2699

Additional information

It happens and doesn't happen, not sure why it doesn't crash sometimes but crashes other times

SheriffMayhem9 commented 4 months ago

CfxCrashDump_2024_06_05_19_25_51.zip

gottfriedleibniz commented 4 months ago

Without more information it is difficult to tell what is exactly happening. In the dump provided the weapon crashing has a name with hash 0xC971E223. Looks a bit like TintSpecValues reference in that WeaponInfo is dangling... WEAPONINFO_FILE_PATCH weirdness or something maybe?

csskroubledev commented 3 months ago

This looks similar to my problem with crash-points happening randomly on the map. But mine's an other error code, a lot of people get the same code when going into the crash-point

[   2039656] [b2944_DumpServ]                11556/ Process crash captured. Crash dialog content:
[   2039656] [b2944_DumpServ]                11556/ GTA5_b2944.exe!sub_1413BA26C (0x58)
[   2039656] [b2944_DumpServ]                11556/ An error at GTA5_b2944.exe!sub_1413BA26C (0x58) caused FiveM to stop working. A crash report is being uploaded to the FiveM developers.
[   2039656] [b2944_DumpServ]                11556/ 
[   2039656] [b2944_DumpServ]                11556/ Legacy crash hash: cola-pennsylvania-march
[   2039656] [b2944_DumpServ]                11556/ Stack trace:
[   2039656] [b2944_DumpServ]                11556/   GTA5_b2944.exe!sub_1413BA26C (0x58)
[   2039656] [b2944_DumpServ]                11556/   GTA5_b2944.exe!sub_140915644 (0xa2)
[   2039656] [b2944_DumpServ]                11556/   GTA5_b2944.exe!sub_1410022EC (0x30e)
[   2039656] [b2944_DumpServ]                11556/   GTA5_b2944.exe!sub_141011688 (0x13a)
[   2039656] [b2944_DumpServ]                11556/   GTA5_b2944.exe!sub_14104CB74 (0x4e)
[   2039656] [b2944_DumpServ]                11556/   extra-natives-five.dll!CPedEquippedWeapon_SetupAsWeapon (0x18b) (<A HREF="https://sourcegraph.com/github.com/citizenfx/fivem/-/blob/beta/fivem/code/components/extra-natives-five/src/WeaponExtraNatives.cpp?L190">WeaponExtraNatives.cpp:190</A>)
[   2039656] [b2944_DumpServ]                11556/   GTA5_b2944.exe!sub_141012D24 (0x118)
[   2039656] [b2944_DumpServ]                11556/ 
[   2041219] [b2944_DumpServ]                11556/ Crash report service returned si-589c842005bf43e5b7d45dc5f35f63e4
csskroubledev commented 3 months ago

CfxCrashDump_2024_06_10_23_41_03.zip

JordanZABOT commented 2 weeks ago

having the same issue on 3095 CfxCrashDump_2024_09_11_23_48_46.zip CfxCrashDump_2024_08_26_23_05_39.zip