Hang when calling FindControl

T

tetechteam

I have a Word add-in that was working fine except on a particular computer
running under a particular user's profile. This call hangs on start-up; it
takes about 2 minutes to return:

Office::CommandBarPopupPtr spPopupMenu =
m_spApplication->GetCommandBars()->FindControl(vtMissing,vtMissing,cMyPopupTag,vtMissing);

What's weird is that this just started happening and if I log onto the
machine under a different user's profile, everything works fine. This leads
me to believe that something about the user's profile w/r/t/ Word has been
corrupted. But what?

This is a C++ add-in running in Office 2003.

Any insight or workaround would be appreciated,

Thanks!

Mike
 
P

Peter Huang

Hi

It seems that there is something corrupted with the user's personal data
with the office program on that machine.
I think you may to delete the user profile and account(please backup first)
and then let the user logon the server as a new user, so that windows will
reproduce the user profile. You may have a try and let me know the result.


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
T

tetechteam

Peter,

Thanks for the reply. Before wiping out the entire profile, I'd like to see
if we can narrow down what part of the profile is corrupted. I would think
that given that this happens specifically on a Word call to FindControl, and
it only hangs when logging onto a particular profile on the computer, it
should be knowable what personal data is bad.

This is currently happening in our development environment. So, we could do
what you suggest, but there is no way we could ask our customers to do the
same, so we rather try to nail down what went wrong, here. Any insight would
be appreciated.

Thanks,

Mike
 
P

Peter Huang

Hi

Since the problem seems that problem is very individual, it is hard to
guess what is the root cause.

If the hang occurred in the process of OnConnection of the addin, we may
try to debugging the addin by putting a breakpoint in the onconnection
function in the addin code. And then attach to the winword.exe, once we
enable the addin the breakpoint should be hit and we can try to see which
code line cause the problem.

Or if the hang occurred before the addin's onconnection is called, I think
you have to contact MSPSS, because office's symbol is not public, and the
hang seems to be in the module of winword.exe loading the addin whose
source code and symbol file is not public.

This is the common troubleshooting process you may have a try.

Hope this helps.



Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
P

Peter Huang

Hi

Since the problem seems that problem is very individual, it is hard to
guess what is the root cause.

From your descritption, the hang occurred when we call the FindControl
method, the word application ran under certain user account will hang. i.e.
The FindControl method will take a long time to return. Since office symbol
is not public, we can not debug into the FindControl method to see what had
happened.

If you do need to know the root cause, I suggest you call MSPSS which will
do hang dump analysis or live debugging for you.
You may reach MSPSS via the link below.
http://support.microsoft.com

Thanks.


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?dGV0ZWNodGVhbQ==?=,
Before wiping out the entire profile, I'd like to see
if we can narrow down what part of the profile is corrupted.
The two "usual suspects" for Word which come to mind are
- the Normal.dot template
- the Word DATA key in the Registry

Try renaming Normal.dot to NormalOLD.dot and see if that
changes anything.

Try backing up the DATA key, deleting and see if anything
changes.

In both cases, Word will generate a new "clean" copy with the
installation defaults.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8
2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :)
 

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