SetBugReportFileSize

delphi package - automated exception handling

SetBugReportFileSize

Postby bwdirks » Fri Oct 11, 2019 1:30 pm

I'm using madExcept 5.0 and when I test the error handling of my application and click Send Bug Report, the email attachment is always 50K in size but the actual error log file is 3-5 times that size. I tried calling SetBugReportFileSize(5000000) but it makes no difference in the size of the email attachment. In previous versions this did not happen. What do I need to do to attach the full error log file?
I suppose that this could be some setting on my company's email settings. I just need to find out if it's something in madExcept.
Last edited by bwdirks on Fri Oct 11, 2019 1:38 pm, edited 1 time in total.
bwdirks
 
Posts: 19
Joined: Wed Feb 04, 2015 7:07 pm

Re: SetBugReportFileSize

Postby madshi » Fri Oct 11, 2019 1:32 pm

Couple of questions:

1) Which email sending method do you use?
2) Can you reproduce this on your own dev PC?
3) What kind of attachment are you using? The bug report file unzipped as a separate text file? Or contained in a zip or something?
4) Is it just the report for one crash which is larger than 50k, or is it multiple bug reports appended in one file?
madshi
Site Admin
 
Posts: 10098
Joined: Sun Mar 21, 2004 5:25 pm

Re: SetBugReportFileSize

Postby bwdirks » Fri Oct 11, 2019 1:55 pm

First, thanks for responding so quickly.

1) Which email sending method do you use? local email client
2) Can you reproduce this on your own dev PC? It's been reproduced on every machine it's been run on so far.
3) What kind of attachment are you using? The bug report file unzipped as a separate text file? Or contained in a zip or something? unzipped, but parts are encrypted with my own encryption algorithm
4) Is it just the report for one crash which is larger than 50k, or is it multiple bug reports appended in one file? every error that causes the madExcept error handler to be displayed
bwdirks
 
Posts: 19
Joined: Wed Feb 04, 2015 7:07 pm

Re: SetBugReportFileSize

Postby madshi » Fri Oct 11, 2019 1:57 pm

I assume the same problem also occurs with a brand new (almost) empty test project? Or is it specific to your "big" project?
madshi
Site Admin
 
Posts: 10098
Joined: Sun Mar 21, 2004 5:25 pm

Re: SetBugReportFileSize

Postby bwdirks » Fri Oct 11, 2019 2:10 pm

Yes, I just tested it with a bare minimum test app and the email attachment is 50k and the actual error file is 185K.
bwdirks
 
Posts: 19
Joined: Wed Feb 04, 2015 7:07 pm

Re: SetBugReportFileSize

Postby madshi » Fri Oct 11, 2019 2:15 pm

Ok, I'll see if I can reproduce it here. Might not get to this until early next week, though.
madshi
Site Admin
 
Posts: 10098
Joined: Sun Mar 21, 2004 5:25 pm

Re: SetBugReportFileSize

Postby bwdirks » Fri Oct 11, 2019 2:20 pm

OK, thanks very much.
bwdirks
 
Posts: 19
Joined: Wed Feb 04, 2015 7:07 pm

Re: SetBugReportFileSize

Postby bwdirks » Tue Oct 15, 2019 3:36 pm

While we're waiting for a resolution to this issue, my boss has directed me to install an older version of madExcept. I have 4.0.21 and the madshi.key file that goes with it but it won't install into Delphi v10.3 Update 2. Is there anything else I can do to get a 4.x version installed?
bwdirks
 
Posts: 19
Joined: Wed Feb 04, 2015 7:07 pm

Re: SetBugReportFileSize

Postby bwdirks » Tue Oct 15, 2019 6:13 pm

So I managed to get Delphi 10.2.3 running with madExcept 4.0.21 and I'm seeing the same problem with the email attachment getting truncated. I ran a 2-year old version of my application and it works correctly, no truncation. I can't tell what version of madExcept was compiled into that executable though.
bwdirks
 
Posts: 19
Joined: Wed Feb 04, 2015 7:07 pm

Re: SetBugReportFileSize

Postby bwdirks » Tue Oct 15, 2019 6:37 pm

I've tried 3 different madExcept versions now in Delphi 10.2.3 & Delphi 10.3 Update 2 and I'm getting the same result every time. So it has to be something in my code. Why this used to work and now it doesn't (no code changes) is beyond me. Here's what I've found though. When I click on the "send bug report" button and click through the dialogues to get to the point where madExcept creates an email in Outlook I'm seeing 3 different instances of the error log file. See attachment.

The one I want to use is the one in C:\DEV\TEST that is 97KB in size. How and when in the madExcept error handling process do I put the correct error log file into the correct folder so it will be attached to the email?

Here's how I'm registering my error handler to do the encryption:
initialization
RegisterExceptionHandler(EncryptErrorLog,stDontSync);

Should I be using a different ordinal for the TSyncType parameter?
Attachments
METest.png
METest.png (13.61 KiB) Viewed 586 times
bwdirks
 
Posts: 19
Joined: Wed Feb 04, 2015 7:07 pm

Re: SetBugReportFileSize

Postby madshi » Thu Oct 17, 2019 9:28 am

Sorry for the late reply.

What does your handler do exactly? And why is the file in 3 different folders? That seems quite weird to me.
madshi
Site Admin
 
Posts: 10098
Joined: Sun Mar 21, 2004 5:25 pm

Re: SetBugReportFileSize

Postby bwdirks » Thu Oct 17, 2019 4:49 pm

I don't wanna waste any more of your time; I spoke with a colleague who was doing something similar and modified my code accordingly and now everything's working correctly.
bwdirks
 
Posts: 19
Joined: Wed Feb 04, 2015 7:07 pm

Re: SetBugReportFileSize

Postby madshi » Fri Oct 18, 2019 8:59 am

Glad to hear that!
madshi
Site Admin
 
Posts: 10098
Joined: Sun Mar 21, 2004 5:25 pm


Return to madExcept

Who is online

Users browsing this forum: No registered users and 6 guests

cron