PDA

View Full Version : Server crash help..


Tuntun
22/01/2014, 05:56 AM
My server is crashing when someone log-in. if someone connect to the server it crashes. any help? plugins are updated. ...
Server log:


----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3x-R2, (C)2005-2013 SA-MP Team

[05:56:47]
[05:56:47] Server Plugins
[05:56:47] --------------
[05:56:47] Loading plugin: sscanf.so
[05:56:47]

[05:56:47] ===============================

[05:56:47] sscanf plugin loaded.

[05:56:47] Version: 2.8.1

[05:56:47] (c) 2012 Alex "******" Cole

[05:56:47] ===============================

[05:56:47] Loaded.
[05:56:47] Loading plugin: streamer.so
[05:56:47]

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

[05:56:47] Loaded.
[05:56:47] Loading plugin: crashdetect.so
[05:56:47] crashdetect v4.7.6 is OK.
[05:56:47] Loaded.
[05:56:47] Loaded 3 plugins.

[05:56:47]
[05:56:47] Filterscripts
[05:56:47] ---------------
[05:56:47] Loading filterscript 'gl_realtime.amx'...
[05:56:47] Loaded 1 filterscripts.

[05:56:47] Debug information
[05:56:47] -------------------------------------
[05:56:47] Last vehicle ID: 290
[05:56:47] Last object ID: 18
[05:56:47] Loaded 0 houses
[05:56:47] Loaded 0 businesses
[05:56:47] Loaded 0 speed-camera's
[05:56:47] -------------------------------------
[05:56:47] Houses that have been fixed: 0
[05:56:47]
----------------------------------
[05:56:47] gamemodename
[05:56:47] ----------------------------------

[05:56:47] Number of vehicle models: 25
[05:57:13] Incoming connection: myip
[05:57:14] [join] Tuntun has joined the server (0:myip)

----------

Tuntun
22/01/2014, 06:25 AM
any help?

VishvaJeet
22/01/2014, 07:11 AM
Remove this "crashdetect.so" plugin then try it
[05:56:47] Loading plugin: crashdetect.so
[05:56:47] crashdetect v4.7.6 is OK.
[05:56:47]

Tuntun
22/01/2014, 07:18 AM
Lol?... i don't think so.. may be crashdetect is not the fact.

itsCody
22/01/2014, 08:03 AM
Check under OnPlayerConnect for errors that might crash it.

Tuntun
22/01/2014, 08:47 AM
WTF! these errors? never seen before.


[08:54:51] Number of vehicle models: 25
[08:55:32] Incoming connection: 114.130.64.154:55732
[08:55:36] [join] Tuntun has joined the server (0:114.130.64.154)
[08:55:41] [debug] Server crashed while executing 18WoS.amx
[08:55:41] [debug] AMX backtrace:
[08:55:41] [debug] #0 native fwrite () [0809aad0] from samp47180
[08:55:41] [debug] #1 0001e0c0 in ?? (0x00000000) from 18WoS.amx
[08:55:41] [debug] #2 00040408 in ?? (0x00000000, 0x00000001, 0x0025bb80) from 18WoS.amx
[08:55:41] [debug] #3 000858b4 in public OnDialogResponse (0x00000000, 0x00000001, 0x00000001, 0xffffffff, 0x0025bb80) from 18WoS.amx
[08:55:41] [debug] Native backtrace:
[08:55:41] [debug] #0 b73f331b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[08:55:41] [debug] #1 b73ed7c2 in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[08:55:41] [debug] #2 b73ee3ac in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[08:55:41] [debug] #3 b73ee856 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[08:55:41] [debug] #4 b73f2f6c in ?? () from plugins/crashdetect.so
[08:55:41] [debug] #5 b7769600 in ?? ()
[08:55:41] [debug] #6 b74d5577 in gsignal () from /lib/libc.so.6
[08:55:41] [debug] #7 b74d8962 in abort () from /lib/libc.so.6
[08:55:41] [debug] #8 b74ce767 in __assert_fail () from /lib/libc.so.6
[08:55:41] [debug] #9 0809a6fc in ?? () from samp47180
[08:55:41] [debug] #10 0809ab5f in ?? () from samp47180
[08:55:41] [debug] #11 08093e44 in ?? () from samp47180
[08:55:41] [debug] #12 b73eb03c in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[08:55:41] [debug] #13 b73f1458 in ?? () from plugins/crashdetect.so
[08:55:41] [debug] #14 b73f5c61 in amx_Exec () from plugins/crashdetect.so
[08:55:41] [debug] #15 b73ed708 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[08:55:41] [debug] #16 b73f11c9 in ?? () from plugins/crashdetect.so
[08:55:41] [debug] #17 080ae5bf in ?? () from samp47180
[08:55:41] [debug] #18 080b99e4 in ?? () from samp47180
[08:55:41] [debug] #19 08071b48 in ?? () from samp47180
[08:55:41] [debug] #20 08071c42 in ?? () from samp47180
[08:55:41] [debug] #21 0807bac0 in ?? () from samp47180
[08:55:41] [debug] #22 080b5c2d in ?? () from samp47180
[08:55:41] [debug] #23 080b5dc2 in ?? () from samp47180
[08:55:41] [debug] #24 080b16d3 in ?? () from samp47180
[08:55:41] [debug] #25 b74c1c96 in __libc_start_main () from /lib/libc.so.6
[08:55:41] [debug] #26 0804b521 in ?? () from samp47180


please someone help me.

itsCody
22/01/2014, 08:51 AM
Post your OnPlayerConnect code here.

Tuntun
22/01/2014, 09:07 AM
public OnPlayerConnect(playerid)
{
SendClientMessage(playerid,-1,"{FFFF00}To check message of the day type: {FF0000}/motd");
// Always allow NPC's to login without password or account
if (IsPlayerNPC(playerid))
return 1;

// Setup local variables
new Name[MAX_PLAYER_NAME], NewPlayerMsg[128], HouseID;

// Setup a PVar to allow cross-script money-transfers (only from filterscript to this mainscript) and scorepoints
SetPVarInt(playerid, "PVarMoney", 0);
SetPVarInt(playerid, "PVarScore", 0);

// Get the playername
GetPlayerName(playerid, Name, sizeof(Name));
// Also store this name for the player
GetPlayerName(playerid, APlayerData[playerid][PlayerName], 24);

// Send a message to all players to let them know somebody else joined the server
format(NewPlayerMsg, 128, TXT_PlayerJoinedServer, Name, playerid);
SendClientMessageToAll(0xFFFFFFFF, NewPlayerMsg);

// Try to load the player's datafile ("PlayerFile_Load" returns "1" is the file has been read, "0" when the file cannot be read)
if (PlayerFile_Load(playerid) == 1)
{
// Check if the player is still banned
if (APlayerData[playerid][BanTime] < gettime()) // Player ban-time is passed
ShowPlayerDialog(playerid, DialogLogin, DIALOG_STYLE_INPUT, TXT_DialogLoginTitle, TXT_DialogLoginMsg, TXT_DialogLoginButton1, TXT_DialogButtonCancel);
else // Player is still banned
{
ShowRemainingBanTime(playerid); // Show the remaining ban-time to the player is days, hours, minutes, seconds
Kick(playerid); // Kick the player
}
}
else
ShowPlayerDialog(playerid, DialogRegister, DIALOG_STYLE_INPUT, TXT_DialogRegisterTitle, TXT_DialogRegisterMsg, TXT_DialogRegisterButton1, TXT_DialogButtonCancel);

// The houses have been loaded but not the cars, so load all vehicles assigned to the player's houses
for (new HouseSlot; HouseSlot < MAX_HOUSESPERPLAYER; HouseSlot++)
{
// Get the HouseID from this slot
HouseID = APlayerData[playerid][Houses][HouseSlot];
// Check if there is a house in this slot
if (HouseID != 0)
HouseFile_Load(HouseID, true); // Load the cars of the house
}

// Speedometer setup
Speedometer_Setup(playerid);

// MissionText TextDraw setup
APlayerData[playerid][MissionText] = TextDrawCreate(320.0, 430.0, " "); // Setup the missiontext at the bottom of the screen
TextDrawAlignment(APlayerData[playerid][MissionText], 2); // Align the missiontext to the center
TextDrawUseBox(APlayerData[playerid][MissionText], 1); // Set the missiontext to display inside a box
TextDrawBoxColor(APlayerData[playerid][MissionText], 0x00000066); // Set the box color of the missiontext

// Display a message if the player hasn't accepted the rules yet
if (APlayerData[playerid][RulesRead] == false)
SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Before playing this server you must see {FFFF00}/rules{FF0000}");

return 1;
}

Konstantinos
22/01/2014, 09:12 AM
Search for any fwrite function in OnDialogResponse. You need to check if the file handle is valid before writing to/closing the file.

Tuntun
22/01/2014, 09:14 AM
Is it possible if i change the dialog to new one with Button1= Accept? but old was "OK"? ... because i have done something like this.

itsCody
22/01/2014, 09:16 AM
O_O found a few missing brackets..


public OnPlayerConnect(playerid)
{
// Always allow NPC's to login without password or account
if (IsPlayerNPC(playerid)) return 1;

// Setup local variables
new Name[MAX_PLAYER_NAME], NewPlayerMsg[128], HouseID;

// Setup a PVar to allow cross-script money-transfers (only from filterscript to this mainscript) and scorepoints
SetPVarInt(playerid, "PVarMoney", 0);
SetPVarInt(playerid, "PVarScore", 0);

// Get the playername
GetPlayerName(playerid, Name, sizeof(Name));
// Also store this name for the player
GetPlayerName(playerid, APlayerData[playerid][PlayerName], 24);

// Send a message to all players to let them know somebody else joined the server
format(NewPlayerMsg, 128, TXT_PlayerJoinedServer, Name, playerid);
SendClientMessageToAll(0xFFFFFFFF, NewPlayerMsg);

// Try to load the player's datafile ("PlayerFile_Load" returns "1" is the file has been read, "0" when the file cannot be read)
if (PlayerFile_Load(playerid) == 1)
{
// Check if the player is still banned
if (APlayerData[playerid][BanTime] < gettime()) // Player ban-time is passed
{
ShowPlayerDialog(playerid, DialogLogin, DIALOG_STYLE_INPUT, TXT_DialogLoginTitle, TXT_DialogLoginMsg, TXT_DialogLoginButton1, TXT_DialogButtonCancel);
}
else // Player is still banned
{
ShowRemainingBanTime(playerid); // Show the remaining ban-time to the player is days, hours, minutes, seconds
Kick(playerid); // Kick the player
}
else
{
ShowPlayerDialog(playerid, DialogRegister, DIALOG_STYLE_INPUT, TXT_DialogRegisterTitle, TXT_DialogRegisterMsg, TXT_DialogRegisterButton1, TXT_DialogButtonCancel);
}
}

// The houses have been loaded but not the cars, so load all vehicles assigned to the player's houses
for (new HouseSlot; HouseSlot < MAX_HOUSESPERPLAYER; HouseSlot++)
{
// Get the HouseID from this slot
HouseID = APlayerData[playerid][Houses][HouseSlot];
// Check if there is a house in this slot
if (HouseID != 0)
{
HouseFile_Load(HouseID, true); // Load the cars of the house
}
}

// Speedometer setup
Speedometer_Setup(playerid);

// MissionText TextDraw setup
APlayerData[playerid][MissionText] = TextDrawCreate(320.0, 430.0, " "); // Setup the missiontext at the bottom of the screen
TextDrawAlignment(APlayerData[playerid][MissionText], 2); // Align the missiontext to the center
TextDrawUseBox(APlayerData[playerid][MissionText], 1); // Set the missiontext to display inside a box
TextDrawBoxColor(APlayerData[playerid][MissionText], 0x00000066); // Set the box color of the missiontext

// Display a message if the player hasn't accepted the rules yet
if (APlayerData[playerid][RulesRead] == false)
return SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Before playing this server you must see {FFFF00}/rules{FF0000}");

SendClientMessage(playerid,-1,"{FFFF00}To check message of the day type: {FF0000}/motd");
return 1;
}


And do what Konstantinos said.

Tuntun
22/01/2014, 09:27 AM
1 error: line 1117. and this is : }
else
{

Tuntun
22/01/2014, 10:57 AM
So how to fix these errors? and if it is about something fwrtite then please fix it. i have never use fwrite before.

[08:54:51] Number of vehicle models: 25
[08:55:32] Incoming connection: 114.130.64.154:55732
[08:55:36] [join] Tuntun has joined the server (0:114.130.64.154)
[08:55:41] [debug] Server crashed while executing 18WoS.amx
[08:55:41] [debug] AMX backtrace:
[08:55:41] [debug] #0 native fwrite () [0809aad0] from samp47180
[08:55:41] [debug] #1 0001e0c0 in ?? (0x00000000) from 18WoS.amx
[08:55:41] [debug] #2 00040408 in ?? (0x00000000, 0x00000001, 0x0025bb80) from 18WoS.amx
[08:55:41] [debug] #3 000858b4 in public OnDialogResponse (0x00000000, 0x00000001, 0x00000001, 0xffffffff, 0x0025bb80) from 18WoS.amx
[08:55:41] [debug] Native backtrace:
[08:55:41] [debug] #0 b73f331b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[08:55:41] [debug] #1 b73ed7c2 in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[08:55:41] [debug] #2 b73ee3ac in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[08:55:41] [debug] #3 b73ee856 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[08:55:41] [debug] #4 b73f2f6c in ?? () from plugins/crashdetect.so
[08:55:41] [debug] #5 b7769600 in ?? ()
[08:55:41] [debug] #6 b74d5577 in gsignal () from /lib/libc.so.6
[08:55:41] [debug] #7 b74d8962 in abort () from /lib/libc.so.6
[08:55:41] [debug] #8 b74ce767 in __assert_fail () from /lib/libc.so.6
[08:55:41] [debug] #9 0809a6fc in ?? () from samp47180
[08:55:41] [debug] #10 0809ab5f in ?? () from samp47180
[08:55:41] [debug] #11 08093e44 in ?? () from samp47180
[08:55:41] [debug] #12 b73eb03c in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[08:55:41] [debug] #13 b73f1458 in ?? () from plugins/crashdetect.so
[08:55:41] [debug] #14 b73f5c61 in amx_Exec () from plugins/crashdetect.so
[08:55:41] [debug] #15 b73ed708 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[08:55:41] [debug] #16 b73f11c9 in ?? () from plugins/crashdetect.so
[08:55:41] [debug] #17 080ae5bf in ?? () from samp47180
[08:55:41] [debug] #18 080b99e4 in ?? () from samp47180
[08:55:41] [debug] #19 08071b48 in ?? () from samp47180
[08:55:41] [debug] #20 08071c42 in ?? () from samp47180
[08:55:41] [debug] #21 0807bac0 in ?? () from samp47180
[08:55:41] [debug] #22 080b5c2d in ?? () from samp47180
[08:55:41] [debug] #23 080b5dc2 in ?? () from samp47180
[08:55:41] [debug] #24 080b16d3 in ?? () from samp47180
[08:55:41] [debug] #25 b74c1c96 in __libc_start_main () from /lib/libc.so.6
[08:55:41] [debug] #26 0804b521 in ?? () from samp47180