![]() |
#1 |
Guest
Posts: n/a
|
![]()
Crash example
Suppose we run the following game mode: pawn Code:
By default when it comes to function2, your server will exit immediately and if you're running Windows it will dump some unreadable stuff to crashinfo.txt. But with crashdetect, you see the following in your server log: Code:
[05:26:38] [debug] Server crashed while executing crash.amx [05:26:38] [debug] Backtrace (most recent call first): [05:26:38] [debug] #0 native fread () from samp-server.exe [05:26:38] [debug] #1 00000090 in ?? () from crash.amx [05:26:38] [debug] #2 00000038 in ?? () from crash.amx [05:26:38] [debug] #3 0000001c in main () from crash.amx Code:
[05:27:11] [debug] Server crashed while executing crash.amx [05:27:11] [debug] Backtrace (most recent call first): [05:27:11] [debug] #0 native fread () from samp-server.exe [05:27:11] [debug] #1 000000b8 in function2 () at crash.pwn:13 [05:27:11] [debug] #2 00000048 in function1 () at crash.pwn:8 [05:27:11] [debug] #3 00000024 in main () at crash.pwn:4 Run time errors are usually reported via the "Run time error <error_code>: "Error details here"" message. Unfortunately this message is rarely shown because the server doesn't always check for them. Some example code by JernejL: pawn Code:
If you compile this code in debug mode mode and run it: Code:
[05:32:16] [debug] Run time error 4: "Array index out of bounds" [05:32:16] [debug] Accessing element at index 100 past array upper bound 4 [05:32:16] [debug] Backtrace (most recent call first): [05:32:16] [debug] #0 00000084 in public OnGameModeInit () at bounds.pwn:11 If you wanna make your server quit on first runtime error set the "die_on_error" var in server.cfg to 1. Download Fixed links - Y_Less. Last edited by dugi; 13/01/2014 at 05:32 PM. |
![]() |
![]() |
#2 |
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Dec 2010
Location: Al-Dunya
Posts: 2,946
Reputation: 687
|
![]()
Wow, this is just what I need! Good work
![]() |
![]() |
![]() |
![]() |
#3 |
Banned
![]() Join Date: Jan 2011
Posts: 333
Reputation: 0
|
![]()
it works?
|
![]() |
![]() |
![]() |
#4 |
Gangsta
![]() ![]() ![]() ![]() Join Date: Dec 2010
Posts: 627
Reputation: 88
|
![]()
for me not pawno\settings.ini
Code:
[General] FileAssoc=1 [Display] WindowMax=1 WindowX=459 WindowY=251 WindowW=985 WindowH=519 Splitter=233 Font_Name=Courier New Font_Size=10 ShowFuncList=1 [RunOpts] CopyDir=\ ExeFile=pawncc.exe Params=-r -d3 |
![]() |
![]() |
![]() |
#5 | |
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: May 2010
Location: Toronto, Canada
Posts: 1,190
Reputation: 43
|
![]() Quote:
This is amazing, and will help MANY people. |
|
![]() |
![]() |
![]() |
#6 |
Gangsta
![]() ![]() ![]() ![]() Join Date: Dec 2010
Posts: 627
Reputation: 88
|
![]()
pass -d3 to compiler, this if for pawno
|
![]() |
![]() |
![]() |
#7 |
Guest
Posts: n/a
|
![]()
Setting compiler options via pawno\settings.ini doesn't work for some reason, but you can create a file "pawn.cfg" in pawno directory and specify compiler options there, i.e like in this topic:
http://forum.sa-mp.com/showthread.php?t=249897 Note that you need -d3 as I mentioned in the first post (maybe -d2 will work too - I didn't check) Thanks, let us know if it helped you ![]() |
![]() |
![]() |
#8 |
Gangsta
![]() ![]() ![]() ![]() Join Date: Dec 2010
Posts: 627
Reputation: 88
|
![]()
deleted
Last edited by ][Noname][; 12/04/2012 at 07:57 AM. |
![]() |
![]() |
![]() |
#9 |
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: May 2010
Location: Republic of Moldova
Posts: 1,125
Reputation: 51
|
![]()
This one should kick ass, are you sure it works fine?
|
![]() |
![]() |
![]() |
#10 |
Gangsta
![]() ![]() ![]() ![]() Join Date: Dec 2010
Posts: 627
Reputation: 88
|
![]()
deleted
Last edited by ][Noname][; 12/04/2012 at 07:56 AM. |
![]() |
![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Ajuda] CrashDetect | iHarzard | Português/Portuguese | 1 | 02/03/2014 08:33 PM |
CrashDetect | SPA | Scripting Help | 3 | 23/02/2014 11:17 AM |
CrashDetect | SPA | Scripting Help | 9 | 19/02/2014 09:17 PM |
CrashDetect.so | Mahde | Scripting Help | 2 | 09/02/2014 12:45 PM |
Crashdetect | Blackazur | Server Support | 1 | 30/11/2012 10:27 AM |