been there lol) my phone used to crash too when i was coding on it. try cleaning up the system junk — i use ADB AppControl for that, they have an android version so no pc needed. basic version is free, interface is in russian (but also english i think), works without root so less risk of breaking stuff. i just frozed all the bloatware apps n cleared cache and the phone stopped crashing. they got a portable version too if u want. made my phone run way smoother