imagicbell / ublockly

reimplementation of google blockly for Unity
http://imagicbell.github.io/unity/2017/10/11/blockly-one.html
Apache License 2.0
138 stars 52 forks source link

The user can create infinite loops #6

Closed apoyatos closed 3 years ago

apoyatos commented 3 years ago

The player can add blocks to the workspace to create infinite loops that crash the app. Code blocks like while true or an infinite recursive function are permited. Maybe as a fix the app could put a max number of iterations so if it passes that number it stops executing the code.

imagicbell commented 3 years ago

Please check the hot fix. I add a max loop number, currently Int16.MaxValue. There will be a dialog showing up reminding of the infinite loop. Also the subsequent process will be terminated. Thanks a lot for this issue.