SendFailureMessage

delphi package - automated exception handling
Post Reply
garymccartney
Posts: 10
Joined: Mon Feb 24, 2014 3:37 pm

SendFailureMessage

Post by garymccartney »

I have been unable to determine why when the user tries to email a bug report from inside the MadExcept crash dialog, the SendFailureMsg is displayed. My app uses AutoSend normally. Many bug reports are sent fine. However many users in the same office and organization have bug reports not sent. I ask them to force the email from the crash dialog. Then SendFailureMsg is displayed to the user. What things could be missing from a Windows7 machine that would stop the bug report from being emailed?
Attachments
Picture of my madexcept config dialog
Picture of my madexcept config dialog
madexcept.png (79.03 KiB) Viewed 16532 times
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: SendFailureMessage

Post by madshi »

Does that SMTP server really accept email send requests without authentication? Sounds weird, in these times of heavy spam misuse. In any case, the typical problem would be either that the server rejects your email send request for some reason, or that there's some firewall blocking the communication.
garymccartney
Posts: 10
Joined: Mon Feb 24, 2014 3:37 pm

Re: SendFailureMessage

Post by garymccartney »

Do you have a better suggestion in terms of configuration? I have upwards of 12000 user in 200 different locations throughout the world. The PCs are loaded from a central image, so the installations should be similar. Users in the same location have different results. This particular configuration has been in use since 2005 and hasn't been modified. Short of packet sniffing is there anyway to find out what might be happening at a remote site?
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: SendFailureMessage

Post by madshi »

The first thing to check would be if the problem comes from a firewall or from the server rejecting the email request.

Does mailing always fail from the same PC? And always succeed from the same PC? In that case you could try running the "madTestMailAPIs.exe" tool from the madExcept\Tools folder to get a first impression of what might be going on. That tool was written ages ago, though, and might not be up-to-date, anymore, so the feedback you will get might not be as good as it could/should be. But maybe it will help finding out what's going on. If that tool fails, I guess a socket/packet sniffer would be an option.
garymccartney
Posts: 10
Joined: Mon Feb 24, 2014 3:37 pm

Re: SendFailureMessage

Post by garymccartney »

I had the user run "madTestMailAPIs.exe". They had no problem sending an email with the same parameters I have configured in my application with no problems. My smtp address, smtp client and no authentication, it came through with no errors. I don't know what happens when trying to email from within my app.
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: SendFailureMessage

Post by madshi »

Does it always fail for that user from within your app? Or only sometimes? Which madExcept version are you using?
garymccartney
Posts: 10
Joined: Mon Feb 24, 2014 3:37 pm

Re: SendFailureMessage

Post by garymccartney »

It always fails, I believe. Version is 3.0n.
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: SendFailureMessage

Post by madshi »

Could you try the following:

Compile a simple test project with your current madExcept 3 build, raise a test exception and check if sending fails the same way as with your main app. If so, you've proved that the problem got nothing to do with your main app. If that is the case, the next thing to try would be to install the non-commercial madExcept 4 version to double check if the problem still occurs with that, too. If the problem still occurs with madExcept 4, this is really something I should look into somehow. If the problem is specific to your main app, we'd have to try to figure out why it only occurs there. If the problem is fixed in madExcept 4 (which has the SMTP emailing code rewritten for SSL/TLS support) then I'd have to ask you kindly to upgrade, because I can't really support madExcept 3, anymore.
garymccartney
Posts: 10
Joined: Mon Feb 24, 2014 3:37 pm

Re: SendFailureMessage

Post by garymccartney »

Thank You for you help in the past.

I did two thing since my last post.
I renamed madTestMailAPIs to RunThisFirst.exe
I created a program that would throw an exception immediately name RunThisSecond.exe.

When they run RunThisFirst they get this information

date/time : 2014-09-03, 16:42:19, 856ms
computer name : MAN-LAURAE1
user name : man-laurae
registered owner : Expeditors International / Expeditors International
operating system : Windows 7 Service Pack 1 build 7601
system language : English
system up time : 5 days 23 hours
program up time : 18 milliseconds
processors : 4x Intel(R) Core(TM) i5-2500 CPU @ 3.30GHz
physical memory : 1513/3317 MB (free/total)
free disk space : (C:) 246.88 GB
display mode : 1280x1024, 32 bit
process id : $e7c
allocated memory : 31.39 MB
executable : RunThisFirst.exe
exec. date/time : 2013-08-05 22:23
compiled with : Delphi 4
madExcept version : 3.0n
callstack crc : $817fc1e0, $a648302f, $a648302f
exception number : 1
exception message : The application seems to be frozen.
main thread ($1ab8):
00401d2d +061 RunThisFirst.exe System FillerSizeBeforeGap
00447ad3 +083 RunThisFirst.exe madExcept CreateBugReport
00491420 +034 RunThisFirst.exe mailtest 1000 +1 TFMailForm.FormCreate
004843d1 +031 RunThisFirst.exe Forms TCustomForm.DoCreate
00484115 +009 RunThisFirst.exe Forms TCustomForm.AfterConstruction
004030cf +003 RunThisFirst.exe System @AfterConstruction
004840f5 +171 RunThisFirst.exe Forms TCustomForm.Create
0048ae3d +031 RunThisFirst.exe Forms TApplication.CreateForm
00491c4f +02f RunThisFirst.exe madTestMailAPIs 15 +2 initialization
76b6ee1a +010 kernel32.dll BaseThreadInitThunk
disassembling:
[...]
00491416 lea eax, [ebp-4]
00491419 push eax
0049141a xor ecx, ecx
0049141c xor edx, edx
0049141e mov al, 1
00491420 > call -$499d5 ($447a50) ; madExcept.CreateBugReport
00491425 mov edx, [ebp-4]
00491428 mov eax, [ebx+$2c4]
0049142e call -$2230b ($46f128) ; Controls.TControl.SetText
00491433 xor eax, eax
00491435 pop edx
[...]
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: SendFailureMessage

Post by madshi »

Hmmm... That looks weird. Looks like the exe doesn't even initialize correctly, due to some problem during the creation of the main form. Anyway, using madTestMailAPIs wasn't really what I suggested. It would be better to simply create an empty new test project with a button which when pressed raises a test exception. See my previous comment for more details. Thanks!
garymccartney
Posts: 10
Joined: Mon Feb 24, 2014 3:37 pm

Re: SendFailureMessage

Post by garymccartney »

I did write a little program with a button that throws an exception.
But if the madTestMailAPIs doesn't run I don't see how the test program will send out an email message.
garymccartney
Posts: 10
Joined: Mon Feb 24, 2014 3:37 pm

Re: SendFailureMessage

Post by garymccartney »

Any suggestions on why madTestMailAPIs doesn't run? :?
garymccartney
Posts: 10
Joined: Mon Feb 24, 2014 3:37 pm

Re: SendFailureMessage

Post by garymccartney »

the program I wrote that caused an immediate exception has been run. No bug report was sent out. The same user received a frozen application when they ran "madTestMailAPIs.exe".
garymccartney
Posts: 10
Joined: Mon Feb 24, 2014 3:37 pm

Re: SendFailureMessage

Post by garymccartney »

I just found out the user was not entering data into the fields appropriately when running "madTestMailAPIs.exe".
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: SendFailureMessage

Post by madshi »

"The procem you wrote that caused an immediate exception" was a simple new test project, right? Since that didn't work, either, the problem must either be in madExcept, or it could be a firewall blocking the SMTP sending. Could you try the same test project with madExcept 4 (non-commercial edition should do fine)? The SMTP code was totally rewritten in v4, so there's a chance it works better.

An alternative solution would be to use HTTP uploading instead of SMTP. That's usually the most reliable method, but it's also the most difficult to setup, because you'd have to upload a custom PHP script to your own server to make it work.
Post Reply