The Real Problem
I spent many years doing research in AI. I know just how hard it is to make computers perceive, plan and act in the real world.
I do not believe the sci-fi vision of truly intelligent machines taking over will be a problem for generations - if ever. It is too hard to build those things.
But, the real problems will come from dumb computer systems, compounded by the fact that we tend to view them as being smarter than they really are!
Fast stock trading has produced mini-market crashes already. Several times, over the decades nuclear missiles have begun their launch countdowns through misinterpreting radar data, or radio interference from taxis. And how many demands have been sent out by computer billing systems for payments of zero? :D
How dependent have we made ourselves on technologies, like GPS, the Internet, electronics and electricity distribution systems, that may not survive the next Carrington event?
More generally, we are smart enough to build new technologies, but not smart enough to fully comprehend the consequences of deploying them.
Our natural stupidity may be what eradicates us in the end...