yang123vc / crashrpt

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

Hang using same pattern and difference base directories #205

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Call crAddFile2("c:\dir1\*.txt" ...);
2. Call crAddFile2("c:\dir2\*.txt" ...);
3. crGenerateErrorReport

What is the expected output? What do you see instead?
I expect all matching files from both directories to be added to the generated 
report, but I see my application hang, no crash report is generated.

What version of CrashRpt are you using?
1.4.2

What is your version of Visual Studio?
2008

What is your version of Windows operating system?
Windows 7 SP1

Please provide any additional information below.

Original issue reported on code.google.com by glove...@gmail.com on 9 May 2013 at 11:27

GoogleCodeExporter commented 9 years ago
I think the problem is that crashrpt uses the destination file as a unique id, 
if the file name has a pattern that pattern is used as the destination.
I suggest allowing the destination file param to crAddFile2 to be used with the 
pattern. If null the dest becomes be the parent directory where the pattern is 
from + the pattern, otherwise use the param + the pattern, erroring out if not 
unique.
CrashSender would then parse the destination directory and pull out the 
pattern, create a directory under the crash report and add all the matching 
files there. 

Also skipping ., .. and any sub directories if the pattern is "*.*" .

Original comment by glove...@gmail.com on 13 May 2013 at 8:34

GoogleCodeExporter commented 9 years ago

Original comment by zexspect...@gmail.com on 12 Jul 2013 at 2:06

GoogleCodeExporter commented 9 years ago
I've also experienced the hang.

It is caused by CrashSender 'aborting' when it encounters errors and then 
failing to release it's locking mechanisms.  For me the caller of CrashSender 
usually hangs at WaitForSingleObject:

  File:          CrashHandler.cpp
  Function:      LaunchCrashSender()
  Line (~1683):  WaitForSingleObject(m_hEvent, INFINITE)

-David

Original comment by mrdavidf...@gmail.com on 2 Oct 2013 at 3:38

GoogleCodeExporter commented 9 years ago
Hello,

I too have now just encountered the 'same pattern but different base directory' 
issue.  I effectively plan to use *.* pattern across a handful of directories 
(runtime logs, install logs, preference settings, etc).

My previous comments from Oct 1 on this issue was just to support that 
CrashSender can cause the app calling crGenerateErrorReport to hang on error.  
This time I am adding support to the count of people who would like to re-use 
there search pattern across different directories.

-David

Original comment by mrdavidf...@gmail.com on 16 Oct 2013 at 6:50