Requesting Additional Text chrashes the clients, when leaving the Server

When requesting additional text, for example with this:

if not HasThisAdditionalTextLoaded('global', 100) then
	ClearAdditionalText(100, true)
	RequestAdditionalText('global', 100)
	while not HasThisAdditionalTextLoaded('global', 100) do
		Citizen.Wait(0)
	end
end

The client will crash after leaving the server…

1 Like

Thats the error message it throws out, when I disconnect.

[Window Title]
Disconnected

[Main Instruction]
Oшибка

[Content]
Disconnected.

[Expanded Information]
Crash signature: fivem.exe+D2F182
Report ID: ... [uploading?] (use Ctrl+C to copy)

The last crash dump: 8d74919e-9947-488b-89b2-151385a527c2.dmp (4.8 MB)

The last CitizenFX.log: CitizenFX.log (79.9 KB)

1 Like

On my side the code below work fine and without any crash

 while (!API.HasAdditionalTextLoaded(0))
 {
    API.RequestAdditionalText("CLO_MNU", 0);
    await Delay(10);
 }

it’s strange to request global oxt that is loaded by default

:man_facepalming::man_facepalming: I never realized that I did this :sweat_smile:

Maybe thats the reason it crashed :face_with_raised_eyebrow:

Wow… I feel really dumb…

That was the problem :sweat_smile::sweat_smile:

1 Like

gets banned from the forums for posting fake bugs lol

Interestingly this actually happens on quite a few popular servers (~1.2k events per day) - might be required to block loading/unloading this specific text file:

https://servers.fivem.net/servers/detail/64.74.97.146:30115

https://servers.fivem.net/servers/detail/213.66.161.95:30120

https://servers.fivem.net/servers/detail/103.208.27.230:50007

(and 10 other servers on the same IP)

https://servers.fivem.net/servers/detail/103.91.206.36:1150

In reality, this doesn’t happen because of loading global.gxt2, but it happens when using a text slot index above 20: this leads to random memory corruption.