Crashes caused by two nametag natives (music-sierra-xray, comet-jupiter-six, juliet-mirror-robert and game closing on its own)

GTA V version? Latest.
Up to date? Yes.
Legit or Pirate copy? Legit.
Steam/CD/Social Club? Steam.
Windows version? Windows 10 May 2019 Update.
Did you try to delete caches.xml and try again? Yes.
Error screenshot (if any)

comet%20error

juliet%20crash

music%20error

System specifications
CPU: Intel Core i7 2600 @ 3.40 GH/z
GPU: Nvidia GeForce GTX 670
RAM: 16GB DDR3
What did you do to get this issue?
Two gamertag-related natives do not work anymore and cause crashes.
What server did you get this issue on?
My development server and my official gamemode server.
CitizenFX.log file
.dmp files/report IDs
comet-jupiter-six.zip (1.3 MB) juliet-mirror-robert.zip (1.3 MB) music-sierra-xray.zip (1.4 MB)

After yesterday’s FiveM update (June 26th, 2019), using the following natives on gamertags can cause music-sierra-xray, comet-jupiter-six and juliet-mirror-robert crashes (The game can also crash without an error code or close on its own):

  • 0xA67F9C46D612B6F1(int headDisplayId, bool toggle) - Replaces player health with vehicle health. InvokeNative execution fails (System.ArgumentException: Value does not fall within the expected range F8 error) and can lead to music-sierra-xray and juliet-mirror-robert crashes.
  • 0xD29EC58C2F6B5014(int headDisplayId, bool toggle) - Allows using custom values for the health bar. This native instantly crashes the game with comet-jupiter-six. This native was added with the Arena War DLC.

Seems to be happening due to the new gamertag updates that were pushed to production that day which allow a greater number of gamertags at one time.

I’ve created a script which can trigger these crashes, and included a few more details about what exactly happens there.

  • Press Arrow Up to create a nametag on your player ped.
  • Press Arrow Down to remove the nametag from your player ped. Be holding E while doing this to trigger a juliet-mirror-robert crash. (Executing N_0xa67f9c46d612b6f1 right after deleting the nametag on the same tick leads to a RemoveMpGamerTag failure, weirdly.)
  • Press Arrow Left to toggle vehicle health bar mode. InvokeNative execution fails (Running this in a loop makes the issues more obvious: can crash the game with music-sierra-xray while in a vehicle (sometimes game closes without any error code))
  • Press Arrow Right to trigger native 0xD29EC58C2F6B5014. This will instantly crash the game with comet-jupiter-six. 0x1563FE35E9928E67 appears to be working as it doesn’t print any error in the F8 console.
using CitizenFX.Core;
using CitizenFX.Core.Native;
using System.Threading.Tasks;
using static CitizenFX.Core.Native.API;

namespace TestScript
{
    public class TestScript : BaseScript
    {
        private int HeadDisplayId = -1;
        private readonly int PlayerId;

        public TestScript()
        {
            Tick += OnTick;
            PlayerId = PlayerId();
        }

        private async Task OnTick()
        {
            if (IsControlJustPressed(0, 172)) //Press arrow up to create nametag on player
                UpdateOwnNametag(false, false);

            if (HeadDisplayId > -1)
            {
                if (IsControlJustPressed(0, 173)) //Press arrow down to delete nametag
                {
                    if (IsMpGamerTagActive(HeadDisplayId))
                        RemoveMpGamerTag(HeadDisplayId);

                    HeadDisplayId = -1;
                }

                if (IsControlPressed(0, 51)) //Hold E when pressing arrow down to trigger this native, resulting in a crash
                    N_0xa67f9c46d612b6f1(HeadDisplayId, true); //running this after deleting the nametag on the same tick causes a juliet-mirror-robert crash because "RemoveMpGamerTag" native fails
            }

            if (IsControlJustPressed(0, 174)) //Press arrow left to toggle health bar vehicle mode
                UpdateOwnNametag(true, false);

            if (IsControlJustPressed(0, 175)) //Press arrow right to toggle custom health bar values
                UpdateOwnNametag(false, true);

            await Task.FromResult(0);
        }

        private void UpdateOwnNametag(bool TestHealthBarVehicleModeNative, bool TestCustomHealthBarValueNative)
        {
            string PlayerName = GetPlayerName(PlayerId);
            int PlayerPed = GetPlayerPed(PlayerId);
            bool GamertagExists = HeadDisplayId == -1 ? false : IsMpGamerTagActive(HeadDisplayId);

            if (!GamertagExists)
            {
                HeadDisplayId = CreateMpGamerTag(PlayerPed, PlayerName, false, false, "", 0);

                if (HeadDisplayId > -1 && IsMpGamerTagActive(HeadDisplayId))
                {
                    SetMpGamerTagVisibility(HeadDisplayId, 2, true);
                    SetMpGamerTagAlpha(HeadDisplayId, 2, 255);
                    GamertagExists = true;
                }
            }

            if (GamertagExists)
            {
                if (TestHealthBarVehicleModeNative)
                    N_0xa67f9c46d612b6f1(HeadDisplayId, true); //set health bar to display current player vehicle health instead of player ped's health - invokenative execution fails (running this in a loop makes the issues more obvious: can crash the game with music-sierra-xray when being inside a vehicle (sometimes game closes without any error log))

                if (TestCustomHealthBarValueNative)
                {
                    Function.Call((Hash)0xD29EC58C2F6B5014, HeadDisplayId, true); //allow overriding health bar value - instantly crashes the game with comet-jupiter-six
                    Function.Call((Hash)0x1563FE35E9928E67, HeadDisplayId, 50, 100); //override health bar value to make it halfway filled - DOES NOT seem to cause an error
                }
            }
        }
    }
}

Here’s the compiled script for testing: testscript.rar (3.1 KB)

1 Like

Moved to bug reports

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.