2

I have a web application which from time to time get IE in a hung state, where IE uses 100% of the CPU. The only way out is to terminate the IE process.

When I look at the stack trace of the thread which is hung in iexplore.exe, I see that the stack traverses mshtmled.dll. I am used to see mshtml.dll in those stack traces, but not mshtmled.dll.

The methods being called make you think there is a editor on the page (like CSelectionManager::SetEditContext or CSelectionManager::EnsureEditContextClick), but I have no HTML editor being used on the page (such as the FCK editor of the YUI RTE).

So I am really wondering: how is mshtmled.dll used by IE?

Trying to disable mshtmled.dll

@VonC suggested in the comments that I disable the mshtmled.dll through Manage Add-ons dialog, which you get from the Programs tab of the Internet Options. After disabling that dll and restarting IE, I can see that it is reported as disabled:

alt text http://img.skitch.com/20090226-c9e9ygek8i6a7di3jija2x317k.png

After this, I am however still able to reproduce the problem, and I do see (gasp!) mshtmled.dll being used in the stack trace of the hung thread:

alt text http://img.skitch.com/20090226-m3167dxb8iaax3wgy22eatruyp.png

Microsoft Hotfix

Microsoft has a hotfix to mshtmled.dll for a problem very similar to the one I am seeing. But this hotfix is most likely installed on the machines on which we can reproduce the problem since we have SP3. It looks to me like the problem I'm having here is of a similar nature to the one fixed. I am just mentioning this here in case someone finds this useful.

avernet
  • 30,895
  • 44
  • 126
  • 163
  • Oh... "since we have SP3": do you mean you are working with *IE6* ? That little bit of information might have came in handy, should have we known it before ;) – VonC Feb 27 '09 at 05:03
  • @VonC Yes, at least in my environment I have IE6 and SP3. Not sure what other people who are reproducing this problem have. But I'm not sure to understand your comment; how does this help? – avernet Feb 27 '09 at 18:44
  • Because we have lots of prb with IE6SP3 at work... but only with old Hp desktop (2002-2003). None of the CPU intensive usage is apparent on more recent desktop, or with more recent IE. – VonC Feb 28 '09 at 00:48
  • @VonC I see. I this case, IE gets stuck and uses 100% of the CUP forever. So having the latest greatest hardware wouldn't make much of difference. – avernet Mar 01 '09 at 06:32
  • Sill no answer ? May it is time for a bounty (even though I am not exactly for it the way it is currently implemented ;) ): http://stackoverflow.com/questions/359727 – VonC Mar 04 '09 at 18:04
  • Yes, still no answer. I've put this one the back burner, and will make sure to update this if I find something. – avernet Mar 05 '09 at 19:28

1 Answers1

2

Like this thread suggest, you might use a tool like fiddlertool to analyze your HTML traffic and check what triggers this hung state.

Since mshtmled.dll handles HTML editing within a webpage, something in this HTML traffic must trigger a mshtmled call.


As Alessandro mentions in the comment, there is a JavaScript active, and since mshtmled.dll is related with "DOM element manipulations", may be that JavaScript does trigger those mshtmled calls.
Disclaimer: "DOM manipulation" is not exactly its primary function, since mshtmled.dll is described as being part of the initial Front Page distribution. May be it is a IE module which could be deactivated, as a Component ActiveX named "HtmlDlgSafeHelper" Class.

Manage add-ons

Select "Manage Add-ons - Add-ons that run without requiring permission", and you should see mshtmled.dll in the "File" column.

May be that object is solicited by some JavaScript, like:

var a = new ActiveXObject('HtmlDlgSafeHelper.HtmlDlgSafeHelper');
a.fonts = ...;
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • @VonC, thanks for the pointer to the thread. That person seems to have exactly the same problem. I followed up on that thread. But the suggestion to used Fiddler doesn't help, because the Ajax response has already been processed by IE at the time of the crash. – avernet Feb 26 '09 at 09:23
  • @VonC, adding to my previous comment: there doesn't seem to be much of a correlation between the content of the Ajax response and the fact that there is a hang. Also there is JavaScript running in according to the stack traces I see. – avernet Feb 26 '09 at 09:25
  • @Alessandro: so since mshtmled.dll is related with DOM element manipulations, may be that Javascript is the culprit... – VonC Feb 26 '09 at 09:55
  • @VonC, what makes you think that mshtmled.dll is related with DOM element manipulations. I am not saying that it is not, and based on the name it makes sense, but do you have other indications? Personal experience, documentation? – avernet Feb 26 '09 at 17:28
  • @Alessandro: no I only deduce that from the various description of the dll I saw on the net. I have updated my answer to include the possibility to deactivate that ActiveX control. May be that will be enough. Let us know. – VonC Feb 26 '09 at 18:07
  • http://www.amazon.com/Professional-Web-Programming-Wrox-Guides/dp/0470087889 Riiiight... May be you did already explored the "add-ons" lead ;) – VonC Feb 26 '09 at 18:53
  • @VonC, good idea! I tried that, but mshtmled.dll is still used. I updated the question with more information about this (see what is under "Trying to disable mshtmled.dll"). – avernet Feb 26 '09 at 23:47
  • @VonC, looks like you found me :). – avernet Feb 26 '09 at 23:48