Good day!
I have searched the answer but never found.
I use qt.
I need to do to all the program crashes, i.e., the exception is recorded and displayed error message.
I did the usual, I catch exception using catch(). Exceptions, such as sigsegv, I'm caught by the use of
SetUnhandledExceptionFilter() in Windows and sigaction() on Linux. Also I put some std::set_terminate(). And then displays a backtrace if it is Windows created a mini dump and displayed the error description.
But there are several problems:
1. If an error occurs in another thread (and I have them just there and happening), the program first does not wait for clicking "OK" in the error message and closes, and second, after the closing, the thread is cleared to work, and even QProcess::startDetached("taskkill ...") not helps
2. Now the most important. As to the place where the error occurred? With the help of a minidump can be obtained only in the case that the program skompilowany in debug mode and if the error occurred directly in program code, but if I passed to the function qt the wrong pointer, I will get a place in this function and not the place where it was called.
3. To get a normal vectras and the error location, I need to compile in debug the program, but then she, along with all the DLL will weigh 500 MB.
4. std::set_terminate() is set for only one thread. How to install for everyone?
How to implement all of this? I googled crashrpt, but I have mingw and it is not crossplatformed. I found Google breakpad and adaptatio under qt (
https://github.com/dschmidt/libcrashreporter-qt), but there is not written how to implement it in your project. What libraries you can use for this?
Thanks in advance!