Page 1 of 1

SetBugReportFileSize

PostPosted: Fri Oct 11, 2019 1:30 pm
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.

Re: SetBugReportFileSize

PostPosted: Fri Oct 11, 2019 1:32 pm
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?

Re: SetBugReportFileSize

PostPosted: Fri Oct 11, 2019 1:55 pm
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

Re: SetBugReportFileSize

PostPosted: Fri Oct 11, 2019 1:57 pm
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?

Re: SetBugReportFileSize

PostPosted: Fri Oct 11, 2019 2:10 pm
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.

Re: SetBugReportFileSize

PostPosted: Fri Oct 11, 2019 2:15 pm
by madshi
Ok, I'll see if I can reproduce it here. Might not get to this until early next week, though.

Re: SetBugReportFileSize

PostPosted: Fri Oct 11, 2019 2:20 pm
by bwdirks
OK, thanks very much.

Re: SetBugReportFileSize

PostPosted: Tue Oct 15, 2019 3:36 pm
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?

Re: SetBugReportFileSize

PostPosted: Tue Oct 15, 2019 6:13 pm
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.

Re: SetBugReportFileSize

PostPosted: Tue Oct 15, 2019 6:37 pm
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?

Re: SetBugReportFileSize

PostPosted: Thu Oct 17, 2019 9:28 am
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.

Re: SetBugReportFileSize

PostPosted: Thu Oct 17, 2019 4:49 pm
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.

Re: SetBugReportFileSize

PostPosted: Fri Oct 18, 2019 8:59 am
by madshi
Glad to hear that!