Program using 100% CPU, UI is frozen but other threads work

I have many of these devices deployed using the same code for a few years now. I have had a few freezes in the past but was not able to diagnose because they were so infrequent. It’s only now that I have one captured and the client is letting me keep it frozen while I try to find the issue.

I have had issues in the past with threads using 100% cpu, specifically Thread.Sleep or Thread.Suspend Raspberry Pi Thread.Sleep Causes 100% CPU Utilization - #5 by kevin_g but as you said, the UI never froze. I was not able to reproduce those issues in the last few versions of Xojo. I don’t know if this issue is somehow related, but it would seem to be in the framework.