SetBugReportFileSize

delphi package - automated exception handling
Post Reply
bwdirks
Posts: 19
Joined: Wed Feb 04, 2015 7:07 pm

SetBugReportFileSize

Post by bwdirks »

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.
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: SetBugReportFileSize

Post by madshi »

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?
bwdirks
Posts: 19
Joined: Wed Feb 04, 2015 7:07 pm

Re: SetBugReportFileSize

Post by bwdirks »

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
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: SetBugReportFileSize

Post by madshi »

I assume the same problem also occurs with a brand new (almost) empty test project? Or is it specific to your "big" project?
bwdirks
Posts: 19
Joined: Wed Feb 04, 2015 7:07 pm

Re: SetBugReportFileSize

Post by bwdirks »

Yes, I just tested it with a bare minimum test app and the email attachment is 50k and the actual error file is 185K.
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: SetBugReportFileSize

Post by madshi »

Ok, I'll see if I can reproduce it here. Might not get to this until early next week, though.
bwdirks
Posts: 19
Joined: Wed Feb 04, 2015 7:07 pm

Re: SetBugReportFileSize

Post by bwdirks »

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

Re: SetBugReportFileSize

Post by bwdirks »

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

Post by bwdirks »

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

Post by bwdirks »

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.55 KiB) Viewed 9281 times
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: SetBugReportFileSize

Post by madshi »

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.
bwdirks
Posts: 19
Joined: Wed Feb 04, 2015 7:07 pm

Re: SetBugReportFileSize

Post by bwdirks »

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.
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: SetBugReportFileSize

Post by madshi »

Glad to hear that!
Post Reply