I have an old complex VB.Net Windows application that runs on .Net Framework 4.8. It runs just fine if I keep interacting with it. But if I leave it idle for 2-3 hours, it stops working. I looked in task manager and even tried clicking on the program itself and it does not say "not responding" and looks like it is responding and it is not frozen but nothing is not working. By the way, the main screen is just a couple of flags that the user clicks and selects the language. When I click on the flags, nothing happens. I have a log for almost every action that happens in the application. But I can not find any log at all after I left the application idle. This means nothing happened and the application just stopped responding to events. Looks like it decided to detach all the events.
I looked in Task Manager and it is not using any CPU (it bounces between 0.5% to 3%), and Task Manager says it is working just fine and not showing "not responding" in front of the application. I even tried to pause the application using Visual Studio to see if the program is stuck in any loop or not, but VS shows nothing and it says your application is in "External Code". There is nothing odd in the diagnosis of Visual Studio or anywhere else.