03.02.2014, 00:39
I've updated crashdetect to latest version and compiled with -d3, but I completely don't understand this crash dump
I'm quite certain that crash doesn't come from SSCANF_Join, but I checked it's source anyway.
Just copying namestring, nothing what could cause that crash. My code is minimalistic:
And the onplayerconnect is simply "return 1". What should I check now?
Quote:
[02:43:08] *** Test PlayerConnect start [02:43:08] [debug] Server crashed while executing projectX.amx [02:43:08] [debug] AMX backtrace: [02:43:08] [debug] #0 native SSCANF_Join () [10005620] from sscanf.DLL [02:43:08] [debug] #1 00024f14 in public Streamer_OnPlayerConnect (playerid=0) at X:\Area69\pawno\include\sscanf2.inc:201 [02:43:08] [debug] #2 00024960 in public Itter_OnPlayerConnect (playerid=0) at X:\Area69\pawno\include\streamer.inc:277 [02:43:08] [debug] #3 000121d0 in ?? (... <1 argument>) at X:\Area69\pawno\include\YSI\y_iterate.inc:646 [02:43:08] [debug] #4 00009144 in public Audio_OnPlayerConnect (playerid=0) at X:\Area69\pawno\include\YSI\y_hooks/impl.inc:618 [02:43:08] [debug] #5 native CallLocalFunction () [004722d0] from samp-server.exe [02:43:08] [debug] #6 00001b04 in public OnPlayerConnect (playerid=0) at X:\Area69\pawno\include\audio.inc:144 [02:43:08] [debug] #7 native CallRemoteFunction () [00471f20] from samp-server.exe [02:43:08] [debug] #8 0004285c in public bool:Tezt_@PlayerConnect () at projectX\vehicles_tests.inc:5 [02:43:08] [debug] #9 native CallLocalFunction () [004722d0] from samp-server.exe [02:43:08] [debug] #10 0003f528 in bool:Testing_Run (&tests=@0x0210ead0, &fails=@0x0210eacc, lastfail[33]=@0x0210ea48 "", bool=false) at X:\Area69\pawno\include\YSI\y_testing.inc:299 [02:43:08] [debug] #11 000426e8 in ?? () at projectX\tests.inc:39 [02:43:08] [debug] #12 00008d64 in public ScriptInit_OnGameModeInit () at X:\Area69\pawno\include\YSI\y_hooks/impl.inc:484 [02:43:08] [debug] #13 00001cd8 in public Audio_OnGameModeInit () at X:\Area69\pawno\include\YSI\internal\..\y_scriptin it.inc:171 [02:43:08] [debug] #14 native CallLocalFunction () [004722d0] from samp-server.exe [02:43:08] [debug] #15 0000195c in public OnGameModeInit () at X:\Area69\pawno\include\audio.inc:119 [02:43:09] [debug] Native backtrace: [02:43:09] [debug] #0 1000564e in ?? () from plugins\sscanf.DLL [02:43:09] [debug] #1 004010b6 in ?? () from samp-server.exe [02:43:09] [debug] #2 715b58ca in ?? () from plugins\crashdetect.DLL [02:43:09] [debug] #3 715b774f in ?? () from plugins\crashdetect.DLL [02:43:09] [debug] #4 715b0834 in ?? () from plugins\crashdetect.DLL [02:43:09] [debug] #5 715b591a in ?? () from plugins\crashdetect.DLL [02:43:09] [debug] #6 004725de in ?? () from samp-server.exe [02:43:09] [debug] #7 004010b6 in ?? () from samp-server.exe [02:43:09] [debug] #8 715b58ca in ?? () from plugins\crashdetect.DLL [02:43:09] [debug] #9 715b774f in ?? () from plugins\crashdetect.DLL [02:43:09] [debug] #10 715b0834 in ?? () from plugins\crashdetect.DLL [02:43:09] [debug] #11 715b591a in ?? () from plugins\crashdetect.DLL [02:43:09] [debug] #12 00472287 in ?? () from samp-server.exe [02:43:09] [debug] #13 004010b6 in ?? () from samp-server.exe [02:43:09] [debug] #14 715b58ca in ?? () from plugins\crashdetect.DLL [02:43:09] [debug] #15 715b774f in ?? () from plugins\crashdetect.DLL [02:43:09] [debug] #16 715b0834 in ?? () from plugins\crashdetect.DLL [02:43:09] [debug] #17 715b591a in ?? () from plugins\crashdetect.DLL [02:43:09] [debug] #18 004725de in ?? () from samp-server.exe [02:43:09] [debug] #19 004010b6 in ?? () from samp-server.exe [02:43:09] [debug] #20 715b58ca in ?? () from plugins\crashdetect.DLL [02:43:09] [debug] #21 715b774f in ?? () from plugins\crashdetect.DLL [02:43:09] [debug] #22 715b0834 in ?? () from plugins\crashdetect.DLL [02:43:09] [debug] #23 715b591a in ?? () from plugins\crashdetect.DLL [02:43:09] [debug] #24 004725de in ?? () from samp-server.exe [02:43:09] [debug] #25 004010b6 in ?? () from samp-server.exe [02:43:09] [debug] #26 715b58ca in ?? () from plugins\crashdetect.DLL [02:43:09] [debug] #27 715b774f in ?? () from plugins\crashdetect.DLL [02:43:09] [debug] #28 715b0834 in ?? () from plugins\crashdetect.DLL [02:43:09] [debug] #29 715b591a in ?? () from plugins\crashdetect.DLL [02:43:09] [debug] #30 0046e584 in ?? () from samp-server.exe [02:43:09] [debug] #31 65646f6d in ?? () from samp-server.exe [02:43:09] [debug] #32 67752f73 in ?? () from samp-server.exe [02:43:09] [debug] #33 612e7072 in ?? () from samp-server.exe |
Код:
static void DoName(AMX * amx, cell playerid, cell name) { cell * str; int len; amx_GetAddr(amx, name, &str); amx_StrLen(str, &len); if ((unsigned int)len >= g_iMaxPlayerName) { len = (int)g_iMaxPlayerName - 1; } amx_GetString(g_szPlayerNames + (g_iMaxPlayerName * playerid), str, 0, len + 1); } static cell AMX_NATIVE_CALL n_SSCANF_Join(AMX * amx, cell * params) { if (params[0] != 3 * sizeof (cell)) { logprintf("sscanf error: SSCANF_Join has incorrect parameters."); return 0; } cell playerid = params[1]; ++g_iConnected[playerid]; DoName(amx, playerid, params[2]); g_iNPC[playerid] = params[3]; return 1; }
pawn Код:
Test:PlayerConnect()
{
call OnPlayerConnect(0);
}