基本上都是parfait_crash_handler.exe 路径错误,检查路径。
Windows下,如果基于QT的QCoreApplication::applicationDirPath() 去构造路径,会导致路径设置不对,建议使用windows API GetModuleFileName 来获取文件路径,参考示例: char szCurrentFilePath[1024];
RtlZeroMemory(szCurrentFilePath, sizeof(szCurrentFilePath));
GetModuleFileNameA(NULL, (LPSTR)szCurrentFilePath, sizeof(szCurrentFilePath));
PathRemoveFileSpecA((LPSTR)szCurrentFilePath);
QString szCurrentDir = QString(szCurrentFilePath) + "\\crash\\";
parfait_wrapper->InitCrashServer(szCurrentDir.toStdString().c_str());
|