Onset of the Magnetic Explosion in Solar Flares and Coronal Mass Ejections