Random stalling is usually caused by one of two things. Bad crank position sensor, or a bad ignition switch.