Skip to content

Pickup crash and how to produce + Streamer Plugin #144

@devbluen

Description

@devbluen

Hello everybody.
I ended up discovering a glitch that causes the server to freeze. I will explain below

In "OnPlayerDisconnect" if you use "CallRemoteFunction" and create a new callback that causes the pickup to be destroyed, the server freezes for no reason.

To reproduce this problem is easy. Create a DynamicPickup stay close to it and I destroy it by disconnecting using the CallRemoteFunction that redirects to another callback.

Note: This bug has only been tested with the "DestroyDynamic" streamer plugin

Example:

new Picp[MAX_PLAYERS];
public OnPlayerSpawn(playerid)
{
new Float:TempPos[3];
GetPlayerPos(playerid, TempPos[0], TempPos[1], TempPos[2]);
Picp[playerid] = CreateDynamicPickup(1239, 1, TempPos[0], TempPos[1], TempPos[2], 0, 0, playerid, 60.0, -1, 0);
return true;
}

public OnPlayerDisconnect(playerid, reason)
{
CallRemoteFunction("Test_Destroy", "d", playerid);
return true;
}

forward Test_Destroy(playerid);
public Test_Destroy(playerid)
{
DestroyDynamicPickup(Picp[playerid]);
return true;
}

This code above is just an example, if you want to reproduce this is the correct way.

I will emphasize again. For this problem to happen you need to be close to the pickup and the callback must be called via "OnPlayerDisconnect" with "CallRemoteFunction"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions