There is an issue where if you try and getRandom from something set by lets say Math.round the code will halt and not even output an error.
Was running a script, and kept wondering why it was halting for no reason, no error or anything.
Code:
show('Testing Started');
def myVariableA = (2 * 1800 / 3600);
showButton('I got here #1');
def myVariableB = Math.round(2 * 1800 / 3600);
showButton('I got here #2');
def myVariableC = getRandom(1);
showButton('I got here #3')
def normalIntClass = 1;
show(myVariableA + " myVariableA:" + myVariableA.getClass() + " myVariableB:" + myVariableB.getClass() + " myVariableC:" + myVariableC.getClass() + " normalIntClass:" + normalIntClass.getClass());
showButton('Showing myVariableA');
//This will work
def myVariableD = getRandom(myVariableA.intValue());
showButton('I got here #4')
//This will fail
def myVariableE = getRandom(myVariableA);
showButton('I got here #5')
//Halts above with no error etc.
def myVariableF = getRandom(myVariableB);
showButton('I got here #6')