Microcontroller freezes randomly when switching on a relay (snubber inside)

The snubbers should be across the device being snubbed, NOT the relay contacts.