Problem <--- Please Read
#1

hello there here is my Gamemodes on PC Log

Код:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3x, ©2005-2013 SA-MP Team

[15:30:33] password = ""  (string)
[15:30:33] 
[15:30:33] Server Plugins
[15:30:33] --------------
[15:30:33]  Loading plugin: mysql
[15:30:33] 

  > MySQL plugin R7 successfully loaded.

[15:30:33]   Loaded.
[15:30:33]  Loading plugin: streamer
[15:30:33] 

*** Streamer Plugin v2.6.1 by Incognito loaded ***

[15:30:33]   Loaded.
[15:30:33]  Loading plugin: sscanf
[15:30:33] 

[15:30:33]  ===============================

[15:30:33]       sscanf plugin loaded.     

[15:30:33]          Version:  2.8.1        

[15:30:33]    © 2012 Alex "******" Cole  

[15:30:33]  ===============================

[15:30:33]   Loaded.
[15:30:33]  Loading plugin: Whirlpool
[15:30:34]  
[15:30:34]  ==================
[15:30:34]  
[15:30:34]   Whirlpool loaded
[15:30:34]  
[15:30:34]  ==================
[15:30:34]  
[15:30:34]   Loaded.
[15:30:34]  Loading plugin: nativechecker  // [COLOR='blue"]nvm about this[/COLOR]
[15:30:34]   Failed.
[15:30:34]  Loaded 4 plugins.

[15:30:34] 
[15:30:34] Filterscripts
[15:30:34] ---------------
[15:30:34]   Loading filterscript 'yom_buttons.amx'...
[15:30:34]   Unable to load filterscript 'yom_buttons.amx'. // nvm about this too
[15:30:34]   Loading filterscript 'gcustom03e.amx'...
[15:30:34]   Loaded 1 filterscripts.

[15:30:34]  
[15:30:34]  ======================================= 
[15:30:34]  |                                     | 
[15:30:34]  |        YSI version 3.01.0002        | 
[15:30:34]  |        By Alex "******" Cole        | 
[15:30:34]  |                                     | 
[15:30:34]  ======================================= 
[15:30:34]  
[15:30:34] [MySQL] (Main Pipelines) Connecting to localhost...
[15:30:34] [MySQL] (MainPipeline) Connection successful toward MySQL Database Server!
[15:30:34] [LoadHouses] Loading data from database...
[15:30:34] [LoadDynamicDoors] Loading data from database...
[15:30:34] [LoadDynamicMapIcons] Loading data from database...
[15:30:34] [LoadDynamicTexts] Loading data from database...
[15:30:34] [LoadTurfWars] 40 turfs loaded.
[15:30:34] [LoadPaintballArenas] 10 paintball arenas loaded.
[15:30:34] [LoadEventPoints] 0 event points loaded.
[15:30:34] [LoadGates] 4000 gates loaded.
[15:30:34] [LoadElevatorStuff] 20 floors loaded.
[15:30:34] [LoadFamilies] 16 families loaded.
[15:30:34] [LoadPoints] 9 points loaded.
[15:30:37] [LoadCDealerships] 15 dealerships loaded.
[15:30:37] [MiscLoad] Misc Loaded
[15:30:37] [Tax] Government Tax/Vault Loaded.
[15:30:54] The server has fully loaded.
[15:30:54] Number of vehicle models: 111
[15:30:54]  
[15:30:54]  ========================================== 
[15:30:54]  |                                        | 
[15:30:54]  |  A new version (v3.09.0684) of YSI is  | 
[15:30:54]  |            available from:             | 
[15:30:54]  |                                        | 
[15:30:54]  |     www.y-less.com/YSI/YSI_1.0.zip     | 
[15:30:54]  |                                        | 
[15:30:54]  | Changelog:                             | 
[15:30:54]  |                                        | 
[15:30:54]  |   3.09.0684:                           | 
[15:30:54]  |                                        | 
[15:30:54]  |   Reverted to old download location.   | 
[15:30:54]  | Improved (and fixed) version checks;   | 
[15:30:54]  | added y_bitmap, y_areas, y_races,      | 
[15:30:54]  | y_zonenames, better documentation;     | 
[15:30:54]  | MANY other bug fixes - see the github  | 
[15:30:54]  | repository for more details:           | 
[15:30:54]  |                                        | 
[15:30:54]  ========================================== 
[15:30:54]  
[15:30:54] [LoadHouses] Failed to load any houses.
[15:30:54] [LoadDynamicDoors] 2000 doors rehashed/loaded.
[15:30:54] [LoadDynamicMapIcons] 400 map icons rehashed/loaded.
[15:30:54] [LoadDynamicTexts] 2000 Texts Labels rehashed/loaded.
[15:31:08] Incoming connection: IP
[15:31:08] [join] Some_One has joined the server (IP)

--------Working-------
--------Working-------
and here is from my VPS/HOST/Linex/Centos6

Код:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3x-R2, ©2005-2013 SA-MP Team

[20:13:21] password = ""  (string)
[20:13:21] 
[20:13:21] Server Plugins
[20:13:21] --------------
[20:13:21]  Loading plugin: crashdetect.so
[20:13:21]   CrashDetect v4.12 is OK.
[20:13:21]   Loaded.
[20:13:21]  Loading plugin: mysql.so
[20:13:21] 

  > MySQL plugin R7 successfully loaded.

[20:13:21]   Loaded.
[20:13:21]  Loading plugin: streamer.so
[20:13:21] 

*** Streamer Plugin v2.6.1 by Incognito loaded ***

[20:13:21]   Loaded.
[20:13:21]  Loading plugin: sscanf.so
[20:13:21] 

[20:13:21]  ===============================

[20:13:21]       sscanf plugin loaded.     

[20:13:21]          Version:  2.8.1        

[20:13:21]    © 2012 Alex "******" Cole  

[20:13:21]  ===============================

[20:13:21]   Loaded.
[20:13:21]  Loading plugin: Whirlpool.so
[20:13:21]  
[20:13:21]  ==================
[20:13:21]  
[20:13:21]   Whirlpool loaded
[20:13:21]  
[20:13:21]  ==================
[20:13:21]  
[20:13:21]   Loaded.
[20:13:21]  Loaded 5 plugins.

[20:13:21] 
[20:13:21] Filterscripts
[20:13:21] ---------------
[20:13:21]   Loading filterscript 'yom_buttons.amx'...
[20:13:21]   Unable to load filterscript 'yom_buttons.amx'.
[20:13:21]   Loading filterscript 'gcustom03e.amx'...
[20:13:22]   Loading filterscript 'vacation.amx'...
[20:13:22]   Unable to load filterscript 'vacation.amx'.
[20:13:22]   Loaded 1 filterscripts.

[20:13:23]  
[20:13:23]  ======================================= 
[20:13:23]  |                                     | 
[20:13:23]  |        YSI version 3.01.0002        | 
[20:13:23]  |        By Alex "******" Cole        | 
[20:13:23]  |                                     | 
[20:13:23]  ======================================= 
[20:13:23]  
[20:13:23] [MySQL] (Main Pipelines) Connecting to localhost...
[20:13:23] [MySQL] (MainPipeline) Connection successful toward MySQL Database Server!
[20:13:23] [LoadHouses] Loading data from database...
[20:13:23] [LoadDynamicDoors] Loading data from database...
[20:13:23] [LoadDynamicMapIcons] Loading data from database...
[20:13:23] [LoadDynamicTexts] Loading data from database...
[20:13:23] [LoadTurfWars] 40 turfs loaded.
[20:13:23] [LoadPaintballArenas] 10 paintball arenas loaded.
[20:13:23] [LoadEventPoints] 0 event points loaded.
[20:13:23] [LoadGates] 4000 gates loaded.
[20:13:23] [LoadElevatorStuff] 20 floors loaded.
[20:13:23] [LoadFamilies] 16 families loaded.
[20:13:23] [LoadPoints] 9 points loaded.
[20:13:32] [LoadCDealerships] 15 dealerships loaded.
[20:13:32] [MiscLoad] Misc Loaded
[20:13:33] [Tax] Government Tax/Vault Loaded.
[20:13:59] [debug] Server crashed while executing HGRP.amx
[20:14:00] [debug] AMX backtrace:
[20:14:00] [debug] #0 native fclose () [0809a980] from samp03svr
[20:14:00] [debug] #1 0009b708 in Log (sz_fileName[]=@0x012e5678 "logs/cardebug.log", sz_input[]=@0x02227740 "-> [471]") at C:\Server Parth\gamemodes\HGRP.pwn:14423
[20:14:00] [debug] #2 005f5448 in CreateVehicleEx (modelid=567, Float:x=2507.30005, Float:y=-1677.40002, Float:z=13.30000, Float:angle=147.30000, color1=3, color2=3, respawn_delay=-1, playerid=65535) at C:\Server Parth\gamemodes\HGRP.pwn:102209
[20:14:00] [debug] #3 005c8f58 in LoadGangVehicles (f=1) at C:\Server Parth\gamemodes\HGRP.pwn:98848
[20:14:00] [debug] #4 00123870 in public zcmd_OnGameModeInit () at C:\Server Parth\gamemodes\HGRP.pwn:23034
[20:14:00] [debug] #5 native CallLocalFunction () [080d2960] from samp03svr
[20:14:00] [debug] #6 0002458c in public S@@_OnGameModeInit () at C:\Server Parth\pawno\include\ZCMD.inc:70
[20:14:00] [debug] #7 native CallLocalFunction () [080d2960] from samp03svr
[20:14:00] [debug] #8 00017244 in public S@@_OnGameModeInit () at C:\Server Parth\pawno\include\YSI\internal\y_dohooks.inc:422
[20:14:00] [debug] #9 native CallLocalFunction () [080d2960] from samp03svr
[20:14:00] [debug] #10 000109a4 in public Itter_OnGameModeInit () at C:\Server Parth\pawno\include\YSI\y_scriptinit.inc:164
[20:14:00] [debug] #11 native CallLocalFunction () [080d2960] from samp03svr
[20:14:00] [debug] #12 000084d0 in public SSCANF_OnGameModeInit () at C:\Server Parth\pawno\include\foreach.inc:633
[20:14:00] [debug] #13 00000cbc in public OnGameModeInit () at C:\Server Parth\pawno\include\sscanf2.inc:174
[20:14:00] [debug] Native backtrace:
[20:14:00] [debug] #0 b74bfa5b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[20:14:00] [debug] #1 b74b8852 in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[20:14:00] [debug] #2 b74b935c in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[20:14:00] [debug] #3 b74b986e in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[20:14:00] [debug] #4 b74bf76d in ?? () from plugins/crashdetect.so
[20:14:00] [debug] #5 b77e0600 in ?? ()
[20:14:00] [debug] #6 b75f47d4 in _IO_file_close_it () from /lib/libc.so.6
[20:14:00] [debug] #7 b75f2b30 in fclose () from /lib/libc.so.6
[20:14:00] [debug] #8 b752e9c0 in fclose () from /lib/libc.so.6
[20:14:00] [debug] #9 0809a994 in ?? () from ./samp03svr
[20:14:00] [debug] #10 08093d14 in ?? () from ./samp03svr
[20:14:00] [debug] #11 b74b610c in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[20:14:00] [debug] #12 b74bb348 in ?? () from plugins/crashdetect.so
[20:14:00] [debug] #13 b74c1db5 in amx_Exec () from plugins/crashdetect.so
[20:14:00] [debug] #14 b74b86ab in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[20:14:00] [debug] #15 b74bb149 in ?? () from plugins/crashdetect.so
[20:14:00] [debug] #16 080d2c02 in ?? () from ./samp03svr
[20:14:00] [debug] #17 08093d14 in ?? () from ./samp03svr
[20:14:00] [debug] #18 b74b610c in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[20:14:00] [debug] #19 b74bb348 in ?? () from plugins/crashdetect.so
[20:14:00] [debug] #20 b74c1db5 in amx_Exec () from plugins/crashdetect.so
[20:14:00] [debug] #21 b74b86ab in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[20:14:00] [debug] #22 b74bb149 in ?? () from plugins/crashdetect.so
[20:14:00] [debug] #23 080d2c02 in ?? () from ./samp03svr
[20:14:00] [debug] #24 08093d14 in ?? () from ./samp03svr
[20:14:00] [debug] #25 b74b610c in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[20:14:00] [debug] #26 b74bb348 in ?? () from plugins/crashdetect.so
[20:14:00] [debug] #27 b74c1db5 in amx_Exec () from plugins/crashdetect.so
[20:14:00] [debug] #28 b74b86ab in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[20:14:00] [debug] #29 b74bb149 in ?? () from plugins/crashdetect.so
[20:14:00] [debug] #30 080d2c02 in ?? () from ./samp03svr
[20:14:00] [debug] #31 08093d14 in ?? () from ./samp03svr
[20:14:00] [debug] #32 b74b610c in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[20:14:00] [debug] #33 b74bb348 in ?? () from plugins/crashdetect.so
[20:14:00] [debug] #34 b74c1db5 in amx_Exec () from plugins/crashdetect.so
[20:14:00] [debug] #35 b74b86ab in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[20:14:00] [debug] #36 b74bb149 in ?? () from plugins/crashdetect.so
[20:14:00] [debug] #37 080d2c02 in ?? () from ./samp03svr
[20:14:00] [debug] #38 08093d14 in ?? () from ./samp03svr
[20:14:00] [debug] #39 b74b610c in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[20:14:00] [debug] #40 b74bb348 in ?? () from plugins/crashdetect.so
[20:14:00] [debug] #41 b74c1db5 in amx_Exec () from plugins/crashdetect.so
[20:14:00] [debug] #42 b74b86ab in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[20:14:00] [debug] #43 b74bb149 in ?? () from plugins/crashdetect.so
[20:14:00] [debug] #44 080acccb in ?? () from ./samp03svr
[20:14:00] [debug] #45 080b2bbd in ?? () from ./samp03svr
[20:14:00] [debug] #46 080b1487 in ?? () from ./samp03svr
[20:14:00] [debug] #47 b74e4ce6 in __libc_start_main () from /lib/libc.so.6
[20:14:00] [debug] #48 0804b521 in ?? () from ./samp03svr
here is putty
Код:
# ./samp03svr

Started server on port: 7780, with maxplayers: 50 lanmode is ON.

Segmentation fault
#
here is mysql log
Код:
[20:13:23]  
[20:13:23]  ** MySQL Debugging enabled (11/12/13)
[20:13:23]  
[20:13:23] >> mysql_connect(localhost, DB, myDB, ******) on port 5556
[20:13:23] CMySQLHandler::CMySQLHandler() - constructor called.
[20:13:23] CMySQLHandler::CMySQLHandler() - Connecting to "localhost" | DB: "myDB" | Username: "DB"
[20:13:23] CMySQLHandler::Connect() - Connection was successful.
[20:13:23] CMySQLHandler::Connect() - Auto-Reconnect has been enabled.
[20:13:23] >> mysql_ping( Connection handle: 1 )
[20:13:23] CMySQLHandler::Ping() - Connection is still alive.
[20:13:23] >> mysql_query_callback( Connection handle: 1 )
[20:13:23] >> mysql_query_callback( Connection handle: 1 )
[20:13:23] >> mysql_query_callback( Connection handle: 1 )
[20:13:23] >> mysql_query_callback( Connection handle: 1 )
[20:13:23] >> mysql_query_callback( Connection handle: 1 )
[20:13:23] >> mysql_query_callback( Connection handle: 1 )
[20:13:23] Passing query SELECT `gMOTD`,`aMOTD`,`vMOTD`,`cMOTD`,`pMOTD`,`ShopTechPay` FROM `misc` | iii
[20:13:23] ProcessQueryThread(OnQueryFinish) - Query was successful. (SELECT `gMOTD`,`aMOTD`,`vMOTD`,`cMOTD`,`pMOTD`,`ShopTechPay` FROM `misc`)
[20:13:23] ProcessQueryThread(OnQueryFinish) - Data caching enabled.
[20:13:23] CMySQLHandler::StoreResult() - Result was stored.
[20:13:23] CMySQLHandler::FreeResult() - Result was successfully free'd.
[20:13:23] CMySQLHandler::ProcessQueryThread() - Data is getting passed to ->ProcessTick()
crash log : None For Linex

pawn when compiling with crashdetect:
Код:
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:          33972 bytes
Code size:          6247520 bytes
Data size:         19814080 bytes
Stack/heap size:   16000000 bytes; estimated max. usage: unknown, due to recursion
Total requirements:42095572 bytes
Reply
#2

For starting a server dont use it (./samp03svr)

Use this code's [PUTTY]
First go on your samp folder then write this
Код:
chmod +x samp03svr announce 
nohup ./samp03svr
Just do this then your server start's!!

./samp03svr or ./restart for restart the server

Note:
Use this CODE's in PUTTY [Linux]

Код:
chmod +x samp03svr announce 
nohup ./samp03svr
Reply
#3

there is a problem ... with script ... not with how to start server
i use /samp03svr for testing
Reply
#4

Post the Log function, it does not check if the file opened successfully and that's why fclose crashes the server.
Reply
#5

but how and iys working in windows

btw

ill post the log function
Reply
#6

Код:
stock CreateVehicleEx(modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay, playerid = INVALID_PLAYER_ID)
{
	new string[128];
	format(string, sizeof(string), "(%d, %f, %f, %f, %f, %d, %d, %d) (%s)", modelid, x, y, z, angle, color1, color2, respawn_delay, GetPlayerNameEx(playerid));
	Log("logs/cardebug.log", string);

	new id = CreateVehicle(modelid, x, y, z, angle, color1, color2, respawn_delay);

	format(string, sizeof(string), "-> [%d]", id);
	Log("logs/cardebug.log", string);
	return id;
}
Код:
stock Log(sz_fileName[], sz_input[]) {

	new
		sz_logEntry[164],
		i_dateTime[2][3];

	//gettime(i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2]);
	//getdate(i_dateTime[1][0], i_dateTime[1][1], i_dateTime[1][2]);
	//getdate(i_dateTime[1][2], i_dateTime[1][1], i_dateTime[1][0]);
	gettime(i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2]);
	getdate(i_dateTime[1][0], i_dateTime[1][1], i_dateTime[1][2]);

	format(sz_logEntry, sizeof(sz_logEntry), "[%i/%i/%i - %i:%i:%i] %s\r\n", i_dateTime[1][2], i_dateTime[1][1], i_dateTime[1][0], i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2], sz_input);
	if(logfile) fclose(logfile);
	if(!fexist(sz_fileName)) logfile = fopen(sz_fileName, io_write);
	else logfile = fopen(sz_fileName, io_append);
	if(logfile)
	{
		fwrite(logfile, sz_logEntry);
		fclose(logfile);
	}
	return 1;
}
Reply
#7

Do not use the logfile like that. If it was opened successfully, then logfile would not be 0 and if you then close the file it will still not be 0. Therebefore even if the file was closed, you close a closed file.

the checking about the file is pointless.

pawn Код:
stock Log(sz_fileName[], sz_input[]) {
   
    new
        sz_logEntry[128],
        i_dateTime[2][3],
        fLog;
   
    //gettime(i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2]);
    //getdate(i_dateTime[1][0], i_dateTime[1][1], i_dateTime[1][2]);
    //getdate(i_dateTime[1][2], i_dateTime[1][1], i_dateTime[1][0]);
    gettime(i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2]);
    getdate(i_dateTime[1][0], i_dateTime[1][1], i_dateTime[1][2]);
   
    format(sz_logEntry, sizeof(sz_logEntry), "[%i/%i/%i - %i:%i:%i] %s\r\n", i_dateTime[1][2], i_dateTime[1][1], i_dateTime[1][0], i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2], sz_input);

    fLog = fopen(sz_fileName, io_append);
    if(fLog)
    {
        fwrite(fLog, sz_logEntry);
        fclose(fLog);
    }
    return 1;
}
Reply
#8

After Adding Your Code
pawn Код:
Script.pwn(14425) : warning 213: tag mismatch
Script.pwn(14428) : warning 213: tag mismatch
Script.pwn(14429) : warning 213: tag mismatch
Script.pwn(102211) : warning 203: symbol is never used: "logfile"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase

Header size:          33972 bytes
Code size:          6247360 bytes
Data size:         19814076 bytes
Stack/heap size:   16000000 bytes; estimated max. usage: unknown, due to recursion
Total requirements:42095408 bytes

4 Warnings.
pawn Код:
14425
    fLog = fopen(sz_fileName, io_append);
pawn Код:
14428
        fwrite(fLog, sz_logEntry);
pawn Код:
14429
        fclose(fLog);
and 102211 is not found script lines is 102210
Reply
#9

pawn Код:
new
        sz_logEntry[128],
        i_dateTime[2][3],
        File: fLog;
EDIT:

Quote:
Originally Posted by Joe_Goro
Посмотреть сообщение
where i place those codes ?
Replace:
pawn Код:
new
        sz_logEntry[128],
        i_dateTime[2][3],
        fLog;
from the Log function to:

pawn Код:
new
        sz_logEntry[128],
        i_dateTime[2][3],
        File: fLog;
Reply
#10

where i place those codes ?

edit : ok i will try i got it

edit 2 : compiling now i will check

just question : why the compiling is too slow with crash detect ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)