Bug 5265

maillogoff hangs in runtime 21 September, 2020

René Ullrich
16 September, 2020
Product: PowerBuilder Category: PowerBuilder Runtime
Version: 2019 R2 Build: 2353
Classification: Sybase (legacy) bug Publishing: Public
Priority: P3
Status: Reproducing Reason:
Ken Guo @Appeon 21 September, 2020
#13
Hi René,

Thanks for reporting this problem! We reproduced it on our end and will do further research to figure it out. We will keep you posted about the progress.



Regards,
Ken
René Ullrich 21 September, 2020
#12
Hi Ken,
Sorry, but I can't provide you a VM.

I've found a similar problem description in community:
https://community.appeon.com/index.php/qna/q-a/mail-hangs-program?limitstart=0#reply-19337

So I changed my application to not use MailLogOff function.
My application now works without hangs or crashes with Extended MAPI and with simple MAPI. 

Both versions have its limitations:
With Extended MAPI the mail is sended but still exists in "Outbox".
With Simple MAPI Outlook asks to allow to access it.

Do you have any hints to avoid this?
Ken Guo @Appeon 18 September, 2020
#11
Hi René,

Due to that we still can’t replicate this issue on our end, could you please provide a VM with Teamviewer installed so that our developers could remote access and debug the issue?


Regards,
Ken
René Ullrich 18 September, 2020
#10
Tested again with simple MAPI:
After application start the first mail works.
On second call application crashes at mailLogon().
After restart of application: First mail works agains and second crashes.
So simple MAPI is not a useable workaround!

Crash info:
Name der fehlerhaften Anwendung: kredit.exe, Version: 20.0.0.0, Zeitstempel: 0x5f1452da
Name des fehlerhaften Moduls: KERNELBASE.dll, Version: 10.0.17763.1432, Zeitstempel: 0x347862bd
Ausnahmecode: 0xc000041d
Fehleroffset: 0x001225f2
René Ullrich 18 September, 2020
#9
Hi Ken,
we have tested it also on another machine (without installed IDE) and it doesn't work.
Same problem with Run as administrator.
Regards, 
René
Ken Guo @Appeon 18 September, 2020
#8
Hi René,

We can’t find any relationship between this issue and the one Chris mentioned in comment 1.
Does the issue exist if you launch the application via Run as administrator?
Does it work well if you use another machine to launch your application?

Currently, it is recommended that you use the simple MAPI method to work it around first.

Regards,
Ken
René Ullrich 18 September, 2020
#7
Hi Ken,

1. Office 2016: 32-bit
2. EXE application: 32-bit
3. I tested EXE on the machine with IDE installed and with no PB IDE installed. There is no difference.
4. NA
5. I copied pb.ini to the directory where the EXE resides: same problem
6. I can't change Account Settings on my machine because of rules in our company.

My tests shows, that it always runs from IDE. From EXE it worked well only one time. On second call it hangs. After that it even hangs if I restart application. Also restart of Outlook doesn't solve the problem.
So now I think it could be the same problem as Chris mentioned in comment #1?


Regards,
René
Ken Guo @Appeon 18 September, 2020
#6
Hi René,

I used the source code you provided to test locally but can’t reproduce the issue. Can you tell me:
1. Is your Office 2016 32-bit or 64-bit?
2. Is your EXE application 32-bit or 64-bit?
3. Did you test the EXE on the machine with IDE installed or with no PB IDE installed? 
4. If your machine has no PB IDE installed, please make sure the correct PB Runtime files have been installed in it. I suggest you install PB Runtime Package.
5. It is suggested you copy pb.ini to the directory where the EXE resides and then launched the EXE.
6. If your MS Outlook is using Exchange, I suggest you set ‘Use Cached Exchange Mode’ in Outlook -> Account Settings and then try again.


Regards,
Ken
Chris Pollach @Appeon 17 September, 2020
#5
Hi René;

  Thank for confirming the consistent "hang" aspect. I cannot see any other tickets (either open or closed) that also seem to have this issue. Nor can I recall such a consistent "hang" problem.

  I will now transfer this ticket over to the main Support Team to see if they have encountered this issue before or other suggestions for you to try to workaround this issue.

  FWIW: Workarounds or alternatives that you might consider ... use SMTP or using a 3rd party product like "redemption" to converse with Outlook instead of MAPI.

Regards .. Chris
René Ullrich 17 September, 2020
#4
Hi Chris,
the App always hangs.
Regards .. René
Chris Pollach @Appeon 16 September, 2020
#3
Hi René;

  Thank for confirming that aspect.

  Do the PB App(s) always hang or is this a random intermittent problem?

Regards .. Chris
René Ullrich 16 September, 2020
#2
Hi Chris,
hmm, seems not to be the same problem.
We our application hangs on first use of MailLogon/MailLogOff after the application starts.
Chris Pollach @Appeon 16 September, 2020
#1
Hi René;

  We have had reported issues with newer MS-Office releases that PB Apps can get the MailLogon() / MailLogoff() issues if the PB App does this sequence of commands repetitively. Changing the PB App to only Logon/Logoff *once* per processing cycle (Start-up / Shutdown)  fixed the problem.

Regards .. Chris
René Ullrich 16 September, 2020
*Phenomenon:
We have same problem es described in issue #3639
Our application hangs in runtime when calling MailLogoff.

Same functionality runs perfectly from IDE but not from build EXE.
We have no problems with PB 2017.
The problem only occures with extended MAPI but not with simple MAPI.

We use Outlook 2016 as client and Microsoft Exchange as server.


*Reproduce Steps:

lms_Ses = CREATE mailsession
lmm_Msg.Recipient[1].Name = ls_name
lmm_Msg.Subject = ls_subject
lmm_Msg.NoteText = ls_text			
lmRet = lms_Ses.mailLogon ()
lmRet = lms_Ses.mailSend (lmm_Msg)
lms_Ses.mailLogoff ()
destroy lms_Ses

Remarks:
Workaround is SimpleMapi
OS:
Windows 10
Platform:
Database Type:
Database Version: