jirentabu / crashrpt

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

Error report is sent twice if crashes in a DLL #44

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. The crInstall() is called in a main application, which loads several other 
DLLs upon start.
2. If a crash occurs in main application, CrashSender.exe sends error report 
via email once. Everything works as expected.
3. If a crash occurs occurs in a DLLs, CrashSender.exe is invoked twice to send 
the same error report. The second report has an empty zip file although its 
UUID and MD5 are same as the other one.

What is the expected output? What do you see instead?
CrashSender.exe should be invoked only once no matter the crash occurs in main 
application or its depended DLL

What version of the product are you using? On what operating system?
v1.2.4_r717 XP Home SP3

Please provide any additional information below.

Original issue reported on code.google.com by Ouyang...@gmail.com on 25 Jun 2010 at 6:49

GoogleCodeExporter commented 9 years ago
Maybe there is another exception happens after the first one, so two crash 
reports are sent? Can you debug and tell me if this is true?

Original comment by zexspect...@gmail.com on 26 Jun 2010 at 12:28

GoogleCodeExporter commented 9 years ago
I wrote a test application (exe+dll). See the attachment app.zip. I tested this 
application, and there was only one error report.

I suppose there was a second exception in your program, maybe in a class 
destructor. This problem may be already fixed in v.1.2.5. Please try it.

Original comment by zexspect...@gmail.com on 26 Jun 2010 at 2:12

Attachments:

GoogleCodeExporter commented 9 years ago
Thank you for prompt response and test dll project. The problem has been sorted 
out although the real reason is still not exactly understood. Anyway, it works 
as expected now. Here is the recap of this issue and solution.

1 Project
My project is a C++ project that integrates TCL script interpreter. 

2 Problem
CrashReport is invoked twice for a crash some times. My initial report found it 
happened in DLL but not main application. It turns out it is not caused by DLL. 
It really happens in those TCL commands created in my own project. As long as 
the crash occurs inside the TCL command, it sends report twice no matter the 
TCL command is defined in DLL or main.

3 Solution
After remove CR_INST_SIGSEGV_HANDLER flag from info.dwFlags, the application 
sends report once per crash. 

Original comment by Ouyang...@gmail.com on 28 Jun 2010 at 6:04

GoogleCodeExporter commented 9 years ago
Anyway, I think I can add some crash counter member variable to CCrashHandler 
class. If this counter >0, than the second crash report won't be sent.

An exception of this rule is manually generated crash reports 
(crGenerateErrorReport function). I think there shouldn't be crash counter for 
such reports.

Original comment by zexspect...@gmail.com on 29 Jun 2010 at 3:56

GoogleCodeExporter commented 9 years ago
Fixed in v.1.2.6

Original comment by zexspect...@gmail.com on 9 Jul 2010 at 5:05

GoogleCodeExporter commented 9 years ago
Thanks. The counter in v1.2.6 does work as expected. I don't need to tweak 
anything now with the updated version. 

Original comment by Ouyang...@gmail.com on 14 Jul 2010 at 2:24

GoogleCodeExporter commented 9 years ago
I saw duplicate crash emails when Issue 43 was triggered.

Original comment by kevin.m....@gmail.com on 26 Aug 2010 at 8:29