SA-MP Forums Archive
Best way to detect infinite loops. - 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)
+--- Thread: Best way to detect infinite loops. (/showthread.php?tid=571903)



Best way to detect infinite loops. - Ahmad45123 - 23.04.2015

There is a problem in my script which is eaiser because a timer is called million times per second or there is an infinite loop ?

Is there is a plugin that can log each function call ?.


Re: Best way to detect infinite loops. - AberKane - 23.04.2015

I do have a way just cause all scripts i made are mine and i do know what's goin' on inside.
If it's your case just search for "while" or "for", well even if it's not.
Those are mainly all the loops you might find, then check them.

As a side note, you might also find "foreach" loops if you're using it's include so do search for that too.
If you're suspicious about a loop post it here.



Re: Best way to detect infinite loops. - Ahmad45123 - 23.04.2015

Ok, I compiled it with debugging level 7 in YSI.
And the bug is in YSI when loading something using y_xml it loops infinity on the file... And as 4.0 is/was in beta.. Will try and compile it in YSI 3.1 and see how it goes.

Thanks.