This script is to demonstrate that an invalid argument to the os.date( "%Q" ) statement in a Lua script or attempting to divide by zero in a Lua script will crash Foldit. I was running Foldit under Windows 8. I would be interested in
what this script does in Linux or on a Mac.
Current Foldit uses Lua 5.1.
I downloaded Lua 5.2 and ran it using Windows Lua compiler. The errors seem to be handled better there. It prints out an error message rather than crashing.
The software release,
20140811-46cd6bb2fb-win_x86-devprev,
Fixed these bugs.
Lua Version: Lua 5.1
Foldit run on this date: 08/11/14 15:29:58
Valid table index: 902
Invalid table index: nil
Valid argument for Lua os.date() works 15:29:58
Doing divide with non-zero divisor: 0.33333333333333
Attempting divide with zero divisor: 1.#INF
Invalid argument for Lua os.date() 15:29:58
http://fold.it/portal/recipe/47844
a recipe called “version print” has been created to test these functions
There is no indication as to where the error occurred. Lua is compiled into a series of function calls when executed. Something like “Divide by zero in function check_helix + 128 “ would be nice.