A theory of the onset of solar eruptive processes