Changed loopState = (ofLoopType)c.getArgument<int>(0); to c.getArgument(0, (int)0); because VS 2012 borks on the unitialized 't' parameter (at least in Debug mode). All in all this template stuff looks a bit strange: many parameters are passed to methods that are not used. Perhaps to work around issues with the design? In any event, with this change the problem is gone.