The application that i am working on has a crash reporter associated with it. The crash reporter code is part of the main code. The crash reporter pops up a dialog and if the user chooses to send the crash report, it generates the dump file and send it to an ftp server.
Till now the reporter was working fine, until the application encountered a stack overflow exception. Since the stack has already got depleted, the application is unable to run the crash reporter.
By having the crash dump creation code in a separate thread I was able to generate the dump file. But I am unable to execute the dialog as I am inside a thread. And if I moved the dialog execution to the main program, it doesn’t get executed.
I am using SetUnhandledExceptionFilter to set the exception handler. And inside the handler I am creating the thread and waiting for it to finish.
When I call exec of the dialog in the handler it doesn't work. I am using QDialog to bring out the pop up with which I could collect information from user. Where and how should I add this dialog execution code so that it might run?
Yes, If I avoid the dialog I am able to generate the crash dump and proceed. I think you are right about the Qt library being in an inconsistent state. The stack overflow was occuring on one of the Qt dlls. I will check using CreateDialog function.