altmp / altv-issues

Issues and roadmap for alt:V project
93 stars 17 forks source link

HasStreamSyncedMetaData always returns true in Linux #765

Closed VictorFerraresi closed 3 years ago

VictorFerraresi commented 3 years ago

Client/server version

Build #1302, branch release

Current behavior Every call to IEntity.HasStreamSyncedMetaData(string) returns true if the server is running on a Linux environment. It won't happen while running on Windows.

Expected behavior It should return either true or false, based on the state of the requested variable.

Steps to reproduce Create an empty C# gamemode with the following lines inside a PlayerConnected event: player.SetStreamSyncedMetaData("test", 1); System.Console.WriteLine(player.HasStreamSyncedMetaData("test"));

Execute it both on Linux and Windows. The output is not turing complete.

Context (environment) I'm trying to check if the entity has a stream synced variable set.

Possible solution Can't tell much without knowledge of the source.

LeonMrBonnie commented 3 years ago

Can you test if this issue is also present in the latest RC version?

VictorFerraresi commented 3 years ago

Hello, I just updated my Linux server version to the Release branch merged from RC today (alt:V Server 2.3 (release)) and upgraded my netcoreapp3.1 to net5.0. Still happening. Behavior follows:

Snippet:

[ScriptEvent(ScriptEventType.PlayerEnterVehicle)]
public void OnPlayerEnterVehicle(IVehicle vehicle, IPlayer player, byte seat)
{
    System.Console.WriteLine("Result is " + player.HasStreamSyncedMetaData("idonthavethiskeyset"));
}

Output:

[23:55:44] Loaded resource RoleplayGamemode
[23:55:44] Required server permissions:
[23:55:44] Optional server permissions:
[23:55:44] Main thread started (ThreadId: 127885)
[23:55:44] Colshape thread started (ThreadId: 127886)
[23:55:44] EntityStreamer thread started (ThreadId: 127931)
[23:55:44] Console thread started (ThreadId: 127934)
[23:55:44] Server started
[23:55:44] Network thread started (ThreadId: 127933)
Result is True
Kingwolfi commented 3 years ago

I can confirm this issue, had troubles with it only on linux

zziger commented 3 years ago

Still always returns true

Arochka commented 3 years ago

Confirmed too

FabianTerhorst commented 3 years ago

fixed in c# rc update