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

Sorry I didn't specify the values because I posted them previously and I put the exact model in the schematic. The capacitor is 0.1 uF and the resistor 220 ohm.