SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 16/06/2015, 07:01 AM   #1
shaquill
Banned
 
Join Date: Feb 2015
Posts: 28
Reputation: 2
Default RP Server crash every payday (Hour) Help Crash detect.

Okay so everything compile perfect in Pawno with no errors or warnings but when I use the Command /PayDay in game or when a hour has passed and its time for payday (AKA paycheck / set player hour on stats) the server crash and restarts i used the plugin crash detect hopping it could help me fix whats wrong but i still have no idea.. Here is what the crash detect spam on the logs.

Code:
 from LAC.amx
[03:05:23] [debug] Run time error 4: "Array index out of bounds"
[03:05:23] [debug] Accessing element at index 12 past array upper bound 11
[03:05:23] [debug] AMX backtrace:
[03:05:23] [debug] #0 005e5ba4 in ?? (0x00000000) from LAC.amx
[03:05:23] [debug] #1 005e5a04 in public ServerHeartbeatTwo@_yT (0x00000000) from LAC.amx
[03:05:24] [debug] Run time error 4: "Array index out of bounds"
[03:05:24] [debug] Accessing element at index 12 past array upper bound 11
[03:05:24] [debug] AMX backtrace:
[03:05:24] [debug] #0 005e5ba4 in ?? (0x00000001) from LAC.amx
[03:05:24] [debug] #1 005e5a04 in public ServerHeartbeatTwo@_yT (0x00000001) from LAC.amx
[03:05:24] [debug] Run time error 4: "Array index out of bounds"
[03:05:24] [debug] Accessing element at index 12 past array upper bound 11
Edit This Is what I get after using the CMD "/PayDay"

Code:
[03:19:06] [zcmd] [Frank Jackson]: /payday
[03:19:06] [debug] Server crashed while executing LAC.amx
[03:19:06] [debug] AMX backtrace:
[03:19:06] [debug] #0 native fwrite () [0809bd40] from samp03svr
[03:19:06] [debug] #1 000a40b4 in ?? (0x00000000) from LAC.amx
[03:19:06] [debug] #2 00131a6c in public PayDay () from LAC.amx
[03:19:06] [debug] #3 002e2d9c in public cmd_payday (0x00000003, 0x07fe525c) from LAC.amx
[03:19:06] [debug] #4 native CallLocalFunction () [080df4c0] from samp03svr
[03:19:06] [debug] #5 00016ae8 in ?? (0x00000003, 0x07fe523c) from LAC.amx
[03:19:06] [debug] #6 00010d14 in public OnPlayerCommandText (0x00000003, 0x07fe523c) from LAC.amx
[03:19:06] [debug] Native backtrace:
[03:19:06] [debug] #0 0049831b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[03:19:06] [debug] #1 004927c2 in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[03:19:06] [debug] #2 004933ac in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[03:19:06] [debug] #3 00493856 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[03:19:06] [debug] #4 00497f6c in ?? () from plugins/crashdetect.so
[03:19:06] [debug] #5 00653410 in ?? ()
[03:19:06] [debug] #6 00653430 in ?? ()
[03:19:06] [debug] #7 00218b11 in gsignal () from /lib/libc.so.6
[03:19:06] [debug] #8 0021a3ea in abort () from /lib/libc.so.6
[03:19:06] [debug] #9 00211e2b in ?? () from /lib/libc.so.6
[03:19:06] [debug] #10 00211ee6 in ?? () from /lib/libc.so.6
[03:19:06] [debug] #11 0809b96c in ?? () from samp03svr
[03:19:06] [debug] #12 0809bdcf in ?? () from samp03svr
[03:19:06] [debug] #13 080950b4 in ?? () from samp03svr
[03:19:06] [debug] #14 0049003c in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[03:19:06] [debug] #15 00496458 in ?? () from plugins/crashdetect.so
[03:19:06] [debug] #16 0049ac61 in amx_Exec () from plugins/crashdetect.so
[03:19:06] [debug] #17 00492708 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[03:19:06] [debug] #18 004961c9 in ?? () from plugins/crashdetect.so
[03:19:06] [debug] #19 0083f20c in ?? () from plugins/streamer.so
[03:19:06] [debug] #20 080df762 in ?? () from samp03svr
[03:19:06] [debug] #21 080950b4 in ?? () from samp03svr
[03:19:06] [debug] #22 0049003c in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[03:19:06] [debug] #23 00496458 in ?? () from plugins/crashdetect.so
[03:19:06] [debug] #24 0049ac61 in amx_Exec () from plugins/crashdetect.so
[03:19:06] [debug] #25 00492708 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[03:19:06] [debug] #26 004961c9 in ?? () from plugins/crashdetect.so
[03:19:06] [debug] #27 0083f20c in ?? () from plugins/streamer.so
[03:19:06] [debug] #28 080a5482 in ?? () from samp03svr
[03:19:06] [debug] #29 080b1371 in ?? () from samp03svr
[03:19:06] [debug] #30 08071d38 in ?? () from samp03svr
[03:19:06] [debug] #31 08071e32 in ?? () from samp03svr
[03:19:06] [debug] #32 0807bc20 in ?? () from samp03svr
[03:19:06] [debug] #33 080ae9fd in ?? () from samp03svr
[03:19:06] [debug] #34 080aebc2 in ?? () from samp03svr
[03:19:06] [debug] #35 080a9e9a in ?? () from samp03svr
[03:19:06] [debug] #36 00204d26 in __libc_start_main () from /lib/libc.so.6
[03:19:06] [debug] #37 0804b4e1 in ?? () from samp03svr
shaquill is offline   Reply With Quote
Old 16/06/2015, 07:26 AM   #2
SoFahim
Gangsta
 
SoFahim's Avatar
 
Join Date: May 2015
Location: Bangladesh.
Posts: 945
Reputation: 84
Default Re: RP Server crash every payday (Hour) Help Crash detect.

This problem on your script folder's files. I already faced it . Re new your all scriptfiles' folder's files
__________________
Senior Developer & Mapping manager of SARP

You can contact me at Discord, my ID: Gold#8839
Quote:
SoFahim is offline   Reply With Quote
Old 16/06/2015, 07:49 AM   #3
shaquill
Banned
 
Join Date: Feb 2015
Posts: 28
Reputation: 2
Default Re: RP Server crash every payday (Hour) Help Crash detect.

Im sorry I cant seem to make out what your trying to tell me. I should delete files ?
shaquill is offline   Reply With Quote
Old 16/06/2015, 09:15 AM   #4
SoFahim
Gangsta
 
SoFahim's Avatar
 
Join Date: May 2015
Location: Bangladesh.
Posts: 945
Reputation: 84
Default Re: RP Server crash every payday (Hour) Help Crash detect.

Quote:
Originally Posted by shaquill View Post
Im sorry I cant seem to make out what your trying to tell me. I should delete files ?
Ye. Maybe this problem on Facpay or business pay.
__________________
Senior Developer & Mapping manager of SARP

You can contact me at Discord, my ID: Gold#8839
Quote:
SoFahim is offline   Reply With Quote
Old 16/06/2015, 09:18 AM   #5
shaquill
Banned
 
Join Date: Feb 2015
Posts: 28
Reputation: 2
Default Re: RP Server crash every payday (Hour) Help Crash detect.

Okay ill check that out
shaquill is offline   Reply With Quote
Old 16/06/2015, 09:26 AM   #6
Konstantinos
Spam Machine
 
Konstantinos's Avatar
 
Join Date: Dec 2011
Posts: 11,981
Reputation: 1392
Default Re: RP Server crash every payday (Hour) Help Crash detect.

Compile with -d3 flag to get more information and the lines: https://github.com/Zeex/samp-plugin-...ith-debug-info

After recompiling (upload if necessary) and start the server again. Execute /payday command or wait for the next time a server crash or a run time error occurs and post the server log.

For your information, fclose crashes the server if the file handle (couldn't open the file) is invalid so doing something like this:
pawn Code:
new File: fhandle = fopen(..);
// some code..
fclose(fhandle);
doesn't prevent it. The correct way would be:
pawn Code:
new File: fhandle = fopen(..);
if (fhandle)
{
    // some code..
    fclose(fhandle);
}

About the run time error 4, means that you have an array with size of 12 so the valid indexes are 0 to 11 but 12 is passed as an index which is obviously out of bounds.
__________________
Life is like riding a bicycle. To keep your balance, you must keep moving.

[Tutorial] How to use SQLite
[FilterScript] Tune System
Konstantinos is offline   Reply With Quote
Old 16/06/2015, 07:11 PM   #7
shaquill
Banned
 
Join Date: Feb 2015
Posts: 28
Reputation: 2
Default Re: RP Server crash every payday (Hour) Help Crash detect.

Ill try this and post what i get.
shaquill is offline   Reply With Quote
Old 16/06/2015, 07:55 PM   #8
shaquill
Banned
 
Join Date: Feb 2015
Posts: 28
Reputation: 2
Default Re: RP Server crash every payday (Hour) Help Crash detect.

Your probably going to hate me but I don't know how to add -d3 Im very new and not even sure what -d3 is it a text or a code i need to add to a text file ? Well i compiled it with my older version of pawno cuz i think that has it and got this
Code:
 C:\Users\Faerless\Desktop\LAC File\gamemodes\LAC.pwn(19135) : warning 203: symbol is never used: "ID"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase

Header size:          40888 bytes
Code size:          7743432 bytes
Data size:         66263332 bytes
Stack/heap size:   16000000 bytes; estimated max. usage: unknown, due to recursion
Total requirements:90047652 bytes

1 Warning.
Code:
 
[16:05:24] *** Streamer Plugin: Include file version (0x27002) does not match plugin version (0x276001) (script might need to be recompiled with the latest include file)
The server just keep restarting and dont let you login unless I use the newer version of pawno so Im using the newer version of pawno.
shaquill is offline   Reply With Quote
Old 16/06/2015, 08:37 PM   #9
Konstantinos
Spam Machine
 
Konstantinos's Avatar
 
Join Date: Dec 2011
Posts: 11,981
Reputation: 1392
Default Re: RP Server crash every payday (Hour) Help Crash detect.

About the debug info all you need is a file called pawn.cfg into pawno folder and inside the file written -d3

About the streamer warning, you need to compile the script with the same version the plugin file is. v2.7.7 is out so download it, replace both include and plugin file, re-compile and try again.

Remember, I only need the output of crashdetect in server log - the rest are irrelevant.
__________________
Life is like riding a bicycle. To keep your balance, you must keep moving.

[Tutorial] How to use SQLite
[FilterScript] Tune System
Konstantinos is offline   Reply With Quote
Old 16/06/2015, 10:34 PM   #10
shaquill
Banned
 
Join Date: Feb 2015
Posts: 28
Reputation: 2
Default Re: RP Server crash every payday (Hour) Help Crash detect.

Okay doing it now. Thanks for breaking it down for me!
shaquill is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[+REP] Server Crash (Crash detect errors) Airman123 Scripting Help 19 31/05/2015 07:00 AM
Server crash.. [with crash detect logs] please help LordxTyrion Server Support 5 18/05/2015 04:56 AM
Crash detect , server crash Debug. whats wrong? MarwanCartman Server Support 4 10/05/2015 11:14 AM
[Help] Server crash LIBMYSQL Crash Detect bigtigerbeee Scripting Help 2 13/03/2014 12:53 PM
setplayername server crash helpme [crash detect] bigtigerbeee Scripting Help 4 28/11/2013 12:23 AM


All times are GMT. The time now is 09:38 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.