samp-server.exe is closing - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Server (
https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (
https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: samp-server.exe is closing (
/showthread.php?tid=585064)
samp-server.exe is closing -
Terrorizt - 10.08.2015
Well whenever i start the samp-server.exe it loads plugins etc but when it starts loading the GM it crashes.
I've put crashdetect.dll and i got these messages:
Код:
[17:20:57] [debug] Server crashed while executing EM.amx
[17:20:57] [debug] AMX backtrace:
[17:20:57] [debug] #0 native fwrite () from samp-server.exe
[17:20:57] [debug] #1 00004fe8 in ?? (5310400, 427640) from EM.amx
[17:20:57] [debug] #2 000065b0 in ?? (427640, 4769196, 5311456) from EM.amx
[17:20:57] [debug] #3 00006688 in ?? (427640, 4769196, 0) from EM.amx
[17:20:57] [debug] #4 000a3c64 in ?? (0) from EM.amx
[17:20:57] [debug] #5 0006f46c in public zcmd_OnGameModeInit () from EM.amx
[17:20:57] [debug] #6 native CallLocalFunction () from samp-server.exe
[17:20:57] [debug] #7 00008284 in public IRC_OnGameModeInit () from EM.amx
[17:20:57] [debug] #8 native CallLocalFunction () from samp-server.exe
[17:20:57] [debug] #9 00007e4c in public OnGameModeInit () from EM.amx
[17:20:57] [debug] Native backtrace:
[17:20:57] [debug] #0 775cf592 in ?? () from C:\Windows\SYSTEM32\ntdll.dll
[17:20:57] [debug] #1 00498b48 in ?? () from samp-server.exe
[17:20:57] [debug] #2 0040531e in ?? () from samp-server.exe
Help me :/
Re: samp-server.exe is closing -
Abagail - 10.08.2015
Guessing by the first line(fwrite) you may be attempting to access an invalid file handle(this is stated in the wiki).
Example, say we have this code when the gamemode initiates:
pawn Код:
public OnGameModeInit()
{
new File: handle = fopen("files/file.cfg", io_write);
fwrite(handle, "chicken");
fclose(handle);
return 1;
}
Let's say the scriptfiles directory is clean. It doesn't have a files directory nor a files.cfg file. The server assumes you check the handle before operating(an invalid file handle result in fopen won't crash the server, other file functions will!) and attempts to open the file but is unable to locate it and this results in unexpected behavior which leads to a server crash.
To fix this we can check if the handle is valid by simply checking if the file handle is more than 0.
Example:
[pawn]
pawn Код:
public OnGameModeInit()
{
new File: handle = fopen("files/file.cfg", io_write);
if(handle)
{
fwrite(handle, "chicken");
fclose(handle);
}
return 1;
}
Re : samp-server.exe is closing -
Terrorizt - 10.08.2015
This is my crashinfo.txt maybe it helps you
Код:
--------------------------
SA-MP Server: 0.3.7-R2
Exception At Address: 0x0040531E Module: (samp-server.exe)
Registers:
EAX: 0x00000024 EBX: 0x00000049 ECX: 0x00000020 EDX: 0x7FFDD000
ESI: 0x00000000 EDI: 0x03D579B0 EBP: 0x00000000 ESP: 0x0018EE60
EFLAGS: 0x00210202
Stack:
+0000: 0x00000049 0x00000000 0x03D579A4 0x0018EE88
+0010: 0x00000001 0x0040575F 0x00000001 0x0000000D
+0020: 0x0270A270 0x00000006 0x0018EFB8 0x004010B6
+0030: 0x0270A270 0x03D579B0 0x02128C58 0x67AC01B4
+0040: 0x0270A270 0x0000000D 0x0018F02C 0x03D579A4
+0050: 0x1D7B9B37 0x036F1F54 0x0270A270 0x00000001
+0060: 0x00000000 0x0270A270 0x00000000 0x005107AC
+0070: 0x00004FE8 0x0000000D 0x00000000 0x00000000
+0080: 0x00000000 0x003807C8 0x00000000 0x00000000
+0090: 0x00000000 0x00000020 0x00000000 0x00000000
+00A0: 0x00000000 0x021262D0 0x00380000 0x00000000
+00B0: 0x00000000 0x003801C4 0x0038088C 0x00380888
+00C0: 0x00000000 0x0018EFB0 0x775CFD4B 0x00000014
+00D0: 0x00000000 0x00000004 0x67AEA78C 0x775CFD82
+00E0: 0x02120000 0x00000000 0x00000020 0x775D1F59
+00F0: 0x00000002 0x00000014 0x00000000 0x00000000
+0100: 0x00000040 0x00000000 0x00000000 0x00000000
+0110: 0x006100C0 0x00000000 0x00610260 0x02000002
+0120: 0x03D579A4 0x0018F02C 0x00000000 0x0270A270
+0130: 0x036F1F54 0x67AEA75C 0x0018EFB4 0x67ABF17F
--------------------------
Loaded Modules:
samp-server.exe A: 0x00400000 - 0x00519000 (C:\Users\admin\Desktop\TMP\samp-server.exe)
ntdll.dll A: 0x77580000 - 0x776D7000 (C:\Windows\SYSTEM32\ntdll.dll)
KERNEL32.DLL A: 0x768E0000 - 0x76A10000 (C:\Windows\SYSTEM32\KERNEL32.DLL)
KERNELBASE.dll A: 0x77410000 - 0x774B6000 (C:\Windows\SYSTEM32\KERNELBASE.dll)
SHELL32.dll A: 0x75570000 - 0x76635000 (C:\Windows\SYSTEM32\SHELL32.dll)
USER32.dll A: 0x76FF0000 - 0x77106000 (C:\Windows\SYSTEM32\USER32.dll)
WSOCK32.dll A: 0x70170000 - 0x70178000 (C:\Windows\SYSTEM32\WSOCK32.dll)
WINMM.dll A: 0x74A90000 - 0x74AB1000 (C:\Windows\SYSTEM32\WINMM.dll)
msvcrt.dll A: 0x752E0000 - 0x75391000 (C:\Windows\SYSTEM32\msvcrt.dll)
combase.dll A: 0x74D30000 - 0x74E66000 (C:\Windows\SYSTEM32\combase.dll)
SHLWAPI.dll A: 0x76860000 - 0x768A0000 (C:\Windows\SYSTEM32\SHLWAPI.dll)
GDI32.dll A: 0x75020000 - 0x7511D000 (C:\Windows\SYSTEM32\GDI32.dll)
WS2_32.dll A: 0x76FA0000 - 0x76FF0000 (C:\Windows\SYSTEM32\WS2_32.dll)
WINMMBASE.dll A: 0x74A60000 - 0x74A8A000 (C:\Windows\SYSTEM32\WINMMBASE.dll)
RPCRT4.dll A: 0x76640000 - 0x766EC000 (C:\Windows\SYSTEM32\RPCRT4.dll)
NSI.dll A: 0x77110000 - 0x77118000 (C:\Windows\SYSTEM32\NSI.dll)
SspiCli.dll A: 0x74C20000 - 0x74C3C000 (C:\Windows\SYSTEM32\SspiCli.dll)
CRYPTBASE.dll A: 0x74C10000 - 0x74C19000 (C:\Windows\SYSTEM32\CRYPTBASE.dll)
sechost.dll A: 0x74C40000 - 0x74C74000 (C:\Windows\SYSTEM32\sechost.dll)
bcryptPrimitives.dll A: 0x74BB0000 - 0x74C01000 (C:\Windows\SYSTEM32\bcryptPrimitives.dll)
IMM32.DLL A: 0x76A60000 - 0x76A80000 (C:\Windows\system32\IMM32.DLL)
MSCTF.dll A: 0x77120000 - 0x771FC000 (C:\Windows\SYSTEM32\MSCTF.dll)
nvinit.dll A: 0x74B60000 - 0x74B95000 (C:\Windows\SYSTEM32\nvinit.dll)
ADVAPI32.dll A: 0x76C20000 - 0x76CCE000 (C:\Windows\SYSTEM32\ADVAPI32.dll)
dbghelp.dll A: 0x5BF70000 - 0x5C099000 (C:\Windows\SYSTEM32\dbghelp.dll)
MSVCP100.dll A: 0x74390000 - 0x743F9000 (C:\Windows\SYSTEM32\MSVCP100.dll)
MSVCR100.dll A: 0x742D0000 - 0x7438F000 (C:\Windows\SYSTEM32\MSVCR100.dll)
streamer.DLL A: 0x67A50000 - 0x67A96000 (C:\Users\admin\Desktop\TMP\plugins\streamer.DLL)
MSVCP120.dll A: 0x5E2B0000 - 0x5E321000 (C:\Windows\SYSTEM32\MSVCP120.dll)
MSVCR120.dll A: 0x5BE80000 - 0x5BF6E000 (C:\Windows\SYSTEM32\MSVCR120.dll)
irc.DLL A: 0x67A00000 - 0x67A50000 (C:\Users\admin\Desktop\TMP\plugins\irc.DLL)
LIBEAY32.dll A: 0x10000000 - 0x1012C000 (C:\Program Files (x86)\Intel\iCLS Client\LIBEAY32.dll)
SSLEAY32.dll A: 0x00520000 - 0x0056F000 (C:\Program Files (x86)\Intel\iCLS Client\SSLEAY32.dll)
sscanf.DLL A: 0x003F0000 - 0x003FB000 (C:\Users\admin\Desktop\TMP\plugins\sscanf.DLL)
MSVCR90.dll A: 0x73F20000 - 0x73FC3000 (C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6871_none_50944e7cbcb706e5\MSVCR90.dll)
Whirlpool.DLL A: 0x005C0000 - 0x005CC000 (C:\Users\admin\Desktop\TMP\plugins\Whirlpool.DLL)
MSVCR80.dll A: 0x5CE60000 - 0x5CEFB000 (C:\Windows\WinSxS\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.6910_none_d089c358442de345\MSVCR80.dll)
mswsock.dll A: 0x71A10000 - 0x71A5A000 (C:\Windows\system32\mswsock.dll)
napinsp.dll A: 0x71020000 - 0x71030000 (C:\Windows\system32\napinsp.dll)
pnrpnsp.dll A: 0x71000000 - 0x71014000 (C:\Windows\system32\pnrpnsp.dll)
NLAapi.dll A: 0x70FF0000 - 0x71000000 (C:\Windows\system32\NLAapi.dll)
DNSAPI.dll A: 0x71990000 - 0x71A05000 (C:\Windows\SYSTEM32\DNSAPI.dll)
winrnr.dll A: 0x70FE0000 - 0x70FE9000 (C:\Windows\System32\winrnr.dll)
wshbth.dll A: 0x70FD0000 - 0x70FE0000 (C:\Windows\system32\wshbth.dll)
IPHLPAPI.DLL A: 0x742A0000 - 0x742C2000 (C:\Windows\SYSTEM32\IPHLPAPI.DLL)
WINNSI.DLL A: 0x749E0000 - 0x749E8000 (C:\Windows\SYSTEM32\WINNSI.DLL)
rasadhlp.dll A: 0x74B50000 - 0x74B57000 (C:\Windows\System32\rasadhlp.dll)
SHCORE.dll A: 0x74960000 - 0x749D5000 (C:\Windows\SYSTEM32\SHCORE.dll)
uxtheme.dll A: 0x748D0000 - 0x74958000 (C:\Windows\system32\uxtheme.dll)
PROPSYS.dll A: 0x746D0000 - 0x747E9000 (C:\Windows\SYSTEM32\PROPSYS.dll)
OLEAUT32.dll A: 0x74C90000 - 0x74D1B000 (C:\Windows\SYSTEM32\OLEAUT32.dll)
SETUPAPI.dll A: 0x76DF0000 - 0x76F9F000 (C:\Windows\SYSTEM32\SETUPAPI.dll)
CFGMGR32.dll A: 0x76A10000 - 0x76A56000 (C:\Windows\SYSTEM32\CFGMGR32.dll)
DEVOBJ.dll A: 0x768C0000 - 0x768DE000 (C:\Windows\SYSTEM32\DEVOBJ.dll)
Secur32.dll A: 0x74890000 - 0x74899000 (C:\Windows\SYSTEM32\Secur32.dll)
Re: samp-server.exe is closing -
JohnLedingham - 11.08.2015
If you have Linux Defined then add the following // so you'll remove it in the gamemode, and then look for define win_32 and remove the //
and I hope it'll work, contact me on PM to check.