OS: Windows 10 Pro
Application: VB6 exe (please don't ask why - proprietory code)

We have sporadic instances of Windows 10 shutting down the app stating it has stopped working. The same function / feature works on the same machine many times. But sometimes it just gives up.

So far we haven't been able to identify any pattern as to why these errors are occurring. We have tried most of the tricks in the book, but no luck.

The function in question takes a string input by the user in a textbox, sends it to a webservice through an XMLHttpRequest, and receives XMLHttpResponse in return from the webservice. We have been able to confirm that the webservice returns a response. Thereafter the application is supposed to parse the response and load some data in a list. This part never executes when the app crashes.

The same machine with the same OS and the same app and the same input string and the same webservice runs fine for hours, even days. And then once in a while, it crashes.

Since it's the OS shutting down the app, I don't think we can handle it with the On Error construct. Any other ideas to handle such errors would of course be great. Will the QueryUnload event of the main form help here?