inline G4MagneticField& G4MagneticField::operator = (const G4MagneticField &p) { *this = p; return *this; } seems to be an infinite recursive function. If the derived class doesn't need a non-default assignment operator (and therefore doesn' implement it's own), this will be called, making no sign why the program stops forever.
Fixed in development version. Will be part of next release. Thanks.