Hi,
The following code snippet runs fine as a Script in a Program but causes a crash when run as a Script in a SubProgram. Running URSim 5.11.0.108249. The Robot Status becomes “NO CONTROLLER” when the program fails.
def my_fun():
end
thread my_thrd():
while True:
my_fun()
sync()
end
return False
end
run my_thrd()
Declaring the function within the scope of the thread solves the issue. However, in my current application I need to call the function both inside and outside of the thread.
Is this expected behavior? If so, why? Any suggestion for a workaround?
Best regards,
Charlie