SA-MP Forums

Go Back   SA-MP Forums > SA-MP Server > Server Support

Reply
 
Thread Tools Display Modes
Old 09/05/2015, 11:28 PM   #1
MarwanCartman
Big Clucker
 
Join Date: Dec 2013
Posts: 49
Reputation: 4
Default Crash detect , server crash Debug. whats wrong?

i`m getting this debug
Code:
[22:58:09] [debug] Server crashed while executing GM.amx
[22:58:09] [debug] AMX backtrace:
[22:58:09] [debug] #0 native fwrite () from samp03svr
[22:58:09] [debug] #1 000d4a64 in ?? (25484536, 24786572) from GM.amx
[22:58:09] [debug] #2 00034da0 in ?? (8, 21, 24) from GM.amx
[22:58:09] [debug] #3 00006044 in public OnPlayerDeath (8, 21, 24) from GM.amx
[22:58:09] [debug] Native backtrace:
[22:58:09] [debug] #0 b73e2e8b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[22:58:09] [debug] #1 b73dbbcf in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[22:58:09] [debug] #2 b73dcdbc in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[22:58:09] [debug] #3 b73dd226 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[22:58:09] [debug] #4 b73e2adc in ?? () from plugins/crashdetect.so
[22:58:09] [debug] #5 b772a40c in ?? ()
[22:58:09] [debug] #6 b772a424 in ?? ()
[22:58:09] [debug] #7 b7435607 in gsignal () from /lib/i386-linux-gnu/libc.so.6
[22:58:09] [debug] #8 b7438a33 in abort () from /lib/i386-linux-gnu/libc.so.6
[22:58:09] [debug] #9 b742e757 in ?? () from /lib/i386-linux-gnu/libc.so.6
[22:58:09] [debug] #10 b742e807 in ?? () from /lib/i386-linux-gnu/libc.so.6
[22:58:09] [debug] #11 0809a90c in ?? () from ./samp03svr
[22:58:09] [debug] #12 0809ad6f in ?? () from ./samp03svr
[22:58:09] [debug] #13 08094054 in ?? () from ./samp03svr
[22:58:09] [debug] #14 b73de94b in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[22:58:09] [debug] #15 b73e18f8 in ?? () from plugins/crashdetect.so
[22:58:09] [debug] #16 b73e5916 in amx_Exec () from plugins/crashdetect.so
[22:58:09] [debug] #17 b73ddbe6 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[22:58:09] [debug] #18 b73e1659 in ?? () from plugins/crashdetect.so
[22:58:09] [debug] #19 b7312f4a in ?? () from plugins/streamer.so
[22:58:09] [debug] #20 b72d5cf9 in ?? () from plugins/AntiServerFullFix.so
MarwanCartman is offline   Reply With Quote
Old 10/05/2015, 05:52 AM   #2
SoFahim
Gangsta
 
SoFahim's Avatar
 
Join Date: May 2015
Location: Bangladesh.
Posts: 944
Reputation: 82
Default Re: Crash detect , server crash Debug. whats wrong?

You need to update your Plugin, (Maybe)

public OnPlayerDeath ( This line got a problem. check code of that)
__________________
Senior Developer & Mapping manager of SARP

You can contact me at Discord, my ID: Gold#8839
Quote:
SoFahim is offline   Reply With Quote
Old 10/05/2015, 07:16 AM   #3
Sgt.TheDarkness
Huge Clucker
 
Sgt.TheDarkness's Avatar
 
Join Date: Jun 2012
Location: Moscow, Russia.
Posts: 249
Reputation: 50
Default Re: Crash detect , server crash Debug. whats wrong?

Quote:
Originally Posted by MarwanCartman View Post
i`m getting this debug
Code:
[22:58:09] [debug] Server crashed while executing GM.amx
[22:58:09] [debug] AMX backtrace:
[22:58:09] [debug] #0 native fwrite () from samp03svr
[22:58:09] [debug] #1 000d4a64 in ?? (25484536, 24786572) from GM.amx
[22:58:09] [debug] #2 00034da0 in ?? (8, 21, 24) from GM.amx
[22:58:09] [debug] #3 00006044 in public OnPlayerDeath (8, 21, 24) from GM.amx
[22:58:09] [debug] Native backtrace:
[22:58:09] [debug] #0 b73e2e8b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[22:58:09] [debug] #1 b73dbbcf in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[22:58:09] [debug] #2 b73dcdbc in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[22:58:09] [debug] #3 b73dd226 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[22:58:09] [debug] #4 b73e2adc in ?? () from plugins/crashdetect.so
[22:58:09] [debug] #5 b772a40c in ?? ()
[22:58:09] [debug] #6 b772a424 in ?? ()
[22:58:09] [debug] #7 b7435607 in gsignal () from /lib/i386-linux-gnu/libc.so.6
[22:58:09] [debug] #8 b7438a33 in abort () from /lib/i386-linux-gnu/libc.so.6
[22:58:09] [debug] #9 b742e757 in ?? () from /lib/i386-linux-gnu/libc.so.6
[22:58:09] [debug] #10 b742e807 in ?? () from /lib/i386-linux-gnu/libc.so.6
[22:58:09] [debug] #11 0809a90c in ?? () from ./samp03svr
[22:58:09] [debug] #12 0809ad6f in ?? () from ./samp03svr
[22:58:09] [debug] #13 08094054 in ?? () from ./samp03svr
[22:58:09] [debug] #14 b73de94b in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[22:58:09] [debug] #15 b73e18f8 in ?? () from plugins/crashdetect.so
[22:58:09] [debug] #16 b73e5916 in amx_Exec () from plugins/crashdetect.so
[22:58:09] [debug] #17 b73ddbe6 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[22:58:09] [debug] #18 b73e1659 in ?? () from plugins/crashdetect.so
[22:58:09] [debug] #19 b7312f4a in ?? () from plugins/streamer.so
[22:58:09] [debug] #20 b72d5cf9 in ?? () from plugins/AntiServerFullFix.so


The crashdetect log says something about the fwrite() function, can you post your OnPlayerDeath code here?
__________________
Sgt.TheDarkness is offline   Reply With Quote
Old 10/05/2015, 07:51 AM   #4
Nirzor
Gangsta
 
Nirzor's Avatar
 
Join Date: Feb 2012
Location: Bangladesh
Posts: 530
Reputation: 60
Default Re: Crash detect , server crash Debug. whats wrong?

Post your OnPlayerDeath command here. If still not working I'll give you more solutions.
__________________
Our Gaming Community [UG] Gaming. Join my community today.
[UG] Gaming Forums : www.un-gaming.com

Looking for someone with an advanced TDM script , if you have one contact me on skype : emaz.ahmed7 ill put it on hosted tab.
Nirzor is offline   Reply With Quote
Old 10/05/2015, 11:14 AM   #5
Konstantinos
Spam Machine
 
Konstantinos's Avatar
 
Join Date: Dec 2011
Posts: 11,984
Reputation: 1392
Default Re: Crash detect , server crash Debug. whats wrong?

http://wiki.sa-mp.com/wiki/Fwrite

Invalid file handle crashes your server. As it's not used directly in OnPlayerDeath callback but in function(s) that are called there, you should compile with -d3 so you can get the exact line: https://github.com/Zeex/samp-plugin-...ith-debug-info

Also what I meant by invalid handle is this:
Code:
new File: fhandle = fopen(...);
fwrite(fhandle, "...");
...
in case the file is not opened correctly, the file handle will be 0 thus invalid and when used in fwrite or any other file function, it will crash your server. In order to prevent this, you need to check if it's not 0:
Code:
new File: fhandle = fopen(...);
if (fhandle) // if valid file handle..
{
    fwrite(fhandle, "...");
    ...
}
__________________
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
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
Crash detect debug + Hacker Crashing the server Battlezone Scripting Help 5 28/07/2014 12:38 PM
[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
Crash Detect - Debug [RSG]Adrian Romānă/Romanian 0 26/01/2013 10:13 PM
Whats wrong in my command? because sometimes i crash. GBLTeam Help Archive 2 13/03/2011 10:04 PM


All times are GMT. The time now is 10:37 AM.


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