Crashes too often when editing MathJax

Haotian Yang's Avatar

Haotian Yang

01 Nov, 2019 05:48 AM

// Please enter a detailed description of the issue // Description of the issue:

Crashes too often when editing a lot of MathJax

// Please enter a list of steps required to reproduce the issue // Steps to reproduce:

  1. Enable MathJax.
  2. Enter a lot of math. In particular, use a dozen \newcommand's and \DeclareMathOperator's.
  3. When editing, crashes often (about every 15min on average)

// If applicable please attach a sample document that causes the issue for you.

// Configuration (do not edit) Marked 2 978 (Direct)

macOS Version: 10.15

allowPageBreakInCode: YES
bookTxtIsLeanpub: NO
summaryMdIsGitBook: NO
codeIsPoetry: NO
codeCanWrap: YES
collapsibleHeadlines: NO
convertGithubCheckboxes: YES
convertYAMLToMMD: NO
defaultMathJaxConfig: TeX-AMS-MML_HTMLorMML
defaultPreviewStyle: 0
defaultProcessor: MultiMarkdown
enableMiniMap: NO
excludeBlockQuotesFromCounts: NO
excludeFootnotesFromCounts: NO
excludeVerbatimFromCounts: NO
excludeCaptionsFromCounts: NO
folderPreviewExtensionsArray: md, markdown, txt, mdown, html, opml
githubNewlines: YES
h1IsPageBreak: NO
h2IsPageBreak: NO
hrIsPageBreak: NO
includeMathJax: YES
includeKatex: NO
limitTextWidth: NO
minimalJavaScript: NO
permissionGranted: NO
printHeaderFirstPage: NO
printFooterFirstPage: NO
processHTMLFiles: YES
removeMetadataForPreview: NO
removeYAMLHeaders: NO
scrollToEdit: YES
shouldDetectCritic: YES
shouldHighlightMarkupErrors: NO
shouldLoadCritic: NO
syntaxHighlight: YES
syntaxHighlightOnlyLang: NO
useCustomMarkdownProcessor: NO
useCustomPreprocessor: NO
useFirstH1AsPrintTitle: YES

  1. Support Staff 1 Posted by Brett on 01 Nov, 2019 10:16 AM

    Brett's Avatar

    Please attach a sample document that exhibits the issue.


  2. 2 Posted by on 01 Nov, 2019 06:57 PM's Avatar

    Attached is a sample document, and also an error report generated by "Send to Apple" that I copied and pasted into a text file. The crash happens randomly when I'm editing the math in a text editor while previewing it on the side.

    Haotian Yang
    [email blocked]

  3. Support Staff 3 Posted by Brett on 01 Nov, 2019 10:13 PM

    Brett's Avatar

    I'm unable to replicate your crash locally. The crash log indicates that it was indeed a hang in the javascript processor (likely mathjax), but no amount of editing the test file )(inside or outside of the equations) has had any ill effects on my development machine.

    Is there anything else you can tell me about the conditions that precipitate the crash? Do you notice Marked slowing down first? Failing to update?

  4. 4 Posted by on 01 Nov, 2019 11:41 PM's Avatar


    Mostly there isn't any slowing down. The application just quits (as it tries to render the math), and after a short while the Send to Apple dialog pops up.

    That and also maybe it's because I'm on macOS Catalina. In fact, I was using a markdown preview plugin in Chrome before the OS update, but after the update it fails to render some of the MathJax blocks, so I had to switch. It may be something funny in the Javascript engine.

    Also, a problem probably just with MathJax, is that the attached sample fails to render properly (shown in the attached image). It can be fixed by inserting spaces next to the inequality signs. See if you can reproduce that.

    Hope it's helpful.


    Haotian Yang
    [email blocked]

  5. Support Staff 5 Posted by Brett on 02 Nov, 2019 11:24 AM

    Brett's Avatar

    I'm testing on Catalina and not seeing any issues on my machine, so I
    don't think that's the problem. And if it's just the JavaScript engine,
    there should be a hang, not a crash, so that's weird as well. I'll be
    digging further into the crash report this weekend.

    As far as your test equation, the `<x` portions are being recognized as
    the start of HTML tags, leading to strange rendering. You can see what
    I'm talking about by right clicking on the results that do show up and
    choosing Inspect Element. Spaces after each less than symbol are the
    recommended solution.


  6. 6 Posted by on 02 Nov, 2019 09:10 PM's Avatar

    Hello Brett,

    Thanks for the effort. I will try to more carefully observe the conditions under which the crash occurs and report to you.

    Also, a trivial feature request: to collapse multiple continuous empty lines into one, so that the latex definitions don't occupy a big blank space on the top of the page. I'm not sure if it's in the preferences somewhere though. But if not, please consider it.


    Haotian Yang
    [email blocked]

  7. 7 Posted by on 02 Nov, 2019 09:12 PM's Avatar

    Update: Nevermind, I found the option to collapse empty lines.

    Haotian Yang
    [email blocked]

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac