Issues with wallpaper written in Processing in APDE on phone restart

Hello, I made a wallpaper sketch, where you have dots in the background on the phone, that move around a circle and wrap around the edges of the screen. i really like how it works, however i’ve been having weird issues with it and i’m not sure how to debug it as i don’t know what exactly is failing and why.

Basically, sometimes? when the phone shuts down or restarts, the dots will start moving for the first few seconds, after which they will just stop and will not move until i recompile the wallpaper.

I tried to add some prints to the program to make sure that it’s not stalling anywhere and it seems like the program has no issue continuing to run (i added a print on every draw that writes the current location of the first “Star” in the array and it continues to move after the program stops printing)

Is there any function i can use to like check if anything is going wrong with drawing the objects on screen as i see that the functions themselves don’t return an error value to check that way if they ran without issues.

tl:dr : i have an array of dots, that are traveling trough the screen, without the screen being wiped after each frame, so they leave trails. and after restart in the console i see that they are still moving, but nothing is being drawn after a few seconds of the dots moving on the screen and i don’t know how to farther test what the issue is.

This is the code and i’m running it on samsun galaxy 7, android 8.0.0, using the latest version of APDE (android processing IDE) as a wallpaper