Zeex / samp-plugin-profiler

Performance profiler plugin for SA-MP server
http://forum.sa-mp.com/showthread.php?t=271129
BSD 2-Clause "Simplified" License
46 stars 8 forks source link

Крэш при старте #11

Closed dimaz1k closed 10 years ago

dimaz1k commented 10 years ago

Крэшит при старте, вот что показывает crasdetect: [16:38:41] [profiler] Loaded debug info from 'gamemodes\public.amx' [16:38:41] [profiler] Attached profiler to 'gamemodes\public.amx' OnGameModeInit [16:38:41] [debug] Server crashed while executing public.amx [16:38:41] [debug] AMX backtrace: [16:38:41] [debug] #0 00008858 in public SSCANF_OnGameModeInit () from public.amx [16:38:41] [debug] #1 00001920 in public OnGameModeInit () from public.amx [16:38:42] [debug] Native backtrace: [16:38:42] [debug] #0 6a9037b4 in ?? () from C:\Users\User\Desktop\PUBLIC\plugins\profiler.DLL [16:38:42] [debug] #1 6a8fd280 in ?? () from C:\Users\User\Desktop\PUBLIC\plugins\profiler.DLL [16:38:42] [debug] #2 6a8fda4f in ?? () from C:\Users\User\Desktop\PUBLIC\plugins\profiler.DLL [16:38:42] [debug] #3 6a8fc888 in ?? () from C:\Users\User\Desktop\PUBLIC\plugins\profiler.DLL [16:38:42] [debug] #4 6a8f634d in ?? () from C:\Users\User\Desktop\PUBLIC\plugins\profiler.DLL [16:38:42] [debug] #5 6a9d813b in ?? () from C:\Users\User\Desktop\PUBLIC\plugins\crashdetect.D LL [16:38:42] [debug] #6 6a9d0091 in ?? () from C:\Users\User\Desktop\PUBLIC\plugins\crashdetect.D LL [16:38:42] [debug] #7 6a9d610a in ?? () from C:\Users\User\Desktop\PUBLIC\plugins\crashdetect.D LL [16:38:42] [debug] #8 6a8fca7b in ?? () from C:\Users\User\Desktop\PUBLIC\plugins\profiler.DLL [16:38:42] [debug] #9 6a8f6664 in ?? () from C:\Users\User\Desktop\PUBLIC\plugins\profiler.DLL [16:38:42] [debug] #10 0046e194 in ?? () from C:\Users\User\Desktop\PUBLIC\samp-server.exe [16:38:42] [debug] #11 65646f6d in ?? () from C:\Users\User\Desktop\PUBLIC\samp-server.exe [16:38:42] [debug] #12 75702f73 in ?? () from C:\Users\User\Desktop\PUBLIC\samp-server.exe [16:38:42] [debug] #13 63696c62 in ?? () from C:\Users\User\Desktop\PUBLIC\samp-server.exe [16:38:42] [debug] #14 786d612e in ?? () from C:\Users\User\Desktop\PUBLIC\samp-server.exe

Zeex commented 10 years ago

А есть crashinfo.txt для этого же вылета?

dimaz1k commented 10 years ago

Нет, если надо могу еще раз плагин подключить и крашинфо дать.

Zeex commented 10 years ago

Было бы неплохо

dimaz1k commented 10 years ago

crashinfo


SA-MP Server: 0.3x

Exception At Address: 0x786D612E Module: (Unknown)

Registers:

EAX: 0x0018FB54 EBX: 0x00008A58 ECX: 0x00000000 EDX: 0x63696C62

ESI: 0x0000003A EDI: 0x02829748 EBP: 0x63696C62 ESP: 0x004F2424

EFLAGS: 0x00010206

Stack:

+0000: 0x00000000 0x00000000 0x00000000 0x00000000

+0010: 0x00000000 0x00000000 0x00000000 0x00000000

+0020: 0x00000000 0x00000000 0x00000000 0x00000000

+0030: 0x00000000 0x00000000 0x00000000 0x00000000

+0040: 0x00000000 0x00000000 0x00000000 0x00000000

+0050: 0x00000000 0x00000000 0x00000000 0x00000000

+0060: 0x00000000 0x00000000 0x00000000 0x00000000

+0070: 0x00000000 0x00000000 0x00000000 0x00000000

+0080: 0x00000000 0x00000000 0x00000000 0x00000000

+0090: 0x00000000 0x00000000 0x00000000 0x00000000

+00A0: 0x00000000 0x00000000 0x00000000 0x00000000

+00B0: 0x00000000 0x00000000 0x00000000 0x00000000

+00C0: 0x00000000 0x00000000 0x00000000 0x00000000

+00D0: 0x00000000 0x00000000 0x00000000 0x00000000

+00E0: 0x00000000 0x00000000 0x00000000 0x00000000

+00F0: 0x00FED11A 0x00000000 0x0029CE60 0x00000000

+0100: 0x00000000 0x00000000 0x00000000 0x00000000

+0110: 0x00000000 0x00000000 0x00000000 0x00000000

+0120: 0x00000070 0x00000000 0x00000000 0x00000000

+0130: 0x00000000 0x00000000 0x00000000 0x00000000


Loaded Modules:

samp-server.exe A: 0x00400000 - 0x004F5000 (C:\Users\User\Desktop\PUBLIC\samp-server.exe)

ntdll.dll A: 0x77710000 - 0x77890000 (C:\Windows\SysWOW64\ntdll.dll)

kernel32.dll A: 0x76800000 - 0x76910000 (C:\Windows\syswow64\kernel32.dll)

KERNELBASE.dll A: 0x76A30000 - 0x76A77000 (C:\Windows\syswow64\KERNELBASE.dll)

SHELL32.dll A: 0x75260000 - 0x75EAA000 (C:\Windows\syswow64\SHELL32.dll)

msvcrt.dll A: 0x76070000 - 0x7611C000 (C:\Windows\syswow64\msvcrt.dll)

SHLWAPI.dll A: 0x772B0000 - 0x77307000 (C:\Windows\syswow64\SHLWAPI.dll)

GDI32.dll A: 0x762A0000 - 0x76330000 (C:\Windows\syswow64\GDI32.dll)

USER32.dll A: 0x76590000 - 0x76690000 (C:\Windows\syswow64\USER32.dll)

ADVAPI32.dll A: 0x77210000 - 0x772B0000 (C:\Windows\syswow64\ADVAPI32.dll)

sechost.dll A: 0x76A80000 - 0x76A99000 (C:\Windows\SysWOW64\sechost.dll)

RPCRT4.dll A: 0x76C50000 - 0x76D40000 (C:\Windows\syswow64\RPCRT4.dll)

SspiCli.dll A: 0x75170000 - 0x751D0000 (C:\Windows\syswow64\SspiCli.dll)

CRYPTBASE.dll A: 0x75160000 - 0x7516C000 (C:\Windows\syswow64\CRYPTBASE.dll)

LPK.dll A: 0x76290000 - 0x7629A000 (C:\Windows\syswow64\LPK.dll)

USP10.dll A: 0x77100000 - 0x7719D000 (C:\Windows\syswow64\USP10.dll)

WSOCK32.dll A: 0x72C10000 - 0x72C17000 (C:\Windows\system32\WSOCK32.dll)

WS2_32.dll A: 0x767B0000 - 0x767E5000 (C:\Windows\syswow64\WS2_32.dll)

NSI.dll A: 0x76DE0000 - 0x76DE6000 (C:\Windows\syswow64\NSI.dll)

WINMM.dll A: 0x727B0000 - 0x727E2000 (C:\Windows\system32\WINMM.dll)

IMM32.DLL A: 0x771A0000 - 0x77200000 (C:\Windows\system32\IMM32.DLL)

MSCTF.dll A: 0x76DF0000 - 0x76EBC000 (C:\Windows\syswow64\MSCTF.dll)

MapAndreas.DLL A: 0x72D70000 - 0x72D87000 (C:\Users\User\Desktop\PUBLIC\plugins\MapAndreas.DLL)

MSVCP100.dll A: 0x723F0000 - 0x72459000 (C:\Windows\system32\MSVCP100.dll)

MSVCR100.dll A: 0x6C680000 - 0x6C73F000 (C:\Windows\system32\MSVCR100.dll)

sql.DLL A: 0x73240000 - 0x7324E000 (C:\Users\User\Desktop\PUBLIC\plugins\sql.DLL)

libmysql.dll A: 0x69AA0000 - 0x69F41000 (C:\Users\User\Desktop\PUBLIC\libmysql.dll)

Secur32.dll A: 0x72050000 - 0x72058000 (C:\Windows\system32\Secur32.dll)

MSVCP110.dll A: 0x6BFC0000 - 0x6C045000 (C:\Windows\system32\MSVCP110.dll)

MSVCR110.dll A: 0x6BEE0000 - 0x6BFB6000 (C:\Windows\system32\MSVCR110.dll)

NLAapi.dll A: 0x72C00000 - 0x72C10000 (C:\Windows\system32\NLAapi.dll)

napinsp.dll A: 0x72BF0000 - 0x72C00000 (C:\Windows\system32\napinsp.dll)

pnrpnsp.dll A: 0x72BD0000 - 0x72BE2000 (C:\Windows\system32\pnrpnsp.dll)

mswsock.dll A: 0x72B90000 - 0x72BCC000 (C:\Windows\System32\mswsock.dll)

DNSAPI.dll A: 0x72B40000 - 0x72B84000 (C:\Windows\system32\DNSAPI.dll)

winrnr.dll A: 0x72B30000 - 0x72B38000 (C:\Windows\System32\winrnr.dll)

rasadhlp.dll A: 0x723A0000 - 0x723A6000 (C:\Windows\system32\rasadhlp.dll)

sscanf.DLL A: 0x10000000 - 0x1000D000 (C:\Users\User\Desktop\PUBLIC\plugins\sscanf.DLL)

streamer.DLL A: 0x72D30000 - 0x72D6E000 (C:\Users\User\Desktop\PUBLIC\plugins\streamer.DLL)

audio.DLL A: 0x71FF0000 - 0x7203F000 (C:\Users\User\Desktop\PUBLIC\plugins\audio.DLL)

memory.DLL A: 0x73210000 - 0x73216000 (C:\Users\User\Desktop\PUBLIC\plugins\memory.DLL)

dc_cmd.DLL A: 0x72FE0000 - 0x72FE2000 (C:\Users\User\Desktop\PUBLIC\plugins\dc_cmd.DLL)

timerfix.DLL A: 0x72FB0000 - 0x72FB8000 (C:\Users\User\Desktop\PUBLIC\plugins\timerfix.DLL)

CRP.DLL A: 0x72D20000 - 0x72D26000 (C:\Users\User\Desktop\PUBLIC\plugins\CRP.DLL)

MSVCR90.dll A: 0x699F0000 - 0x69A93000 (C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\MSVCR90.dll)

wshtcpip.dll A: 0x72B10000 - 0x72B15000 (C:\Windows\System32\wshtcpip.dll)

profiler.DLL A: 0x6EC10000 - 0x6EC4C000 (C:\Users\User\Desktop\PUBLIC\plugins\profiler.DLL)

IPHLPAPI.DLL A: 0x72AF0000 - 0x72B0C000 (C:\Windows\system32\IPHLPAPI.DLL)

WINNSI.DLL A: 0x72AE0000 - 0x72AE7000 (C:\Windows\system32\WINNSI.DLL)

wship6.dll A: 0x72B20000 - 0x72B26000 (C:\Windows\System32\wship6.dll)

ЛОГИ: [15:10:24] [profiler] Loaded debug info from 'gamemodes\public.amx' [15:10:24] [profiler] Attached profiler to 'gamemodes\public.amx' [15:10:24] [debug] Server crashed while executing public.amx [15:10:24] [debug] AMX backtrace: [15:10:24] [debug] #0 00008a60 in public SSCANF_OnGameModeInit () from public.amx [15:10:24] [debug] #1 00001b64 in public OnGameModeInit () from public.amx [15:10:24] [debug] Native backtrace: [15:10:24] [debug] #0 6ec337b4 in ?? () from C:\Users\User\Desktop\PUBLIC\plugins\profiler.DLL [15:10:24] [debug] #1 6ec2d280 in ?? () from C:\Users\User\Desktop\PUBLIC\plugins\profiler.DLL [15:10:24] [debug] #2 6ec2da4f in ?? () from C:\Users\User\Desktop\PUBLIC\plugins\profiler.DLL [15:10:24] [debug] #3 6ec2c888 in ?? () from C:\Users\User\Desktop\PUBLIC\plugins\profiler.DLL [15:10:24] [debug] #4 6ec2634d in ?? () from C:\Users\User\Desktop\PUBLIC\plugins\profiler.DLL [15:10:24] [debug] #5 6bec813b in ?? () from C:\Users\User\Desktop\PUBLIC\plugins\crashdetect.DLL [15:10:24] [debug] #6 6bec0091 in ?? () from C:\Users\User\Desktop\PUBLIC\plugins\crashdetect.DLL [15:10:24] [debug] #7 6bec610a in ?? () from C:\Users\User\Desktop\PUBLIC\plugins\crashdetect.DLL [15:10:24] [debug] #8 6ec2ca7b in ?? () from C:\Users\User\Desktop\PUBLIC\plugins\profiler.DLL [15:10:24] [debug] #9 6ec26664 in ?? () from C:\Users\User\Desktop\PUBLIC\plugins\profiler.DLL [15:10:24] [debug] #10 0046e194 in ?? () from C:\Users\User\Desktop\PUBLIC\samp-server.exe [15:10:24] [debug] #11 65646f6d in ?? () from C:\Users\User\Desktop\PUBLIC\samp-server.exe [15:10:24] [debug] #12 75702f73 in ?? () from C:\Windows\syswow64\SHELL32.dll [15:10:24] [debug] #13 63696c62 in ?? () from C:\Users\User\Desktop\PUBLIC\samp-server.exe [15:10:24] [debug] #14 786d612e in ?? () from C:\Users\User\Desktop\PUBLIC\samp-server.exe

Zeex commented 10 years ago

Спасибо конечно, но из этой крэшинфы ничего нового узнать не получилось, скорее всего т.к. crashdetect был запущен тоже. Лучше её всё-таки отдельно заполучить. Я как бы понял, где именно ошибка в профайлере, но не совсем ясно каким образом так могло получиться (точнее, совсем неясно, если судить по коду, то вообще такого быть не может); значения регистров могли бы помочь, но они похоже из другого контекста.

Без отладочной инфы тоже сервак падает или нет? т.е. когда компиляешь скрипт без -d3 (обычно в этом случае написано "no debug info")? Т.к. судя по ошибка возникает именно при поиске назнвания какой-то функции.

Zeex commented 10 years ago

А вообще, если не трудно, можно записать дамп всего процесса с помощью procdump, это бы вообще здорово помогло:

cd C:\Users\User\Desktop\PUBLIC
procdump -e -ma -x samp-server.exe samp-server.dmp

(это всё в консоли виндовой)

Procdump можно взять тут: http://technet.microsoft.com/en-us/sysinternals/dd996900.aspx (для простоты можно скинуть procdump.exe прямо в папку с сервером или в C:\Windows)

dimaz1k commented 10 years ago

Да, без -d3 пишет no debug info. А procdump ошибку выдает

Microsoft Windows Version 6.1.7601 Корпорация Майкрософт (Microsoft Corp.), 2009. Все права защищены.

C:\Users\User>cd C:\Users\User\Desktop\PUBLIC

C:\Users\User\Desktop\PUBLIC>procdump -e -ma -x samp-server.exe samp-server.dmp

ProcDump v6.00 - Writes process dump files Copyright (C) 2009-2013 Mark Russinovich Sysinternals - www.sysinternals.com With contributions from Andrew Richards

Error launching samp-server.dmp: Error 2 (0x2): ?? ??????? ????? ????????? ????.

C:\Users\User\Desktop\PUBLIC>

dimaz1k commented 10 years ago

изменил на procdump -e -ma -x samp-server.dmp samp-server.exe, все записалось вот дамп http://goo.gl/RY6z2W

dimaz1k commented 10 years ago

Попробовал по убирать разные функции из OnGameModeInit, только когда половину поубирал, мод смог запуститься. И крашило на разных функциях (то AddStaticVehicle, то CreateMenu и тд.).

dimaz1k commented 10 years ago

Скомпилировал мод стандартным PAWNO без патчей, все отлично.