Question on add-in interception with Outlook functionality

  • Thread starter Thread starter paresh
  • Start date Start date
P

paresh

Hi,

I have written an add-in and it works absolutely fine as expected. After we
have installed this add-in, it seems there have been some issue while writing
an email. The Outlook is getting hung and keep using 50% CPU cycle. We have
to kill it from task manager and restart the Outlook each time after this
happen.

My question is now following:
I know that my add-in has nothing to do with write email (autosave event -
which is the only event happens during writing email). My add-in comes gets
triggered only when user clicks toolbar button. Now the question is, Is there
any thing that might add-in left and that leads to some kind of memory leak
or whatever and that in turn leads to this issue? User claimed that the issue
happens while writing an email and after 5-10 minutes he clicked my add-in
button.

Other noticeable thing is since Outlook 50% busy means it is doing
something. My add-in logs everything it does into event viewer but during
this time I don't see any message from my add-in.

Thanks,
Paresh
 
What version or versions of Outlook does this happen on? Is it all versions?

Does it happen with both PST files and Exchange mailboxes?

Does this happen with all customers or only some?

Please provide all the relevant details if you expect someone to be able to
help.
 
Sorry Ken. You are correct I wasn't much clear.

Well, we are using Outlook 2007 with Exchange server 2007.

The main issue is it doesn't happen with all. The issue happens with very
few customers(~5%) but it is making my add-ins impression down as it hold off
the production release because of this issue. When issue happens, you cannot
do anything. You have to kill outlook from task manager and whatever you have
written, there are good chances that you will lost portion of it.

I have also enable the Outlook logging through
Outlook->Tools->Options>Other->Advanced Options->Enable logging
(troubleshooting) but log file location: "C:\documents and
Settings\<userid>\Local Settings\Temp\ doesn't contain any useful information.

User has also confirmed that it happens eventhough he doesn;t have PST files.

I am really worried that what Outlook is doing with 50% CPU? Not sure how to
debug this issue.

Could you help me out please.

Thanks,
Paresh
 
That sounds like a problem that can happen if you are handling ItemAdd() on
the Inbox or one of the delivery events (NewMail() or NewMailEx()). Is that
the case?

If so, there's not much you can do. MS is aware of problems that affect
between 5% and 10% of Outlook 2007 installations due to that but has no fix
that I know of at this time.

I don't know if this is any comfort to you, but I see the same thing with my
Reminder Manager addin, with problems for a small subset of users. In my
case telling the users not to display the reminders window when writing in
an email or at least disabling the window's autorefresh function almost
always is a good workaround.

Does your addin have any UI that it displays?
 
Thanks Ken for information.

My add-in doesn;t handle events that happens frequently. The only Outlook
event that handle by add-in is ItemContextMenuDisplay and rest of
functionality gets trigger only when user clicks the toolbar button.

Yes, my add-in has lot of UI. I have 5 buttons correspond to 5 forms. When
user click button the form gets displayed and user selects the username from
listbox of form and get click the form button to get the user's detailed
information.

My worry is, Outlook doesn't gets crashed immediately when any of add-in
button clicked or ItemContextMenuDisplay event happen. It is crashing 8-10
minutes after user used my add-in functionality.

I have verified that the time of crashing Outlook, my add-in doesn't do
anything or it didn't get invoke.

It is being hard to debug the issue now.

Thanks,
Paresh
 
You might have to open a support case with MS on this problem. They have
access to the Outlook and Office symbols that might be needed to figure out
where and why Outlook is crashing. It's almost impossible for anyone else to
do that because we don't have access to the symbols to interpret crash
dumps.

Things I'd look for would be:

1. Any other addins running, disable them and see if the problem goes away.
2. Make sure no object model accesses are occurring on any background
threads.
3. Make sure there are no memory or stack leaks and that all of your objects
are being released.
 
Thanks Ken. I think you were correct. The other add-in was causing the issue.
Some users have been facing Outlook crashing issue with below entry in
eventviewer:

Faulting application outlook.exe, version 12.0.6423.1000, stamp 49b08185,
faulting module outlook.exe, version 12.0.6423.1000, stamp 49b08185, debug?
0, fault address 0x001f0261.

After my add-in installation, they also started facing Outlook freezing
issue(50% CPU). I have researched a lot on this and came to know that my
add-in and other add-in, both are using ItemContextMenuDisplay event. Do you
think this can lead 50% CPU in any way?

When I disabled other add-in for 2 most affected users, above both the
issues gone away but still I need to research on is there anyway that
ItemContextMenuDisplay event leads both add-in into loop and can cause 50%
CPU usage.

When the Outlook 50% usage issue happened, I also verified that Outlook
wasn't contacting any exchange server using WireShark networks packet
monitoring tool and so issue nailed down to local PC.

The only Outstanding question is:

Is there anyway that ItemContextMenuDisplay event leads both add-in into
loop and can cause 50% CPU usage?

Thanks,
Paresh
 
Offhand I don't see why 2 addins subscribing to ItemContextMenuDisplay would
cause a hang, but I'll see if the problem is known on the Outlook team.

Can you say what other addin is causing the problem?
 
Please provide information on the crash buckets in the event logs if there
are any. To get them you have to OK the sending of a crash to MS.

Also, please provide descriptions of what both addins are using the context
event for.

The CommandBar object passed in that event is only good for that event
lifetime. You aren't persisting it or trying to use it elsewhere, or keeping
references to it?
 
Thanks again Ken. I am not sure of another add-ins functionality but few
people has confirmed that the freezing issue go away when they disable it. My
add-in doesn't do anything with Commandbar object it just adds couple of
buttons and click event.

Ken, can you tell me if there are some memory or stack leak then why CPU
takes 50%?I think either of leaks should not cause this. There must be some
operational activity(arithmetic or whatsoever) progressing that makes CPU 50%
all the time. Do you think I am correct?

Thanks,
PAresh
 
Ken, other weird thing started happening with me. I have one particular
email(internal communication between my team so nothing new). Whenever I open
that email, my Outlook start taking 50% CPU constantly and I have to kill it
from task manager. While researching I sent that email to other 4-5 people to
check and the same thing happens for all. We started calling that email evil.
:)

Could you tell me what could be wrong with that email? Did you come across
such thing?

Thanks.
 
There's probably something corrupted in that email but I have no idea what.

If you are really interested you can compare it to other emails and examine
it using a MAPI viewer to see the properties on the item and see if you can
figure out what's wrong with it.
 
I don't know what is causing the CPU load or the crashes. That's why I asked
you those questions.

I contacted the owner of Outlook programmability on the Outlook team at MS
and he asked me to get those answers so he can look into this being a know
problem or something else he can research.

If you aren't interested in getting answers that's fine, I'll let him know
that. If you are then please answer the questions I asked.
 
I got it. It has to something to do with Wwlib.dll that handles HTML
rendering for Outlook and Word is having difficulty in parsing certain
messages(has lot of special symbols) and ends up looping indefinitely. We
have logged case with M$ and they are going to provide hotfix for this.

Thanks.
 
Back
Top