Open alansyahdwi opened 3 years ago
When on windows server, it run normally.
server_log.log
[23:18:54] Alansyah Dwi has logged in.
[23:19:01] [part] Alansyah_Dwi has left the server (0:1)
There's no problem with the MySQL plugin. Log Core simply logs all server crashes. The problem is in your filehandle.pwn
file at line 67:
[16:57:56] [debug] Server crashed while executing NGRP.amx
[16:57:56] [debug] AMX backtrace:
[16:57:56] [debug] #0 native fclose () in samp03svr
[16:57:56] [debug] #1 004b1e20 in Log (sz_fileName[]=@0b6bedc8 "logs/login.log", sz_input[]=@0c05aa3c "Alansyah_Dwi (ID: 0 | SQL ID: 4 | Level: 1 | IP: 36.68.216.82) has disconnected.") at ./includes/core/filehandle.pwn:67
[16:57:56] [debug] #2 0011a870 in public ATT_OnPlayerDisconnect (playerid=0, reason=1) at ./includes/callbacks.pwn:2113
[16:57:56] [debug] #3 0003f674 in public CB_OnPlayerDisconnect (playerid=0, reason=1) at D:\Project\SAMP\SA - GM\GM - CRP (with Linux version)\CRP\pawno\include\attachments.inc:174
[16:57:56] [debug] #4 00039b2c in public SSCANF_OnPlayerDisconnect (playerid=0, reason=1) at D:\Project\SAMP\SA - GM\GM - CRP (with Linux version)\CRP\pawno\include\callbacks.inc:671
[16:57:56] [debug] #5 00029398 in public _y_utils_OnPlayerDisconnect (playerid=0, reason=1) at D:\Project\SAMP\SA - GM\GM - CRP (with Linux version)\CRP\pawno\include\sscanf2.inc:266
[16:57:56] [debug] #6 00003aa8 in OnPlayerDisconnect (playerid=0, reason=1) at D:\Project\SAMP\SA - GM\GM - CRP (with Linux version)\CRP\pawno\include\YSI_Coding\y_timers\..\..\YSI_Core\y_core\y_utils_impl.inc:271
[16:57:56] [debug] #7 00019044 in public OnPlayerDisconnect (0, 1) at D:\Project\SAMP\SA - GM\GM - CRP (with Linux version)\CRP\pawno\include\YSI_Coding\y_timers\..\..\YSI_Data\y_foreach\..\..\YSI_Coding\y_hooks\..\y_cgen\y_cgen.inc:127
Looks like fclose
is crashing the server. fclose
can crash only if the file handle is invalid (equal to File:0
) (see https://github.com/pawn-lang/sa-mp-fixes). Before using fclose
, make sure to check if the handle is correctly being set (check if fopen
returns a valid handle, and if it doesn't, just check why not). Maybe the logs/login.log
file fails to be created? Maybe you don't have your logs
folder in scriptfiles, but I doubt that, because I guess that you are also logging other things, not only when an user disconnects.
There's no problem with the MySQL plugin. Log Core simply logs all server crashes. The problem is in your
filehandle.pwn
file at line 67:[16:57:56] [debug] Server crashed while executing NGRP.amx [16:57:56] [debug] AMX backtrace: [16:57:56] [debug] #0 native fclose () in samp03svr [16:57:56] [debug] #1 004b1e20 in Log (sz_fileName[]=@0b6bedc8 "logs/login.log", sz_input[]=@0c05aa3c "Alansyah_Dwi (ID: 0 | SQL ID: 4 | Level: 1 | IP: 36.68.216.82) has disconnected.") at ./includes/core/filehandle.pwn:67 [16:57:56] [debug] #2 0011a870 in public ATT_OnPlayerDisconnect (playerid=0, reason=1) at ./includes/callbacks.pwn:2113 [16:57:56] [debug] #3 0003f674 in public CB_OnPlayerDisconnect (playerid=0, reason=1) at D:\Project\SAMP\SA - GM\GM - CRP (with Linux version)\CRP\pawno\include\attachments.inc:174 [16:57:56] [debug] #4 00039b2c in public SSCANF_OnPlayerDisconnect (playerid=0, reason=1) at D:\Project\SAMP\SA - GM\GM - CRP (with Linux version)\CRP\pawno\include\callbacks.inc:671 [16:57:56] [debug] #5 00029398 in public _y_utils_OnPlayerDisconnect (playerid=0, reason=1) at D:\Project\SAMP\SA - GM\GM - CRP (with Linux version)\CRP\pawno\include\sscanf2.inc:266 [16:57:56] [debug] #6 00003aa8 in OnPlayerDisconnect (playerid=0, reason=1) at D:\Project\SAMP\SA - GM\GM - CRP (with Linux version)\CRP\pawno\include\YSI_Coding\y_timers\..\..\YSI_Core\y_core\y_utils_impl.inc:271 [16:57:56] [debug] #7 00019044 in public OnPlayerDisconnect (0, 1) at D:\Project\SAMP\SA - GM\GM - CRP (with Linux version)\CRP\pawno\include\YSI_Coding\y_timers\..\..\YSI_Data\y_foreach\..\..\YSI_Coding\y_hooks\..\y_cgen\y_cgen.inc:127
Looks like
fclose
is crashing the server.fclose
can crash only if the file handle is invalid (equal toFile:0
) (see https://github.com/pawn-lang/sa-mp-fixes). Before usingfclose
, make sure to check if the handle is correctly being set (check iffopen
returns a valid handle, and if it doesn't, just check why not). Maybe thelogs/login.log
file fails to be created? Maybe you don't have yourlogs
folder in scriptfiles, but I doubt that, because I guess that you are also logging other things, not only when an user disconnects.
you're right, i've been remove the Log function, and it works normally. should i use samp-fixes to fix the crash from filehandle.pwn? because everything works at Windows server, it only crashes at Linux server.
Make sure to also create the logs
folder in the scriptfiles
folder in your Linux host. If it still won't work, that's weird and you should also try creating the logs/login.log
file, I guess.
You shouldn't need samp-fixes only for this.
I've got this error (signal 11 (SIGSEGV) after quitting the game (/q). Can someone help me about this?
I'm getting this error only at Linux server.
log-ore.log
server_log.log