Restarting VC via PC SDK

Hi,
I try to restart VC that is in auto via controller.restart(ControllerStartMode.Warm) and RobotStudio locks or crashs. Does somebody have a codeexample that works?
Thanks!

Sorry, but what is it? :cry: