SendFailureMessage

delphi package - automated exception handling

SendFailureMessage

Postby garymccartney » Mon Feb 24, 2014 3:51 pm

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
madexcept.png
Picture of my madexcept config dialog
madexcept.png (79.36 KiB) Viewed 4835 times
garymccartney
 
Posts: 10
Joined: Mon Feb 24, 2014 3:37 pm

Re: SendFailureMessage

Postby madshi » Mon Feb 24, 2014 3:57 pm

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

Re: SendFailureMessage

Postby garymccartney » Mon Feb 24, 2014 4:04 pm

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?
garymccartney
 
Posts: 10
Joined: Mon Feb 24, 2014 3:37 pm

Re: SendFailureMessage

Postby madshi » Mon Feb 24, 2014 4:39 pm

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

Re: SendFailureMessage

Postby garymccartney » Mon Feb 24, 2014 6:01 pm

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.
garymccartney
 
Posts: 10
Joined: Mon Feb 24, 2014 3:37 pm

Re: SendFailureMessage

Postby madshi » Mon Feb 24, 2014 6:19 pm

Does it always fail for that user from within your app? Or only sometimes? Which madExcept version are you using?
madshi
Site Admin
 
Posts: 9338
Joined: Sun Mar 21, 2004 5:25 pm

Re: SendFailureMessage

Postby garymccartney » Mon Feb 24, 2014 6:40 pm

It always fails, I believe. Version is 3.0n.
garymccartney
 
Posts: 10
Joined: Mon Feb 24, 2014 3:37 pm

Re: SendFailureMessage

Postby madshi » Mon Feb 24, 2014 6:55 pm

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

Re: SendFailureMessage

Postby garymccartney » Wed Sep 03, 2014 4:41 pm

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
[...]
garymccartney
 
Posts: 10
Joined: Mon Feb 24, 2014 3:37 pm

Re: SendFailureMessage

Postby madshi » Thu Sep 04, 2014 9:39 am

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

Re: SendFailureMessage

Postby garymccartney » Thu Sep 04, 2014 2:18 pm

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

Postby garymccartney » Tue Sep 09, 2014 7:12 pm

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

Re: SendFailureMessage

Postby garymccartney » Thu Sep 11, 2014 4:02 pm

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

Postby garymccartney » Thu Sep 11, 2014 4:55 pm

I just found out the user was not entering data into the fields appropriately when running "madTestMailAPIs.exe".
garymccartney
 
Posts: 10
Joined: Mon Feb 24, 2014 3:37 pm

Re: SendFailureMessage

Postby madshi » Thu Sep 11, 2014 6:55 pm

"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.
madshi
Site Admin
 
Posts: 9338
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