I encountered an error in the MFC application during runtime. When the application is idle, it crashes, causing the UI to disappear, and I can't click anything in the application. I have to go to the task manager and end the process.(https://i.stack.imgur.com/4BBES.png)](https://i.stack.imgur.com/4BBES.png)(https://i.stack.imgur.com/QPP54.png)](https://i.stack.imgur.com/QPP54.png)
I want to fix the application and ensure it runs smoothly without any crash or hanging issues. Thank you for your suggestions.