  Stability of the vortex matter -- magnetic flux lines penetrating into the
material -- in type-II superconductor films is crucially important for their
application. If some vortices get detached from pinning centres, the energy
dissipated by their motion will facilitate further depinning, and may trigger
an electromagnetic breakdown. In this paper, we review recent theoretical and
experimental results on development of the above mentioned thermomagnetic
instability. Starting from linear stability analysis for the initial
critical-state flux distribution we then discuss a numerical procedure allowing
to analyze developed flux avalanches. As an example of this approach we
consider ultra-fast dendritic flux avalanches in thin superconducting disks. At
the initial stage the flux front corresponding to the dendrite's trunk moves
with velocity up to 100~km/s. At later stage the almost constant velocity leads
to a specific propagation regime similar to ray optics. We discuss this regime
observed in superconducting films coated by normal strips. Finally, we discuss
dramatic enhancement of the anisotropy of the flux patterns due to specific
dynamics. In this way we demonstrate that the combination of the linear
stability analysis with the numerical approach provides an efficient framework
for understanding the ultra-fast coupled non-local dynamics of electromagnetic
fields and dissipation in superconductor films.
