We analyze, theoretically and by numerical simulations of the associated Langevin
equation, the dynamics of thermal escape from a generalized washboard
potential with a second harmonic term. This theory applies to novel
superconducting devices, as the high-temperature superconductor devices or the
superconducting-ferromagnetic-superconducting junctions, which appears to present
a not negligible second harmonic term in the current-phase relation. The results show
that the escape dynamics depends on the ratio between the amplitude of harmonics
and the quality factor of the devices. Moreover, an interesting dependance is found in
the sign of the second harmonic term: in some cases a positive term can be
discriminated from a negative term by the temperature behavior of the escape
current distributions.