yang123vc / crashrpt

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

version 1402 does not include files attached with "crAddFile2" #209

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. update to version 1402
2. attempt to include file with crAddFile2 (either at start or during callback)
3. view contents of report

What is the expected output? 
--> includes file

What do you see instead?
--> file not included

What version of CrashRpt are you using?
1402

What is your version of Visual Studio?
2010

What is your version of Windows operating system?
7 (with all patches & updates)

Please provide any additional information below.
works fine in 1401 and below

Original issue reported on code.google.com by anbaricf...@gmail.com on 3 Jun 2013 at 2:54

GoogleCodeExporter commented 9 years ago
note that this issue prevents me from updating to 1402 (i am stuck on 1401), 
i'd like to take advantage of CR_INST_AUTO_THREAD_HANDLERS but i can not.

also note, even in 1401 version and below, if you specify 
CR_AF_FILE_MUST_EXIST, then the file is not included.  

Let me know if you need more of my configuration info

Original comment by anbaricf...@gmail.com on 3 Jun 2013 at 3:14

GoogleCodeExporter commented 9 years ago
Hello, can you please attach your code that contains CR_INSTALL_INFO and 
crInstall() call. I need to understand what configuration parameters may cause 
this behavior.

Please also give me example of how you call crAddFile2() function.

Original comment by zexspect...@gmail.com on 14 Jun 2013 at 2:47

GoogleCodeExporter commented 9 years ago
setting kAddLogDuringCrash to 0 has no effect (still fails)
setting kAddedFileCanBeMissing to 0 causes versions prior to 1401 to fail as 
well

Original comment by anbaricf...@gmail.com on 14 Jun 2013 at 5:20

Attachments:

GoogleCodeExporter commented 9 years ago
I've looked at your code, and found nothing suspicious with crAddFile2() 
function call. It would be better to debug the code, but I couldn't compile it, 
because it contains unknown types like SuperString and so on.

I also checked WTLDemo sample, and it crAddFile2() works OK there. It has 
several crAddFile2() calls, with different flags, and all work as expected. So, 
to help me reproduce the problem, can you please compile CrashRpt in Release 
configuration, then look at demos\WTLDemo\WTLDemo.cpp and modify it in a way 
that would reproduce the bug? 

1.

Original comment by zexspect...@gmail.com on 15 Jun 2013 at 8:34

GoogleCodeExporter commented 9 years ago
sorry that took so long.  Okay so i go to open WTLDemo but there is only a 
.vcxproj, which will not open.  Apparently this is for "Visual Studio Express" 
and is incompatible with normal "Visual Studio" (what were they thinking?)

can you please create a .vcproj or a .sln file, that has all the project 
settings already set correctly, so that i can open WTLDemo and compile it and 
run?  thanks.

Original comment by anbaricf...@gmail.com on 16 Jul 2013 at 10:27

GoogleCodeExporter commented 9 years ago
You should open CrashRpt_vs2010.sln solution, it is fully compatible with VS 
2010. This solution contains WTLDemo project, so you will be able to compile it 
and run.

Original comment by zexspect...@gmail.com on 17 Jul 2013 at 12:14

GoogleCodeExporter commented 9 years ago
sorry, i have VS2008, and it can not open the solution :(

Original comment by anbaricf...@gmail.com on 17 Jul 2013 at 12:40

GoogleCodeExporter commented 9 years ago
But in the beginning you've written you have VS 2010... OK, if you are using 
CrashRpt, than you should already have CrashRpt solution for VS 2008. Can you 
open it then?

Original comment by zexspect...@gmail.com on 17 Jul 2013 at 12:48

GoogleCodeExporter commented 9 years ago
yeah, sorry, that was my bad.  for "work" we use 2010, but for this project 
("not work") i only have VS2008, i just reported the wrong one.

Sorry but i do not see any CR solution for 2008? i only see the 2010 one.  i've 
never compiled it, i just use the binaries

Original comment by anbaricf...@gmail.com on 17 Jul 2013 at 12:56

Attachments:

GoogleCodeExporter commented 9 years ago
Can you try to create a VS2008 solution file with CMake? Here are the 
instructions:
http://crashrpt.sourceforge.net/docs/html/compiling_crashrpt.html

Original comment by zexspect...@gmail.com on 17 Jul 2013 at 2:03

GoogleCodeExporter commented 9 years ago
oh, wow.  I had been using this for so many years i forgot i could build it 
(and debug it) myself!  Okay, now you inspired me!

so i found out that this function:
> Utility::IsFileSearchPattern()
returns TRUE if you pass it a LONG path name, ie: one prepended with "\\?\"
that was the problem the whole time.  All my paths are "long" since my app is 
unicode and long-path-name aware.

so there, now you know how to fix the bug.  

no longer critical for me, as i just removed the prefix and now it's working!

however, may i make a suggestion:

if the function CollectFilesBySearchTemplate() or CollectSingleFile() fails, 
then you should make a call like this:

> (void)crAddProperty("CollectSingleFile() failed", error_id_string);

at least that way the developer will be NOTIFIED what the problem is

Original comment by anbaricf...@gmail.com on 18 Jul 2013 at 12:13

GoogleCodeExporter commented 9 years ago

Original comment by zexspect...@gmail.com on 18 Jul 2013 at 5:42

GoogleCodeExporter commented 9 years ago
If a file cannot be found, it will write a "not found" error message to log 
file and save the log inside 
C:\Users\Username\AppData\Local\CrashRpt\UnsentCrashReports\AppName_AppVer\Logs 
folder.

A "error" attribute is also added in crashrpt.xml file (which presents in error 
report).

Original comment by zexspect...@gmail.com on 20 Jul 2013 at 1:50

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r1630.

Original comment by zexspect...@gmail.com on 20 Jul 2013 at 1:52