Just for fun, i've wrote this simple script (where the script itself is located in <xypath>/scripts/test.xys):
Code: Select all
Foobar : foo::load scripts/test.xys, foo
-
CancelThe result of this little experiment is that XY will crash and exits after about 1 second without any error-message (maybe because i've told windows not to generate a bug-report and such send-data-to-microsoft-suff)
Maybe you say, don't write such stupid scripts, but maybe there is a solution to test if a script walk in circles. I know that this would be hard because you have to check all the transitions between each script-call, but maybe you can simply test the runtime or the amount of commands processed in one go.
In case that it is not possible to catch this user-fault in an appropriate way, an advisement to the useres should be posted in the wiki.
In my further tests i've modified the script above to ensure how many times this script runs before XY crashes:
Code: Select all
Foobar : foo::goto E:\TEMP\foo\::#1401::load scripts/test.xys, foo
-
CancelThe Result of this experiment is a folder with 1155 files in it
(on a second run, i've got exactly the same amount of files)
Maybe you simply restrict the amount of commands executeded in one go to 1000 or something to prevent XY crashing.
This endless loop is also possible without any external script-file, simply by creating an UDC ::#1408 and #1408 is the ID of the Script itself.
Extending this in the same way as above resolves in 671 files (= script circles), second run->same result.
XYplorer Beta Club