PDA

View Full Version : Console error


AndreiWow
02/10/2016, 09:52 AM
samp03svr: amx/amxfile.c:101: fgets_cell: Assertion `fp!=((void *)0)' failed.
[debug] Server crashed while executing rg3.amx
[debug] AMX backtrace:
[debug] #0 native fread () from samp03svr
[debug] #1 0002b6e8 in ?? () from rg3.amx
[debug] #2 0002baa0 in public L_AFK_OnGM () from rg3.amx
[debug] #3 native CallLocalFunction () from samp03svr
[debug] #4 0001ef00 in public Itter_OnGameModeInit () from rg3.amx
[debug] #5 native CallLocalFunction () from samp03svr
[debug] #6 0001c8f0 in public SSCANF_OnGameModeInit () from rg3.amx
[debug] #7 00016a18 in ?? () from rg3.amx
[debug] #8 00007120 in public ScriptInit_OnGameModeInit () from rg3.amx
[debug] #9 00002fb0 in public OnGameModeInit () from rg3.amx
[debug] Native backtrace:
[debug] #0 f668ee8b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[debug] #1 f6687bcf in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[debug] #2 f6688dbc in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[debug] #3 f6689226 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[debug] #4 f668eadc in ?? () from plugins/crashdetect.so
[debug] #5 f7796410 in ?? ()
[debug] #6 f7796430 in ?? ()
[debug] #7 f749f607 in gsignal () from /lib/i386-linux-gnu/libc.so.6
[debug] #8 f74a2a33 in abort () from /lib/i386-linux-gnu/libc.so.6
[debug] #9 f7498757 in ?? () from /lib/i386-linux-gnu/libc.so.6
[debug] #10 f7498807 in ?? () from /lib/i386-linux-gnu/libc.so.6
[debug] #11 0809b7a1 in ?? () from ./samp03svr
[debug] #12 0809bf43 in ?? () from ./samp03svr
[debug] #13 080950e4 in ?? () from ./samp03svr
[debug] #14 f668a94b in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[debug] #15 f668d8f8 in ?? () from plugins/crashdetect.so
[debug] #16 f6691916 in amx_Exec () from plugins/crashdetect.so
[debug] #17 f6689be6 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[debug] #18 f668d659 in ?? () from plugins/crashdetect.so
[debug] #19 f626a27c in ?? () from plugins/streamer.so
[debug] #20 080dfd62 in ?? () from ./samp03svr
[debug] #21 080950e4 in ?? () from ./samp03svr
[debug] #22 f668a94b in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[debug] #23 f668d8f8 in ?? () from plugins/crashdetect.so
[debug] #24 f6691916 in amx_Exec () from plugins/crashdetect.so
[debug] #25 f6689be6 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[debug] #26 f668d659 in ?? () from plugins/crashdetect.so
[debug] #27 f626a27c in ?? () from plugins/streamer.so
[debug] #28 080dfd62 in ?? () from ./samp03svr
[debug] #29 080950e4 in ?? () from ./samp03svr
[debug] #30 f668a94b in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[debug] #31 f668d8f8 in ?? () from plugins/crashdetect.so
[debug] #32 f6691916 in amx_Exec () from plugins/crashdetect.so
[debug] #33 f6689be6 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[debug] #34 f668d659 in ?? () from plugins/crashdetect.so
[debug] #35 f626a27c in ?? () from plugins/streamer.so
[debug] #36 080a503b in ?? () from ./samp03svr
[debug] #37 080ab922 in ?? () from ./samp03svr
[debug] #38 080aa0fd in ?? () from ./samp03svr
[debug] #39 f748aa83 in __libc_start_main () from /lib/i386-linux-gnu/libc.so.6


Why?

Konstantinos
02/10/2016, 09:54 AM
Read the warning box and take a look at the example (specifically after the comment "Check, if the file is opened"): http://wiki.sa-mp.com/wiki/Fread

AndreiWow
02/10/2016, 10:02 AM
But it worked before :?

fread(fhConnectionInfo, szQueryOutput);
fclose(fhConnectionInfo);

Konstantinos
02/10/2016, 10:04 AM
It did because it always opened the file successfully. When fopen returns 0 though it will crash the server.
Plus make sure scriptfiles is both readable and writable (permissions).

AndreiWow
02/10/2016, 10:05 AM
Woops it was my fault for placing the folder in the wrong place xD