YSI-Includes icon indicating copy to clipboard operation
YSI-Includes copied to clipboard

Malloc_Free (Alloc:slot=6694182) error

Open MatheusAgL opened this issue 2 years ago • 6 comments

[05:37:24] [debug] Long callback execution detected (hang or performance issue)
[05:37:24] [debug] AMX backtrace:
[05:37:24] [debug] #0 0003c054 in Malloc_Free (Alloc:slot=6694182) at C:\Users\MASTER-PC\Desktop\Brasil-New-Start\dependencies\YSI-Includes\YSI_Coding\y_timers\..\y_malloc\y_malloc_funcs.inc:900
[05:37:24] [debug] #1 0003db90 in _Timer_F (Timer:slot=6694182, force=6694230) at C:\Users\MASTER-PC\Desktop\Brasil-New-Start\dependencies\YSI-Includes\YSI_Coding\y_timers\y_timers_impl.inc:511
[05:37:24] [debug] #2 0006660c in FadePopup (playerid=0, tempo=2000) at systems/hud/textdraws.inc:227
[05:37:24] [debug] #3 00156adc in StopDriftScore (playerid=0) at systems/vehicles/drift/popup.inc:127
[05:37:24] [debug] #4 001564dc in OnPlayerDriftEnd (playerid=0, reason=1, Float:distance=17.72940, time=1629) at systems/vehicles/drift/popup.inc:96
[05:37:24] [debug] #5 0012aa74 in WC_OnPlayerUpdate (0)  at C:\Users\MASTER-PC\Desktop\Brasil-New-Start\dependencies\drift-detection\drift-detection.inc:165
[05:37:24] [debug] #6 00102620 in OnPlayerUpdateACT (playerid=0) at C:\Users\MASTER-PC\Desktop\Brasil-New-Start\dependencies\samp-weapon-config\weapon-config.inc:2800
[05:37:24] [debug] #7 000910f0 in public OnPlayerUpdate (0) at systems/protection/rAct.inc:339
new Timer:timer_hide_popup[MAX_PLAYERS];

timer HidePopup[2000](playerid)
	PlayerTextDrawHide(playerid, popup_textdraw[playerid]);

stock FadePopup(playerid, tempo = 2000) {
    stop timer_hide_popup[playerid];
	timer_hide_popup[playerid] = defer HidePopup[tempo](playerid);
}

MatheusAgL avatar Feb 27 '22 23:02 MatheusAgL

[debug] Long callback execution detected (hang or performance issue)
[debug] AMX backtrace:
[debug] #0 0003c42c in Malloc_Free (Alloc:slot=6647277) at C:\Users\MASTER-PC\Desktop\Brasil-New-Start\dependencies\YSI-Includes\YSI_Coding\y_timers\..\y_malloc\y_malloc_funcs.inc:903
[debug] #1 0003df00 in _Timer_F (Timer:slot=6647277, force=0) at C:\Users\MASTER-PC\Desktop\Brasil-New-Start\dependencies\YSI-Includes\YSI_Coding\y_timers\y_timers_impl.inc:511
[debug] #2 000686c4 in public @_yTKickBanido (6647213, 0) at C:\Users\MASTER-PC\Desktop\Brasil-New-Start\gamemodes\main.pwn:166
timer KickBanido[1000](playerid) {
	return Kick(playerid);
}

defer KickBanido[1000](idplayer);

MatheusAgL avatar Mar 15 '22 23:03 MatheusAgL

When I try the version 5.05.0505, it generates these errors:

redefinition of constant/macro (symbol "u@$")

MatheusAgL avatar Mar 15 '22 23:03 MatheusAgL

Are you stopping a timer inside itself?

Y-Less avatar Mar 20 '22 10:03 Y-Less

I did some tests and found that in the recent version I can't stop a timer in OnPlayerDisconnect, as the server freezes if the timer is already stopped.

Example:

public OnPlayerConnect(playerid) {
	LoginTimer[playerid] = repeat FinishInterpolateCamera(playerid);
}

public OnPlayerSpawn(playerid) {
	stop LoginTimer[playerid];
}

public OnPlayerDisconnect(playerid, reason) {
	stop LoginTimer[playerid];
}

MatheusAgL avatar Mar 20 '22 20:03 MatheusAgL

I did some tests and found that in the recent version I can't stop a timer in OnPlayerDisconnect, as the server freezes if the timer is already stopped.

Example:

public OnPlayerConnect(playerid) {
	LoginTimer[playerid] = repeat FinishInterpolateCamera(playerid);
}

public OnPlayerSpawn(playerid) {
	stop LoginTimer[playerid];
}

public OnPlayerDisconnect(playerid, reason) {
	stop LoginTimer[playerid];
}

same problem to me

tinwritescode avatar Jun 28 '22 14:06 tinwritescode

Is this still a problem? I've done some more work on enabling killing timers twice.

Y-Less avatar Apr 24 '24 21:04 Y-Less