Blown stack in Outlook UI thread?

M

MikeJohnson

Hi Add-In gurus,

My C++-based COM Add-in runs through all the Outlook folders,
accessing all the messages and attachments.

It has no UI components.

I am seeing an intermittent C0000005 crash in the Outlook UI thread.
It looks like it is trying to dereference a null pointer.
Interestingly, the stack for this thread is completely toast...

My initial implementation used a worker thread, which periodically
sent messages to a hidden dialog, which serviced the requests
and accessed the Outlook Object Model on the Outlook UI thread.

After getting the crash, I switched to a single-threaded DLL,
and used Windows timers to periodically send the hidden dialog
a message to do its work.

No go, I'm still getting the intermittent crash!

I don't think the problem relates to holding object references-
when the DLL is able to finish its work Outlook unloads
fine, and the OnBeginShutdown and OnDisconnection handlers get hit.
It looks like the COM smart pointers I'm using are being released.

The platform is Outlook 2003 on Windows XP.

Any thoughts?
Could it be a bug in Outlook?
If not what the heck am I doing that could cause an empty call stack?
Thanks again,
Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top