last day (16 days later) » 

7:50 PM
There is at least one thing that strikes me as odd and that is that math.se includes beta.mathjax.org/mathjax/latest/… where stats.se includes cdn.mathjax.org/mathjax/latest/…. It looks like I'm able to repro/induce this on math.se AFTER I visit stats.se.
in Tavern on the Meta, 2 hours ago, by rene
@IlmariKaronen if you're around can you check this? I use this and this as my test targets.
in Tavern on the Meta, 1 hour ago, by Ilmari Karonen
@rene: I'm not convinced that the version difference matters, although of course it might. But I'm definitely seeing breakage on both sites.
in Tavern on the Meta, 1 hour ago, by Ilmari Karonen
But it's... weird. The first time I opened your links, they both worked. Then I switched the MathJax renderer from HTML-CSS to Common HTML and reloaded, and got unparsed LaTeX on stats.SE and [Math Processing Error]s on math.SE. On the next reload, it worked once on math.SE, but since then, I've got unparsed LaTeX on both sites, every time, with every math renderer I've tried.
in Tavern on the Meta, 1 hour ago, by Ilmari Karonen
@rene OK, so I think I'm getting somewhere... on this particular browser, it seems that MathJax almost always works when I open your edit links in a new tab, but almost always stops working (in that tab) when I refresh the page. So, yeah, I suspect a race condition somewhere.
I think this is it so far
 
A war room! Readies pitchforks
 
user315433
About this one:
 
user315433
There is at least one thing that strikes me as odd and that is that math.se includes http://beta.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML-full where stats.se includes http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML-full. It looks like I'm able to repro/induce this on math.se AFTER I visit stats.se. Maybe @AdamLear can verify if/confirm having those two different versions is intentional? — rene 2 hours ago
 
user315433
@rene Geoff Dalgas is the person most closely involved in the rollout of MathJax versions: he announces them on meta.math. New versions indeed get enabled on Math.SE earlier than on other sites, for testing purpose. So it makes sense that Math uses the beta channel.
 
8:03 PM
Hmm, OK
But that seems to influence the loading of MathJax, at least when other sites are involved
 
user315433
At present the version served from beta channel should be the same as the regular one, 2.6.1. But browsers cache them separately, so who knows. Personally, I've given up on this and just refresh the page when markup stops working...
 
That is a not so nice user experience
Do you use other sites as well that use mathJax?
 
user315433
Very true. But the only MathJax-enabled site I'm using is Math.SE, where there are other sources of pain...
 
@Sally Does given up mean you tried to have a decent repro but never managed to get one?
 
user315433
No, I haven't tried to reproduce this on purpose. It's an intermittent thing.
 
8:11 PM
Grmbl ... end users ... grmbl ;)
 
user315433
We had a much worse bug in 2012: MathJax was crashing Chrome tabs with data loss, which went on for several months, and was only resolved with one of Chrome updates. That bug also was never reliably reproduced.
 
Hmm, OK. I see I have opened Pandora's Box...
 
user315433
Generally, my impression is that it happens when a user types up formulas quickly. So when a developer (who is probably not using LaTeX syntax much) tries to reproduce, they probably won't.
 
Ah, maybe an event ordering issue?
 
Could well be.
@Sally There was also a hard-to-repro bug that made some Chrome browsers freeze hard on any page that had MathJax on it. Apparently it was a bug in Blink that got triggered by MathJax under some weird circumstances. I don't think it was ever actually fixed, at least not on the MathJax side, but it doesn't seem to happen (so much) on current Chrome versions any more.
Basically, it just seems that Chrome and MathJax really don't like each other very much. :(
 
8:19 PM
:3
@IlmariKaronen MathJax is full of browser inconsistencies.
 
@IlmariKaronen those bugs don't exist on IE or FF or Safari?
 
They don't on FF. I don't use IE or Safari, so I can't say much about them, but at least the freeze bug seems to have been Chrome-specific (or rather, Blink-specific, so Opera etc. may have been affected too).
 
OK
 
I can't really blame MathJax much for that one -- a proper rendering engine should not get caught in an unbreakable infinite loop, no matter what you throw at it.
Anyway, we might want invite Davide Cervone and Peter Krautzberger here, especially if we make any progress with this one. They're both MathJax devs that are fairly active on SE.
 
@rene Never seen it on Safari.
 
8:32 PM
OK, so we are hunting down a MathJax bug that only happens in Chrome ...
So we need to debug the browser then ...
 
9:04 PM
@rene: Actually, I'm starting to suspect that the issue I'm seeing on this browser is not the same issue that Michael Hardy is reporting. :/ Because it turns out that for me, the MathJax rendering failure is purely temporary, and will go away as soon as I type anything into the edit box (or manually trigger a MathJax typeset pass from the console).
And yeah, it should've taken me much less time to notice that than it did. :P
So, yeah, it's a bug too, but a pretty minor one, and probably not the one we're really investigating here.
<insert your favorite facepalm pic here>
 
O_o
Maybe it is more with the quick typing thing @Sally mentioned earlier
 
9:23 PM
Yay, I think I can reproduce the actual bug too, by copying the math.SE post you linked and repeatedly pasting it into the edit box until I get a TypeError in the console.
I even got a stack trace:
(And yeah, you're getting a screenshot because I can't figure out how to properly paste code into chat. :P)
 
:)
there is a e.processError that comes from the editing plugin
 
Oh, this is cool, I'm actually getting useful line numbers from the stack trace after clicking "deminify". :D Score one for the Chrome dev tools!
I might actually be able to see what's happening here...
OK, so turns out the error message e.processError() is trying to print when it crashes is "Cannot read property 'insertBefore' of null". :) So looks like it's a nested error.
 
9:41 PM
Oh boy...
I assume it is this insertBefore. Maybe a node in the dom gets replaced by Chrome?
 
Specifically, the inner error says:
TypeError: Cannot read property 'insertBefore' of null
at Object.MathJax.Extension.fast-preview.Preview (beta.mathjax.org/mathjax/latest/config/…)
at Function.CALLBACK.execute (beta.mathjax.org/mathjax/latest/…)
at cb (beta.mathjax.org/mathjax/latest/…)
at MathJax.Object.Subclass.Execute (beta.mathjax.org/mathjax/latest/…)
at Object.MathJax.Hub.processInput (beta.mathjax.org/mathjax/latest/…)
at Function.CALLBACK.execute (beta.mathjax.org/mathjax/latest/…)
at Function.WAITEXECUTE (beta.mathjax.org/mathjax/latest/…)
at cb (beta.mathjax.org/mathjax/latest/…)
at Function.WAITEXECUTE (beta.mathjax.org/mathjax/latest/…)
(ooh, look, code formatting! but why does it one work if the whole message is indented...?)
 
Yeah, markup magic in chat...
 
Yeah, it's definitely trying to insert something into a DOM node that doesn't exist. :P
...or, rather, it's trying to insert something before a DOM node that doesn't have a parent node.
 
But if it is an event ordering problem that might make sense
The newer event tries to insert something on a node that is still to be processed to be inserted
 
Yeah, that does make sense.
I was trying to see where it's pulling that DOM node from (it's a <script> element created by MathJax, FWIW), but it's coming from some MathJax internal array with lost of script elements in it, and I don't know enough MathJax guts to recognize what the heck that is.
But I think I'll try and see if I can find a place to set a breakpoint so I can catch the inner error directly, and see if that might help.
 
10:09 PM
Got it! Conditional breakpoints FTW!
...I'm not sure if this is really telling me anything useful, though. :/
 
Hmm, I'm trying now on my home PC but I can't repro
 
10:25 PM
Hmm, OK, I'm starting to see a pattern here. I can trigger the error using any of the MathJax renderers, if Fast Preview is enabled, or with the "Common HTML", "Preview HTML" or "Plain Source" renderers even without Fast Preview.
And IIUC, Fast Preview basically uses the "Preview HTML" renderer internally (hence the name).
So it looks like those three renderers (which, maybe not coincidentally, are all new) may be bugged.
 
Oh, that sounds great.
Have you a stable way to reproduce yet?
 
What works for me (Chrome / Windows 7) is going to this edit page you linked earlier, opening the dev console, checking that Fast Preview is on (right-click any math formula), clicking the edit box and pressing Ctrl+A, Ctrl+C and then Ctrl+V repeatedly until I get a TypeError in the console.
 
Let me try that
> Body is limited to 30000 characters; you entered 31235.
No errors in the console
I'm on Win10 here
48.0.2564.116 m
 
:(
Meanwhile, I just tested it in Firefox (no repro, as expect) and IE 11 (reproduced using instructions above!). So it's not purely Chrome-specific after all!
 
10:42 PM
Yep, repro-ed now
 
cool! :)
Also, my computer is telling me I should go get some sleep. :P
 
Yeah, it is turning wednesday here
Let's have some sleep over it
Cya
 
Yeah, it's been Wednesday here for 45 minutes already.
G'nite.
 

  last day (16 days later) »