IsVehicleEngineStarting causing a crash

Abstract

There seems to be an issue with the IsVehicleEngineStarting native. The client seems to completely exit without any error whatsoever. By avoiding to call IsVehicleEngineStarting native, the client seems to be working as normal again. No errors seems to be outputted in the client log (see source 2)

Using different manifest versions doesn’t seem to resolve or induce different behaviour. I’ve tried every version as described on the wiki: https://wiki.fivem.net/wiki/Resource_manifest_versions

Expected behaviour

Call IsVehicleEngineStarting native and get a boolean back of wether the vehicle engine is starting.

Actual behaviour

When calling IsVehicleEngineStarting, the FiveM client will exit without any error(s).

Reproduction steps

1). Have a stock FiveM server
2). Add the resource (see source 1)
3). Start the resource.
4). Get in a vehicle, this will result into a crash.

Environment

Running from a local server using artifacts #607.
Clean GTA 5 install, Clean FiveM install, using canary.
Server and client both run on a Windows 10 machine (build 1709)

Sources

  1. Resource to reproduce the issue: bgr000.zip (709 Bytes)

  2. Client log: CitizenFX.log (67.2 KB) (contains prints from the script).

2 Likes

Still causing crashes :frowning:

1 Like

I don’t see a GTAV native matching this name. I’m not at my desktop, so can’t peek at what native[s] are being called.

Ok…?
https://runtime.fivem.net/doc/reference.html#_0xbb340d04

Notice that’s under CFX? As in it’s a Citizen API and not a GTA native?
Notice that it only has a 32 bit hash and no 64 bit address?
Notice that the NativeDB doesn’t list any IS_VEHICLE_ENGINE_STARTING nor any native for 0xbb340d04?

Do you think ‘natives’ like this one https://runtime.fivem.net/doc/reference.html#_0xdedae23d are a part of GTAV and not added on by CitizenFX?

… and what are you trying to say with that? Does that make this issue report any less invalid? These calls are custom natives that are registered with the RAGE scripting runtime directly.

1 Like

Issue found: the developer contributing this code had used a std::bitset<sizeof(int)> which only allows 4 bits, and this native reads bit 5.

Will be fixed shortly!

Resolved:

2 Likes