SendBugReport in 4.0.13

delphi package - automated exception handling
FredS
Posts: 98
Joined: Mon May 11, 2015 9:42 pm

SendBugReport in 4.0.13

Post by FredS »

Hi Mathias,

The code below used to work before upgrading.
Its purpose was to send a Support Request Email without showing the madExcept Dialog.
Essentially SendBugReport no longer attaches the zip file and simply dumps the Bugreport as text into the email body.

Code: Select all

procedure TMainForm.MadExceptionHandlerException(const exceptIntf: IMEException; var Handled: Boolean);
const  AssistDatazip = 'AssistData.zip';
begin
  inherited;
  exceptIntf.BugReportSections.Add('Info.log', GetLogFileContent);
  exceptIntf.ScreenShotZip := AssistDatazip;
  exceptIntf.BugReportZip := AssistDatazip;

  {** If I exit here and click send in the madExcept dialog all works as before **}

  // Support Request
  if exceptIntf.ExceptObject is EMADSupportError then begin
    exceptIntf.CreateScreenShot := False;
    exceptIntf.ScreenShot := nil;
    exceptIntf.BugReportSendAs := 'Hardware_Stack.txt'; // Support call, use something friendly
    exceptIntf.SendBugReport(Handle);
    Handled := True;
  end;
end;
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Re: SendBugReport in 4.0.13

Post by madshi »

Hi Fred,

which exact version did you use before? Are you sure the only difference is upgrading to 4.0.13?
FredS
Posts: 98
Joined: Mon May 11, 2015 9:42 pm

Re: SendBugReport in 4.0.13

Post by FredS »

madshi wrote: which exact version did you use before? Are you sure the only difference is upgrading to 4.0.13?
Upgraded from 4.0.12.
I checked the MES file in SVN and no changes where made, and same goes for MadExceptionHandlerException.

A newer version of Thunderbird but as I said, by using Exit and letting the default system handle all Thunderbird email comes up as it should.
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Re: SendBugReport in 4.0.13

Post by madshi »

Ah, so you're using MAPI, right? I remember that I fixed a bug in 4.0.13 which had the "MAPI" and "mailto" checkboxes mixed up somehow. Can you please double check which checkboxes are active now in 4.0.13 in this project? Please make sure that at least MAPI is checked, optionally also mailto. Does that help?
FredS
Posts: 98
Joined: Mon May 11, 2015 9:42 pm

Re: SendBugReport in 4.0.13

Post by FredS »

madshi wrote:make sure that at least MAPI is checked, optionally also mailto. Does that help?
Both are checked.
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Re: SendBugReport in 4.0.13

Post by madshi »

Hmmmm... I've just tested that here with a brand new test project and it works here. Can you try that, too?
FredS
Posts: 98
Joined: Mon May 11, 2015 9:42 pm

Re: SendBugReport in 4.0.13

Post by FredS »

madshi wrote:Hmmmm... I've just tested that here with a brand new test project and it works here. Can you try that, too?
Same issue, it comes up with the bugreport inside the mail body instead of attached.
XE8 on Windows 10 Pro
FredS
Posts: 98
Joined: Mon May 11, 2015 9:42 pm

Re: SendBugReport in 4.0.13

Post by FredS »

FredS wrote: Same issue, it comes up with the bugreport inside the mail body instead of attached.
XE8 on Windows 10 Pro
But not if I run the NEW EXE, all works as expected when I run the EXE outside of the Delphi IDE.
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Re: SendBugReport in 4.0.13

Post by madshi »

So you're saying inside of the debugger it doesn't work, but outside it does? Does that apply to both your main project and the test project?
FredS
Posts: 98
Joined: Mon May 11, 2015 9:42 pm

Re: SendBugReport in 4.0.13

Post by FredS »

madshi wrote:So you're saying inside of the debugger it doesn't work, but outside it does? Does that apply to both your main project and the test project?
Yes, except the Main Project also does not work outside, by that I mean it still dumps the bugreport as text into the mail body.
FredS
Posts: 98
Joined: Mon May 11, 2015 9:42 pm

Re: SendBugReport in 4.0.13

Post by FredS »

FredS wrote:
madshi wrote:So you're saying inside of the debugger it doesn't work, but outside it does? Does that apply to both your main project and the test project?
Yes, except the Main Project also does not work outside, by that I mean it still dumps the bugreport as text into the mail body.
Its due to elevated Privileges, the Main Project has a Manifest elevating it to Admin so I need to Run XE8 as Admin.
When I RunAs the Test Project as Admin outside the Delphi IDE it also does not work as expected.
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Re: SendBugReport in 4.0.13

Post by madshi »

So it's not really related to 4.0.12 vs 4.0.13, after all? If there's a difference between elevation, it's probably not something I can do anything about. I'm just calling the official MAPI APIs, nothing special...
FredS
Posts: 98
Joined: Mon May 11, 2015 9:42 pm

Re: SendBugReport in 4.0.13

Post by FredS »

madshi wrote:So it's not really related to 4.0.12 vs 4.0.13, after all? If there's a difference between elevation, it's probably not something I can do anything about. I'm just calling the official MAPI APIs, nothing special...
Except that it all works with the same elevation and the same debugger if we use your standard dialog "Send Mail".
As a matter of fact the same button that submits this Support Request function can be used as a test button when Debug is on by holding down RCTRL:
if DfxGetShiftKeyState(skRCtrl) then raise Exception.Create('Testing madExcept');
So by running the same instance anywhere I can get it all to work just by holding down RCTRL.

I just tested that again to make sure it hadn't resolved itself, but my 64bit compile can still do both versions :(
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Re: SendBugReport in 4.0.13

Post by madshi »

Can you double check with 4.0.12, just to make sure if we're talking about a "new" problem, or whether this has nothing to do with 4.0.13 specifically?

Here's the download link of 4.0.12:

http://madshi.net/madCollection2.7.11.1.exe
FredS
Posts: 98
Joined: Mon May 11, 2015 9:42 pm

Re: SendBugReport in 4.0.13

Post by FredS »

madshi wrote:Can you double check with 4.0.12, just to make sure if we're talking about a "new" problem, or whether this has nothing to do with 4.0.13 specifically?

Here's the download link of 4.0.12:

http://madshi.net/madCollection2.7.11.1.exe
Was 4.0.12 the official version when I did the initial work:
viewtopic.php?f=4&t=28023&p=48575#p48575
Post Reply