fivem icon indicating copy to clipboard operation
fivem copied to clipboard

SendNetPacket Error Outside World Boundaries

Open Lutton-alliance opened this issue 8 months ago • 4 comments

What happened?

This crash freezes the game when using legacy sync (non onesync). I am fully aware that the preferred stance is to use onesync, but it cannot be used for us due to a specific requirement to see other players from distances far away.

It is related to modifying the world boundaries using the "ExtendWorldBoundaryForPlayer" native. It appears that going beyond 10,800 (give or take) in the X direction results in the game freezing even though theoretically the player has not yet reached the boundary set.

In October of 2024, a user reported this issue on RedM and an element said that this issue was fixed on the canary build (reference below), but this issue still persists on the FiveM side.

Reference: https://discordapp.com/channels/192358910387159041/1298882611304857600/1298882611304857600

Specific error that kills the game: SendNetPacket -1276497698 called from multiple threads!

Attached is an example crash dump log we have.

CitizenFX_log_2025-04-18T175929.log

Expected result

Player should not crash when beyond world boundaries using legacy sync

Reproduction steps

  1. Generic FX-Server (tested with 7290+) with onesync disabled
  2. A script using the ExtendWorldBoundaryForPlayer native (written below)
CreateThread(function()
    while true do
        ExtendWorldBoundaryForPlayer(
            -25000.0,
            -25000.0,
            30.0
        )  
        ExtendWorldBoundaryForPlayer(
            25000.0,
            25000.0,
            30.0
        ) 
		Wait(0)
    end
end)
  1. Using Vmenu or any other script that can display coordinates, go beyond 10,800 X and the client will crash.

Importancy

Crash

Area(s)

FiveM

Specific version(s)

Issue appears to be on all FiveM branches (release,beta,latest) & above Server Artifact 7290

Additional information

No response

Lutton-alliance avatar Apr 18 '25 18:04 Lutton-alliance

Trying to reproduce the issue but sadly I cant:

Image

DaniGP17 avatar Apr 20 '25 11:04 DaniGP17

For some reason reinstalling the localhost server fixes the crashing on a basic server. The issue now only occurs when there is a map near the border. Might be a collisions issue perhaps? I will have to investigate further. Issue only appears when onesync is disabled however. When onesync is enabled, the crash does not happen regardless.

Update:

The issue has returned. I am able to sometimes go past 10,800 X, but no clipping back and forth results in a freeze and ultimate crash. This is on windows artifact 14318 using the beta client version with onesync disabled.

Lutton-alliance avatar Apr 20 '25 22:04 Lutton-alliance

Can we get that map or a map that reproduce the issue?

DaniGP17 avatar Apr 21 '25 05:04 DaniGP17

If you can send a friend request to my discord (lutton), I can forward you a copy of the map (would rather not share the map in a public forum).

I also noticed that the error does pop up on console even with the map disabled, but the difference is that it does not crash my game.

Lutton-alliance avatar Apr 21 '25 15:04 Lutton-alliance