[help] Word uses 100% CPU sometimes

Add-in Express™ Support Service
That's what is more important than anything else

[help] Word uses 100% CPU sometimes
 
Sven Heitmann




Posts: 193
Joined: 2004-08-23
Hi,

I have a problem:
Sometimes when I open a Document my Word is freezing and eats up to 99% of the CPU... about 1 Minute later Word is running as usual...

That is only when my ComAddin is activated... maybe it is the GarbageCollector who is performing his cleanup?

Have you ever noticed something like that?
Any suggestion?
Best regards,

Sven Heitmann
Posted 06 Oct, 2004 07:56:54 Top
Eugene Starostin


Guest


Hello Sven,

Now we are preparing to upload the next build and there seem to be no free person. Must we study the problem immediately? Please give us some time to finish our today's work :-)
Posted 06 Oct, 2004 08:54:41 Top
Sven Heitmann




Posts: 193
Joined: 2004-08-23
No Problem...

However it would be fine if you could inspect this until Friday 18 o'clock GMT +1 as we will publish the Addin atthe weekend to aur customers...

It's an in-house solution... so updates are no problem... but we have about 80 computers... well... you know what I mean ;)

that's why I asked for an automatic update prozedure ...
Best regards,

Sven Heitmann
Posted 06 Oct, 2004 09:19:20 Top
Eugene Starostin


Guest


OK, we will work on the problem ASAP.
Posted 06 Oct, 2004 09:33:42 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Sven,

Did you try to find in degug mode the place in your code where Word freezes?
Posted 07 Oct, 2004 06:18:14 Top
Sven Heitmann




Posts: 193
Joined: 2004-08-23
No... It is not in Debug mode... a usual compiled assembly registerd by the studio or installed with the setup project...

Word is so slow... that is amazing...
This happens when I open a Documenet or switch between some Documents...

Word is not crashing it's using 99% of the CPU so its frozen for that time.

Is this because I've been attached to the WordEvents?
Best regards,

Sven Heitmann
Posted 07 Oct, 2004 07:19:11 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
In this case you can try to add message boxes to find out when exactly Word is eating up 90% CPU resources.
Posted 07 Oct, 2004 07:53:20 Top
Sven Heitmann




Posts: 193
Joined: 2004-08-23
It seems that happens only if I add my Controls to the Word builtin Commandbar.

I try to find out something more...

Do you know what happens inside Word when I switch from one Document to another?
Does Word call some methodes from the Addin?

Is it possible to trace what Word is doing behind the szene?
Best regards,

Sven Heitmann
Posted 07 Oct, 2004 08:05:55 Top
Sven Heitmann




Posts: 193
Joined: 2004-08-23
It seems I have found it...

ADX is handling this event

void AddinExpress.MSO.IWordApplicationEvents2.WindowActivate(object doc, object wn)

and it seems whatever you do inside is causing my problem :-/

I've add an Debugoutput at the start and at the end of the Method and it hangs right behind the start message has been written...

Well I have 9 Commandbars... with about 50 Controls...
Best regards,

Sven Heitmann
Posted 07 Oct, 2004 09:11:33 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
It could be the cause of Word working slowly. But to make sure you can add a breakpoint to WindowActivate event in ADX. In any case I will try to optimize the code of this event in the next ADX builds.
Posted 07 Oct, 2004 10:02:41 Top