There is a bug in Xiamomi phones where if a wallpaper is set containing xml data such as this one:
https://i.redd.it/je65fih3f5021.png
Will make your phone crash and force you into wiping it.
You can view the xml inside by editing it with a text editor like notepad++
So if you have a wallpaper site or wallpaper app make sure you run your wallpapers through either GD library or ImageMagick to prevent you damaging peoples phones/making them loose data.
https://i.redd.it/je65fih3f5021.png
Will make your phone crash and force you into wiping it.

You can view the xml inside by editing it with a text editor like notepad++
So if you have a wallpaper site or wallpaper app make sure you run your wallpapers through either GD library or ImageMagick to prevent you damaging peoples phones/making them loose data.