jirentabu / crashrpt

Automatically exported from code.google.com/p/crashrpt
0 stars 0 forks source link

error report is deleted #188

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
***NOTE*** Please do create a NEW issue per each detected bug! Do not list
all detected problems in single issue record!

What steps will reproduce the problem?
1. In main() function, init CrashRpt library like this:
    CR_INSTALL_INFO crInfo;
    memset(&crInfo, 0, sizeof(crInfo));
    crInfo.cb = sizeof(CR_INSTALL_INFO);
    crInfo.pszAppName = TEXT("myapp");
    crInfo.pszAppVersion = TEXT("daily");
    crInfo.pszEmailSubject = TEXT("error report");
    crInfo.pszEmailTo = TEXT("johnsmithcry@gmail.com");
    crInfo.dwFlags = CR_INST_ALL_POSSIBLE_HANDLERS;
    crInfo.dwFlags |= CR_INST_NO_GUI;
    crInfo.pszDebugHelpDLL = TEXT("./CrashRpt");
    crInfo.uMiniDumpType = MiniDumpNormal;
    crInfo.pszErrorReportSaveDir = TEXT("./CrashRpt");
    CrAutoInstallHelper crInst(&crInfo);
2.In main() function, after CrashRpt init ok, do this:
    int* p = NULL;
    *p = 13;

What is the expected output? What do you see instead?
when my demo running, In directory CrashRpt, error report file "xxx.zip" is 
generated, and then is deleted. Is this a bug ?
If I init CrashRpt like this, the error report file "xxx.zip" is saved ok:
    CR_INSTALL_INFO crInfo;
    memset(&crInfo, 0, sizeof(crInfo));
    crInfo.cb = sizeof(CR_INSTALL_INFO);
    crInfo.pszAppName = TEXT("myapp");
    crInfo.pszAppVersion = TEXT("daily");
    crInfo.pszEmailSubject = TEXT("error report");
    crInfo.pszEmailTo = TEXT("johnsmithcry@gmail.com");
    crInfo.pszUrl = TEXT("http://localhost:80/crashrpt.php");// 1 to retain xxx.zip,this line is required.
    crInfo.dwFlags = CR_INST_ALL_POSSIBLE_HANDLERS;
    crInfo.dwFlags |= CR_INST_NO_GUI;
    crInfo.pszDebugHelpDLL = TEXT(".");
    crInfo.uMiniDumpType = MiniDumpNormal;
    crInfo.pszErrorReportSaveDir = TEXT("./CrashRpt");
    CrAutoInstallHelper crInst(&crInfo);
    // 2 to retain xxx.zip,this line is required.
    crAddRegKey(TEXT("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer"),
                TEXT("regkey.xml"), CR_AR_ALLOW_DELETE);

What version of CrashRpt are you using?
I used CrashRpt version is v1.4.1 r1507.

What is your version of Visual Studio?
I used Visual Studio 2010.

What is your version of Windows operating system?
My OS is windows xp sp3.

Please provide any additional information below.

Original issue reported on code.google.com by johnsmit...@gmail.com on 27 Feb 2013 at 7:38

Attachments:

GoogleCodeExporter commented 9 years ago
Please clarify, what do you mean by this phrase "error report file "xxx.zip" is 
saved ok"? Is it uploaded to your server ok or is it saved to end user's 
machine ok?

IMHO, error report is created, then it is sent to the recipient, and then it is 
deleted. If the delivery was unsuccessful, error report should be deleted, too. 

Original comment by zexspect...@gmail.com on 27 Feb 2013 at 8:15

GoogleCodeExporter commented 9 years ago
I mean that, I do not need crashrpt send error report mail to me, I only need 
is crashrpt catch exceptions and save error report files to end user's machine. 
But in fact, error report files generated and then it is deleted.

johnsmithcry

From: crashrpt
Date: 2013-02-27 16:15
To: johnsmithcry
Subject: Re: Issue 188 in crashrpt: error report is deleted

Original comment by johnsmit...@gmail.com on 1 Mar 2013 at 1:27

GoogleCodeExporter commented 9 years ago
If you need to just save crash reports to your disk without sending them, you 
should use the CR_INST_DONT_SEND_REPORT flag. But in your code I do not see 
that flag.

Original comment by zexspect...@gmail.com on 1 Mar 2013 at 2:38

GoogleCodeExporter commented 9 years ago
This was not a valid issue report. Closing.

Original comment by zexspect...@gmail.com on 6 Mar 2013 at 4:35