What causes a 1996 Nissan Altima to stall while driving?


My Nissan Altima stall while driving, what's the problem can someone tell me Pleas. Help here---> After cleaning the Air flow meter replacing the intake and plenum gasket as well as cleaning the Idle speed valve I still had problems so I searched more on the internet and seem to have found the solution to the car stalling out when driving. The crankshaft position sensor located on the front lower engine below the crankshaft would heat up and short the inner coil. I replaced it by removing the passenger tire then removing the plastic cover revealing the sensor with (2) 10 MM bolts that hold it on. It took less than a half hour and cost $61 dollars. I took it for a ride and no more stalling. This is a big issue with Nissan and infinity owners and Nissan refuses to do a recall on the dangerous issue. There are camshaft sensors and a rear crank sensor as well. I did not replace them and don,t think it will be necessary either.