V5 Brain getting stuck on program/losing connection

Hey all, after driving for a few minutes, the robot suddenly stops receiving any commands from my controller and if I try to close the program by holding the power button on the controller, the brain still has the program running while the controller does not. The only way I can reset everything is turning off everything and pressing the reset button on the back of the controller. If anyone has some help for me it would be much appreciated.
Heres my code:

its in pros 3 for v5

I haven’t had a chance to look through your code that closely, but what happens if you run a default program (like Clawbot) that comes with VEXos for a few minutes?

I am making a program that will just move motors like how i want them to, but I took everything out of functions and just made it really basic. But I believe (haven’t tested) that it may have something to do with the code because my earlier itterations worked well, until now where they are slightly more dense. I will test it within the next 15-ish minutes

So I have simplified my program and tested it out and it is still cutting out randomly indefinitely. I think it is also important to note that I am using 2 controllers, 1 master and 1 partner.

Why’s that?

I think the program is working fine actualy, I updated the firmware of aeverything and there hasnt been an issue yt