It is not like what you always see in the movies. Robots are possible in the future but humans are not that dumb to create something with any countermeasures on it. We might we careless sometimes but we learn from it and will not let something we created to mess us up.
Problem is if creating an artificial intelligence becomes easy enough in the future that a lot of people can do it. If no specialized hardware is needed even worse. Because not everyone will have the same standards when doing it. And besides carelessness some will want ai for the purpose of messing us up. The military will use it as a weapon. Others may want to use it to cause chaos. Sort of a doomsday weapon.