Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in IE9/IE9 standards mode #170

Closed
dpvc opened this issue Sep 10, 2011 · 7 comments
Closed

Crash in IE9/IE9 standards mode #170

dpvc opened this issue Sep 10, 2011 · 7 comments

Comments

@dpvc
Copy link
Member

dpvc commented Sep 10, 2011

This test case causes IE9 to crash when HTML-CSS mode is used with web-based fonts

<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
</head>
<body>

<ol>
<li>\(1\)</li>
<li>\(x\)</li>
</ol>

</body>
</html>

Removing the <ol> or changing it to <ul> eliminates the crash. Removing either of the list items eliminates the crash. The crash only occurs in in IE9 standards mode, and only if the file is served from a server (not locally). Another one of these fun IE bugs.

@dpvc
Copy link
Member Author

dpvc commented Sep 10, 2011

The problem occurs when the MathJax_Main-Italic font is loaded. I have tracked this to the setTimeout() that is used to start the polling to see when a web font becomes available; IE seems to lose track of the function that is to be called by the timeout, as the setTimeout() command is executed, but the timeout function isn't (IE's attempt to run it seems to cause the crash). Calling the timeout function directly instead of using setTimout() seems to cause no problem.

One workaround is to use the <meta> tag to force IE7 emulation rather than defaulting to IE9 standards mode. Another is to not use the <ol> tag and handle the numbering by hand. Neither is ideal.

dpvc added a commit to dpvc/MathJax that referenced this issue Sep 10, 2011
…ing web fonts to avoid an IE9 bug (resolves issue mathjax#170)
@fred-wang
Copy link
Contributor

I've tried to load

http://devel.mathjax.org/testing/testsuite/Crashtests/issue170.html

with MSIE IE9 standard mode (Windows 7), but I'm not able to reproduce the crash...

@dpvc
Copy link
Member Author

dpvc commented Sep 21, 2011

Make sure you DON'T have the STIX or MathJax fonts installed on the system (I suspect you probably do), since you must force MathJax to use web-based fonts. I'll try it again myself. Yup, it still crashes for me in those circumstances.

I suppose you could add configuration to clear the avaiableFonts array so that it goes to web fonts automatically.

@fred-wang
Copy link
Contributor

I'm still not able to reproduce the bug after having cleared the availableFonts array (I have STIX and MathJax fonts installed). Maybe it depends on the OS/browser version. Can you tell me if the test

http://devel.mathjax.org/testing/testsuite/Crashtests/issue170.html

is able to exhibit the crash. If so, I can add it to the testsuite.

@dpvc
Copy link
Member Author

dpvc commented Sep 22, 2011

The pages opens for me in Quirks mode, but the crash only occurs in IE9 standards mode. If I use the developer tools to switch to IE9 standards document mode, then it does crash. Perhaps you can insert the line

<meta http-equiv="X-UA-Compatible" content="IE=9">

or

<meta http-equiv="X-UA-Compatible" content="IE=edge">

so that it uses IE9 standards mode.

Daivde

@fred-wang
Copy link
Contributor

OK, thanks for the information. I tried in IE9 standards mode last time and I've just tried again with and without MathPlayer installed. I'm still unable to reproduce the crash. I'm using Windows 7 while I think you are using Windows Vista, so that may explain the difference. Since you confirm the test detects the crash, I'll add it to the testsuite anyway.

--> In testsuite

@dpvc
Copy link
Member Author

dpvc commented Sep 24, 2011

I use Windows 7 as well, so I'm not sure what the difference for us. In any case, the original test case came from a user who reported the problem, so it is not just my setup. I think it is OK to keep it in the suite.

@dpvc dpvc closed this as completed Feb 27, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants