I had this problem and for various reasons decided it was the switch on the clutch lever which allows starting while the bike is in gear if the clutch is disengaged. I removed the switch and cleaned the contacts which had corroded. The stalling hasn't happened again.