Southclaws/ScavengeSurvive

Server freeze after player login/spawn

MeIsAlan opened this issue · 2 comments

Hey there! I've just compiled Scavenge And survive The latest version from the main branch.
Everything works fine until I login into the server, You can see how it goes in the attached video.

Server logs:

[10:18:44] [debug]
[10:18:44] [debug] Parameter count corrections:
[10:18:44] [debug]
[10:18:44] [debug] The 1st mangled argments (e.g. `<1073741823 arguments>`) below should read `<1 arguments>`
[10:18:44] [debug]
[10:18:44] [debug] Run time error 5: "Invalid memory access"
[10:18:44] [debug] AMX backtrace:
[10:18:44] [debug] #0 000ac4a8 in public OnPlayerScriptUpdate () at C:\Users\me\Desktop\the attempt\gamemodes\sss/utils/item.pwn:32
[10:18:44] [debug] #1 native CallLocalFunction () in samp-server.exe
[10:18:44] [debug] #2 000b7968 in public PlayerUpdateSlow (playerid=0) at C:\Users\me\Desktop\the attempt\gamemodes\sss/core/player/player.pwn:309
[10:18:45] [debug]
[10:18:45] [debug] Parameter count corrections:
[10:18:45] [debug]
[10:18:45] [debug] The 1st mangled argments (e.g. `<1073741823 arguments>`) below should read `<1 arguments>`
[10:18:45] [debug]
[10:18:45] [debug] Run time error 5: "Invalid memory access"
[10:18:45] [debug] AMX backtrace:
[10:18:45] [debug] #0 000ac4a8 in public OnPlayerScriptUpdate () at C:\Users\me\Desktop\the attempt\gamemodes\sss/utils/item.pwn:32
[10:18:45] [debug] #1 native CallLocalFunction () in samp-server.exe
[10:18:45] [debug] #2 000b7968 in public PlayerUpdateSlow (playerid=0) at C:\Users\me\Desktop\the attempt\gamemodes\sss/core/player/player.pwn:309
[10:18:46] [debug]
[10:18:46] [debug] Parameter count corrections:
[10:18:46] [debug]
[10:18:46] [debug] The 1st mangled argments (e.g. `<1073741823 arguments>`) below should read `<1 arguments>`
[10:18:46] [debug]
[10:18:46] [debug] Run time error 5: "Invalid memory access"
[10:18:46] [debug] AMX backtrace:
[10:18:46] [debug] #0 000ac4a8 in public OnPlayerScriptUpdate () at C:\Users\me\Desktop\the attempt\gamemodes\sss/utils/item.pwn:32
[10:18:46] [debug] #1 native CallLocalFunction () in samp-server.exe
[10:18:46] [debug] #2 000b7968 in public PlayerUpdateSlow (playerid=0) at C:\Users\me\Desktop\the attempt\gamemodes\sss/core/player/player.pwn:309
[10:18:47] [debug]
[10:18:47] [debug] Parameter count corrections:
[10:18:47] [debug]
[10:18:47] [debug] The 1st mangled argments (e.g. `<1073741823 arguments>`) below should read `<1 arguments>`
[10:18:47] [debug]
[10:18:47] [debug] Run time error 5: "Invalid memory access"
[10:18:47] [debug] AMX backtrace:
[10:18:47] [debug] #0 000ac4a8 in public OnPlayerScriptUpdate () at C:\Users\me\Desktop\the attempt\gamemodes\sss/utils/item.pwn:32
[10:18:47] [debug] #1 native CallLocalFunction () in samp-server.exe
[10:18:47] [debug] #2 000b7968 in public PlayerUpdateSlow (playerid=0) at C:\Users\me\Desktop\the attempt\gamemodes\sss/core/player/player.pwn:309
[10:18:48] [CHAT] [LOCAL] [Alan_Cabello]: t
[10:18:48] [debug]
[10:18:48] [debug] Parameter count corrections:
[10:18:48] [debug]
[10:18:48] [debug] The 1st mangled argments (e.g. `<1073741823 arguments>`) below should read `<1 arguments>`
[10:18:48] [debug]
[10:18:48] [debug] Run time error 5: "Invalid memory access"
[10:18:48] [debug] AMX backtrace:
[10:18:48] [debug] #0 000ac4a8 in public OnPlayerScriptUpdate () at C:\Users\me\Desktop\the attempt\gamemodes\sss/utils/item.pwn:32
[10:18:48] [debug] #1 native CallLocalFunction () in samp-server.exe
[10:18:48] [debug] #2 000b7968 in public PlayerUpdateSlow (playerid=0) at C:\Users\me\Desktop\the attempt\gamemodes\sss/core/player/player.pwn:309
[10:18:49] [debug]
[10:18:49] [debug] Parameter count corrections:
[10:18:49] [debug]
[10:18:49] [debug] The 1st mangled argments (e.g. `<1073741823 arguments>`) below should read `<1 arguments>`
[10:18:49] [debug]
[10:18:50] [debug] Run time error 5: "Invalid memory access"
[10:18:50] [debug] AMX backtrace:
[10:18:50] [debug] #0 000ac4a8 in public OnPlayerScriptUpdate () at C:\Users\me\Desktop\the attempt\gamemodes\sss/utils/item.pwn:32
[10:18:50] [debug] #1 native CallLocalFunction () in samp-server.exe
[10:18:50] [debug] #2 000b7968 in public PlayerUpdateSlow (playerid=0) at C:\Users\me\Desktop\the attempt\gamemodes\sss/core/player/player.pwn:309
[10:18:51] [debug]
[10:18:51] [debug] Parameter count corrections:
[10:18:51] [debug]
[10:18:51] [debug] The 1st mangled argments (e.g. `<1073741823 arguments>`) below should read `<1 arguments>`
[10:18:51] [debug]
[10:18:51] [debug] Run time error 5: "Invalid memory access"
[10:18:51] [debug] AMX backtrace:
[10:18:51] [debug] #0 000ac4a8 in public OnPlayerScriptUpdate () at C:\Users\me\Desktop\the attempt\gamemodes\sss/utils/item.pwn:32
[10:18:51] [debug] #1 native CallLocalFunction () in samp-server.exe
[10:18:51] [debug] #2 000b7968 in public PlayerUpdateSlow (playerid=0) at C:\Users\me\Desktop\the attempt\gamemodes\sss/core/player/player.pwn:309
[10:18:52] [debug]
[10:18:52] [debug] Parameter count corrections:
[10:18:52] [debug]
[10:18:52] [debug] The 1st mangled argments (e.g. `<1073741823 arguments>`) below should read `<1 arguments>`
[10:18:52] [debug]
[10:18:52] [debug] Run time error 5: "Invalid memory access"
[10:18:52] [debug] AMX backtrace:
[10:18:52] [debug] #0 000ac4a8 in public OnPlayerScriptUpdate () at C:\Users\me\Desktop\the attempt\gamemodes\sss/utils/item.pwn:32
[10:18:52] [debug] #1 native CallLocalFunction () in samp-server.exe
[10:18:52] [debug] #2 000b7968 in public PlayerUpdateSlow (playerid=0) at C:\Users\me\Desktop\the attempt\gamemodes\sss/core/player/player.pwn:309
[10:18:52] [CHAT] [LOCAL] [Alan_Cabello]: t
[10:18:53] [debug]
[10:18:53] [debug] Parameter count corrections:
[10:18:53] [debug]
[10:18:53] [debug] The 1st mangled argments (e.g. `<1073741823 arguments>`) below should read `<1 arguments>`
[10:18:53] [debug]
[10:18:53] [debug] Run time error 5: "Invalid memory access"
[10:18:53] [debug] AMX backtrace:
[10:18:53] [debug] #0 000ac4a8 in public OnPlayerScriptUpdate () at C:\Users\me\Desktop\the attempt\gamemodes\sss/utils/item.pwn:32
[10:18:53] [debug] #1 native CallLocalFunction () in samp-server.exe
[10:18:53] [debug] #2 000b7968 in public PlayerUpdateSlow (playerid=0) at C:\Users\me\Desktop\the attempt\gamemodes\sss/core/player/player.pwn:309

Video:

gta_sa.2022-11-05.10-18-35-689.mp4

Seems related to calling a callback from within a ptask. I'm not sure but I seem to remember a bug in YSI related to this.

ptask PlayerUpdateSlow[1000](playerid)
{
	CallLocalFunction("OnPlayerScriptUpdate", "d", playerid);
}

OnPlayerScriptUpdate is a y_hook'd event too so that introduces additional complexity.

Maybe @Y-Less could shed some light on the possible cause.