SA-MP Forums Archive
Ways to crash server without natives? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Ways to crash server without natives? (/showthread.php?tid=262434)



Which kinds of scripting errors can lead to a server crash? - 0x5A656578 - 18.06.2011

Which kinds of scripting errors can lead to a server crash?

By saying scripting errors I mean those not related to native functions (NOT like passing invalid arguments to natives, etc). Please post here if you know one.

If you wonder why I need this: it's for a plugin that can detect server crash (via exception/signal handlers) and report some useful info like stack trace to help in debugging the issue.

Thanks in advance.


Re: Ways to crash server without natives? - Coelho - 18.06.2011

Well a simple way to crash the server, if this is what your asking, is off the top of my head doing this:

Код:
SetPlayerName(dummyid, "");
Setting a players name to blank WILL crash the server.

------------------------------------------------------

Doing it in another way would be an array out of bounds (but I think this is caught):

Код:
new dummyvar;
new dummyarray[12];
dummyvar = dummyarray[12];
Causing an array out of bounds exception WILL crash the server (or not execute any code done after this)

------------------------------------------------------

Otherwise, I think all scripting errors are caught, only SA-MP natives will crash the server.


Re: Ways to crash server without natives? - 0x5A656578 - 18.06.2011

It seems that out-of-bounds errors are silently caught by AMX since I tried them several times with no luck


Re: Ways to crash server without natives? - alpha500delta - 18.06.2011

Leaving a textdraw string empty.


Re: Ways to crash server without natives? - Omega-300 - 20.06.2011

You could try to read memory outside of AMX memory section. That do crash server.