LaTeX loading freezes system for ~1 min

In summary: Has anyone else encountered this issue, and is there a fix or way to load the math plugin more smoothly so that it doesn't freeze up everything while it loads?I have had this same issue. The only way to avoid it is to disable the latex plugin in firefox.
  • #1
Mute
Homework Helper
1,388
12
I'm not sure if this is really a bug with the forum software as opposed to some incompatibility with my browser, but whenever I load the forums for the first time after booting up my computer, any page with latex on it will freeze my computer, sometimes for over a minute, while the latex plugin(?) loads.

Has anyone else encountered this issue, and is there a fix or way to load the math plugin more smoothly so that it doesn't freeze up everything while it loads? I would really love to be able to keep using my laptop while the browser renders the math.

I'm using Chrome and running Windows 7 when this occurs. If I boot up into Ubuntu instead, I do not encounter the same problem with Firefox.

Any suggestions?

Thanks.
 
Physics news on Phys.org
  • #3
What makes you suspect that the [itex]\LaTeX[/itex] is the culprit? My first guess would have been a malicious, or just poorly written script in one of the ads on the site. Which could also explain why Greg isn't having anyproblems, as I doubt he sees the same ads we do.
 
  • #4
I'll add the obvious suggestion: contribute to PF, and no more ads. Better experience all around.
 
  • #5
Hmm. This sounds a lot like a freeze that I experience also. One freeze after I've started the computer and then it doesn't happen again. I'll have to see if it's occurring during a LaTeX load. I have Win7 w/ Firefox 3.6.16 - yes, I know it's ancient.
 
  • #6
Borg said:
Hmm. This sounds a lot like a freeze that I experience also. One freeze after I've started the computer and then it doesn't happen again. I'll have to see if it's occurring during a LaTeX load. I have Win7 w/ Firefox 3.6.16 - yes, I know it's ancient.

It happens with my home laptop the same way. Once it goes through one freeze-up it's fine after that. I run Chrome.

I seem to remember this being reported in the past...or am I imagining it :confused:?

I sometimes get a message but it flashes up so quickly it's not readable.
 
  • #7
Greg Bernhardt said:
I run Chrome on Win7 with no problems. Do you get any messages?

Not that I'm aware of. There are no pop-up messages or anything, at least. The system just hangs up for a minute or so.

gabbagabbahey said:
What makes you suspect that the [itex]\LaTeX[/itex] is the culprit? My first guess would have been a malicious, or just poorly written script in one of the ads on the site. Which could also explain why Greg isn't having any problems, as I doubt he sees the same ads we do.

The system only freezes up when I load a page with TeX on it. If I start up my laptop and load PF and I browse, say, the Career services forum first, nothing freezes. It's only once I go to a page with rendered LaTeX that it locks up. If I go to a math forum and there's a title with latex in it, everything freezes; if there are no titles with Latex in them, then the system only locks up once I go into a thread with the LaTeX.

Also, this only happens once following booting up the computer. Even if I close the browser entirely and come back it won't freeze up again.

So, for these reasons I believe it is my browser loading the math the first time that is the issue.

PAllen said:
I'll add the obvious suggestion: contribute to PF, and no more ads. Better experience all around.

To be honest I don't mind (or notice) ads very much, unless they start taking up the whole screen or talking, which I don't think has happened on PF. In any event, I don't suspect it's the ads causing a problem. However, it is probably about time I contributed...

Borg said:
Hmm. This sounds a lot like a freeze that I experience also. One freeze after I've started the computer and then it doesn't happen again. I'll have to see if it's occurring during a LaTeX load. I have Win7 w/ Firefox 3.6.16 - yes, I know it's ancient.

At least I'm not the only one!

lisab said:
It happens with my home laptop the same way. Once it goes through one freeze-up it's fine after that. I run Chrome.

I seem to remember this being reported in the past...or am I imagining it :confused:?

I sometimes get a message but it flashes up so quickly it's not readable.

Where does the message show up? I haven't noticed one before, but maybe I'm always just looking somewhere else when the system freezes. Also, I am using a laptop as well... I don't know why that would make a difference, though.
 
  • #8
I don't see a message either. The entire system freezes up for me such that I can't move my mouse and other displays freeze. For example, I have Zone Alarm which normally shows a display like an audio equilizer when it's processing web pages. Even that display freezes. I still don't know if this only happens when I visit PF because it hasn't happened to me since I've posted about it. :rolleyes:
 
  • #9
Mute said:
Where does the message show up? I haven't noticed one before, but maybe I'm always just looking somewhere else when the system freezes. Also, I am using a laptop as well... I don't know why that would make a difference, though.

It's right in the middle of the screen, and it's for a split second - literally you could blink and miss it. All I can catch is this guy:

http://poosk.com/wp-content/themes/poosk/images/SadTab.jpg

But a lot smaller!
 
Last edited by a moderator:
  • #10
lisab said:
It happens with my home laptop the same way. Once it goes through one freeze-up it's fine after that. I run Chrome.

I seem to remember this being reported in the past...or am I imagining it :confused:?

I sometimes get a message but it flashes up so quickly it's not readable.

Nope...you are not imagining it. This was reported way back when the new latex system was being tested: https://www.physicsforums.com/showpost.php?p=3316213&postcount=150

Nothing was done about it and I still continue to have the same problem everyday...so I got used to it :uhh:
 
  • #11
Problem is this happens rarely, on rare configurations (it is not just a OS/browser combination, as other people using Chrome on Vista/Seven have seen no problems), and with a code we don't manage. All we can do is to forward the error reports to MathJax developers. My guess is that they have no idea what is happening for the same reasons - it is some rare glitch, very difficult to reproduce without access to the particular computer on which it happens.

Such things happen. I have sold tens of thousands copied of my dyslexia programs in the last 15 years. Sometimes people report glitches that are impossible to reproduce even on identical computers with identical OS. In once particular case my programs were working on several computers in school - all computers were bough at the same time, from the same source, in the same configuration. The only computer that the program refused to work on was the computer used by the school dyslexia and speech therapist. After reinstalling OS to no avail we just switched computers when nobody was looking :wink:
 
  • #12
I've seen this several times, using Chrome, and I'm fairly sure it is something to do with loading web fonts when I haven't visited any pages with LaTeX on for some time. The machine just locks out completely (not even responding to mouse movements) for up to two minutes, but then it seems to be fine. When it first happened, I thought the system had crashed, but I'm getting used to it.
 
  • #13
I have sent the devs this thread to look at. I also see MathJax 2.1 beta is out and it appears to address a ton of issues.

New in MathJax v2.1

MathJax v2.1 is primarily a bug-fix release. Numerous display bugs, line-breaking problems, and interface issues have been resolved. The complete details are available on the MathJax GitHub issue tracker https://github.com/mathjax/MathJax/issues. The following lists indicate the majority of the bugs that have been fixed for this release.

Interface:

Make NativeMML output properly handle iOS double-tap-and-hold, and issue warning message when switching to NativeMML output.
Use scrollIntoView to handle positionToHash rather than setting the document location to prevent pages from refreshing after MathJax finishes processing the math.
Handle positioning to a hash URL when the link is to an element within SVG output.
Make href’s work in SVG mode in all browsers.
Fix problem with opening the “Show Math As” window in WebKit (affected Chrome 18, and Safari 5.1.7).
Use MathJax message area rather than window status line for maction with actiontype='statusline' to avoid security restrictions in some browsers.
Fix issue where zoom box for math that has been wrapped to the beginning of a line would be positioned at the end of the previous line.
Fix a problem where IE would try to typeset the page before it was completely available, causing it to not typeset all the math on the page (or in some cases any of the math).
Allow decimal scale values in the dialog for setting the scale.
Fix SVG output so that setting the scale will rescale the existing mathematics.
Add close button to About box and don’t make clicking box close it (only clicking button).
Make About box show ‘woff or otf’ when otf fonts are used (since both are requested).
Have output jax properly skip math when the input jax has had an internal failure and so didn’t produce any element jax.
Produce MathJax.Hub signal when [Math Processing Error] is generated.
Line-breaking:

Fix problem with SVG output disappearing during line breaks when equation numbers are also present.
Fix problem with potential infinite loop when an <mspace> is an embellished operator that causes a linebreak to occur.
Allow line breaks within the base of <msubsup> to work so that the super and subscripts stay with the last line of the base.
Fix <mfenced> so that when it contains a line break the delimiters and separators are not lost.
Allow line breaks at delimiters and separators in <mfenced> elements.
Fix issue with line breaking where some lines were going over the maximum width.
Fix problem with line breaking inside <semantics>elements.
Fix problem with line breaking where the incorrect width was being used to determine breakpoint penalties, so some long lines were not being broken.
HTML-CSS/SVG display:

Fix several Chrome alignment and sizing issues, including problems with horizontal lines at the tops of roots, fraction bars being too long, etc.
Resolve a problem with how much space is reserved for math equations when a minimum font size is set in the browser.
Force final math span to be remeasured so that we are sure the container is the right size.
Fix alignment problem in <msubsup>.
Fix processing error when rowalign has a bad value.
Fix a vertical placement problem with stretched elements in mtables in HTML-CSS, and improve performance for placing the extension characters.
Handle spacing for U+2061 (function apply) better.
Better handling of primes and other pseudo scripts in HTML-CSS and SVG output.
Fixed a problem with <mmultiscripts> in SVG mode that caused processing error messages.
Fix misplaced \vec arrows in Opera and IE.
Make <mi> with more than one letter have texClass OP rather than ORD in certain cases so it will space as a function.
Make HTML snippet handler accept a string as contents, even if not enclosed in braces.
Fix spacing for functions that have powers (e.g., \sin^2 x).
Fix problem with SVG handling of \liminf and \limsup where the second half of the function name was dropped.
Fixed a problem where HTML-CSS and SVG output could leave partial equations in the DOM when the equation processing was interrupted to load a file.
Fix problems with <mtable>, <ms>, and <mmultiscripts> which weren’t handling styles.
Make column widths and row heights take minsize into account in <mtable>.
Fix typo in handle-floats.js that caused it to not compile.
Fix problem in HTML-CSS output with <msubsup> when super- or subscript has explicit style.
TeX emulation:

Allow negative dimensions for \\[] but clip to 0 since this isn’t really allowed in MathML.
Fixed problem where \\ with whitespace followed by [ would incorrectly be interpretted as \\[dimen].
Make jsMath2jax run before other preprocessors so that tex2jax won’t grab environments from inside the jsMath spans and divs before jsMath2jax sees them.
Fix issue with \vec not producing the correct character for \vec{\mathbf{B}} and similar constructs.
Combine multiple primes into single unicode characters.
Updated the unicode characters used for some accents and a few other characters to more appropriate choices. See issues #116, #119, and #216 in the MathJax issue tracker on GitHub.
Remove unwanted 'em' from eqnarray columnwidth values.
Make eqnarray do equation numbering when numbering is enabled.
Make vertical stretchy characters stand on the baseline, and improve spacing of some stretchy chars.
Make mtextFontInherit use the style and weight indicated in the math, so that \textbf and \textit will work properly.
Add \textcolor macro to the color extension.
Added RGB color model to the color extension.
Automatically load the AMSmath extension when needed by the mhchem extension.
Add <<=> arrow to mhchecm extension
Fix alignment of prescripts in mhchem to properly right-justify the scripts.
Expose the CE object in the mhchem extension.
Make autoload-all skip extensions that are already loaded, and not redefine user-defined macros.
Fix most extensions to not overwrite user defined macros when the extension is loaded.
Ignore \label{} with no label.
Make \injlim and friends produce single <mi> elements for their names rather than one for each letter.
Handle primes followed by superscript as real TeX does in TeX input jax.
Handle a few more negations (e.g., of arrows) to produce the proper Unicode points for these.
Don’t produce a processing error when \limits is used without a preceding operator.
MathML Handling:

Prevent align attribute on <mtable> from applying to <mover>/<munder>/<munderover> elements.
Ignore _moz-math-* attributes in MathML input so they don’t appear in MathML output
Prevent duplicate xmlns attributes in “Show Math As -> MathML”.
Fixed a problem in MathML output where dimensions given to <mpadded> with leading +’s could lose the plus and become absolute rather than relative.
Fix setTeXclass for TeXatom so that it handles the spacing for relations correctly.
Add more CSS to isolate NativeMML output from page.
Handle setup of MathPlayer better for IE10, and avoid some IE10 bugs in setting the document namespace for MathML.
Fonts:

Fix a problem where bold-script didn’t work properly in STIX fonts.
Work around Chrome bug with MathJax web fonts that affects some combining characters.
Remove dependencies of TeX->MathML conversion on the choice of fonts (TeX versus STIX).
For stretchy characters that don’t have a single-character version in the MathJax fonts, make sure they are properly sized when not stretched or stretched to a small size.
Fix an error with U+u005E (^) which caused it to show as a plus when used as a stretchy accent.
Fix a problem with greek letters in STIX font producing the wrong letter (an offset was off by one).
Handle more characters in sans-serif-italic and bold-italic STIX fonts.
 
  • #14
I didn't have this freeze for a while but it's occurred over the last several days whenever I went to the Random Thoughts thread. jhae2.718 has LaTeX in his signature and had a few posts there recently.
 
  • #16
Greg Bernhardt said:
Anything strange about his latex? I'll load the beta on Monday.
Not that I know of. This thread was the first that I had been able to connect it to Latex. Now that I know where it freezes consistantly for me, I'll be sure to check how the beta loads on Monday.
 
  • #17
I haven't had time to browse the forums this week to see if the new beta has changed anything, but I found that this xkcd page:

http://what-if.xkcd.com/16/

which has latex on it also freezes my system while the math loads. (I visited the page after restarting my computer and before coming to the forums, so it definitely appears to have something to do with the loading of latex)

EDIT: So I just visited the forums after turning on my computer, and the freezing still occurred upon loading this thread with LaTeX in it. (at time of loading only first post is/was there)
 
Last edited:
  • #19
Greg Bernhardt said:
We are now using MathJax 2.1 Please let me know if you still get the freeze.
I went to the first page of this thread and it froze. My XP work computer doesn't freeze even though I have the same ancient version of Firefox on it. Oh well.
 
  • #20
Borg said:
I went to the first page of this thread and it froze. My XP work computer doesn't freeze even though I have the same ancient version of Firefox on it. Oh well.

Is there anything in a debug or error log? Why not upgrade FF?
 
  • #21
Greg Bernhardt said:
Is there anything in a debug or error log? Why not upgrade FF?
No, I haven't seen any errors. I think that it just gets stuck while loading and there isn't really any error. It's a fascinating problem but I haven't tried to seriously debug it. Maybe I'll turn on Firebug one of these days to see what's trying to load when it freezes. I don't upgrade because of work requirements on the web applications that I work with.

BTW, I'm just commenting in case it helps others. It doesn't really bother me but it's nice to know what has been causing it to occur.
 
  • #24
I think that I may have figured this out. I did some reading about the MathJax software yesterday and noticed that it prefers to use specific fonts but will still work if it doesn't find them. My XP work computer that doesn't freeze is much older and likely has additional fonts installed that are more compatible with MathJax. From the http://www.mathjax.org/help-v2/fonts/
MathJax will use the STIX fonts if they are installed on your computer. This will improve MathJax’s speed when it typesets the mathematics on any page, so it is to your advantage to download and install one of these fonts, though MathJax will still work even if you don’t install the fonts yourself.

I suspect that on certain computer configurations, Windows (or the browser) gets confused while trying to figure out which font to use if you don't have the STIX font installed or something close. Once it figures out what to use, it doesn't lock up again until you've restarted your computer. I would bet that you can recreate the freeze at will by clearing your browser cache and revisiting the page.

So I followed the instruction on the help page to download and install the fonts. The zip file has two folders of fonts. I didn't know if Windows would figure out the directories so I copied the contents of both folders into the C:\Windows\Fonts directory. Today, I went straight to the page that Lisab linked to and had no freeze.
 
Last edited:
  • #25
Borg said:
I think that I may have figured this out. I did some reading about the MathJax software yesterday and noticed that it prefers to use specific fonts but will still work if it doesn't find them. My XP work computer that doesn't freeze is much older and likely has additional fonts installed that are more compatible with MathJax. From the http://www.mathjax.org/help-v2/fonts/


I suspect that on certain computer configurations, Windows (or the browser) gets confused while trying to figure out which font to use if you don't have the STIX font installed or something close. Once it figures out what to use, it doesn't lock up again until you've restarted your computer. I would bet that you can recreate the freeze at will by clearing your browser cache and revisiting the page.

So I followed the instruction on the help page to download and install the fonts. The zip file has two folders of fonts. I didn't know if Windows would figure out the directories so I copied the contents of both folders into the C:\Windows\Fonts directory. Today, I went straight to the page that Lisab linked to and had no freeze.

I have installed the fonts and will check whether or not this resolves the problem, hopefully tomorrow. Thanks for finding this out!
 
  • #26
Borg said:
I suspect that on certain computer configurations, Windows (or the browser) gets confused while trying to figure out which font to use if you don't have the STIX font installed or something close. Once it figures out what to use, it doesn't lock up again until you've restarted your computer. I would bet that you can recreate the freeze at will by clearing your browser cache and revisiting the page.

In that case, it could also be related to the number of fonts installed on your PC. Some software packages install literally hundreds, "just in case" you want to create some weird looking text one day.
 
  • #27
AlephZero said:
In that case, it could also be related to the number of fonts installed on your PC. Some software packages install literally hundreds, "just in case" you want to create some weird looking text one day.
Now I have to compare the number of fonts installed on my two computers? :tongue:
Windows 7 that was freezing - 149 before the 15 new STIX fonts.
I'll check the other one tomorrow.
 
  • #28
Mute said:
I have installed the fonts and will check whether or not this resolves the problem, hopefully tomorrow. Thanks for finding this out!

Installing the fonts seems to have fixed the issue, at least when I just tested today. Will update if I encounter another freeze.
 
  • #29
Borg said:
Now I have to compare the number of fonts installed on my two computers? :tongue:
Windows 7 that was freezing - 149 before the 15 new STIX fonts.
I'll check the other one tomorrow.

150 fonts shouldn't be a problem. Windows itself probably installs that many, if you count all the variants (bold, italic, etc) as different fonts.

But people who "collect" demo versions of DTP software etc might accumulate nearer 15,000 than 150, as time goes by.
 
  • #30
AlephZero said:
150 fonts shouldn't be a problem. Windows itself probably installs that many, if you count all the variants (bold, italic, etc) as different fonts.

But people who "collect" demo versions of DTP software etc might accumulate nearer 15,000 than 150, as time goes by.
My Windows 7 computer is only a year old and I haven't installed any fonts on it before this. I expect that my work computer has more - I have installed fonts on it in the past. I really think that the work computer has a non-standard font that my home computer doesn't have that MathJax found more palatable. I'm not going to try to determine which one it might be since the STIX font seems to cure the problem.
 
  • #31
As expected, my work computer has more fonts - 312.
 
  • #32
I have about 266 items in my fonts folder, after installing the STIX fonts. Some of the files are transparent - not sure what that means. It looks like a bunch of fonts were installed by mathematica and by enabling east-asian language support/input.

Again, installing the STIX fonts seems to have resolved the issue for me, as it did for Borg. I would guess along the lines of Borg's hypothesis that when mathjax can't find the font it's looking for it starts trying to look through all the others, and the number (and type?) of fonts it has to look through might account for part of the typical length of the time during which the system is frozen.

Does this resolve the issue for anyone else? Particularly the people who said they were seeing warnings/error messages just before the freeze?
 
  • #33
Mute said:
Does this resolve the issue for anyone else? Particularly the people who said they were seeing warnings/error messages just before the freeze?
Lisab told me that the font fixed her freeze issue as well.

@Greg: Is there a Latex FAQ somewhere? This might be a good addition for it.
 

1. What is LaTeX and why is it causing my system to freeze?

LaTeX is a typesetting language commonly used in scientific and academic writing. It is known for its high-quality typesetting and ability to handle complex mathematical equations. However, due to its processing power and memory usage, it can cause a system to freeze for a short period of time while it compiles the document.

2. Is there a way to prevent LaTeX from freezing my system?

While LaTeX may cause temporary freezes, there are a few ways to minimize its impact on your system. You can try using a more lightweight editor, breaking up your document into smaller sections, or adjusting the settings to use less memory. Additionally, making sure your computer has enough RAM can also help prevent freezing.

3. How long does the freezing typically last?

The duration of the freezing can vary depending on the complexity of the document and the speed of your system. On average, it may last for about a minute, but it can be longer for larger and more complex documents.

4. Can I continue to use my computer while LaTeX is freezing?

Yes, you can continue to use your computer while LaTeX is freezing. However, it may slow down other processes and may cause temporary delays in your work. It is best to save your work and wait for the freezing to finish before continuing with other tasks.

5. Are there any alternatives to using LaTeX that won't freeze my system?

There are a few alternatives to LaTeX that may not cause your system to freeze, such as Markdown or HTML. However, these languages may not have the same level of typesetting capabilities as LaTeX. It is best to weigh the pros and cons and choose the language that best suits your needs.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
776
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
256
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
3K
  • Computing and Technology
Replies
2
Views
870
Replies
13
Views
1K
Back
Top