marked 2 hangs when file is saved twice quickly

Count of San Francisco's Avatar

Count of San Francisco

01 Oct, 2019 07:50 PM

Hi,

When I edit my markdown (MD) text in my favorite text editor, I noticed marked 2 hangs when i do a "double" save quickly one after another. I think it hangs when it is not done rendering, visually, the first save.

For example, I might write a new paragraph in a MD document. When I am done, I save it. Then, I noticed a typo (like a missing period). I quickly fix it and then save it. I think if the MD document is "big" and marked 2 is taking a little extra time rendering the first save and a 2nd save comes in, marked 2 hangs indefinitely (or rather I run out of patience). I close the document in Marked 2. Then, I try to quit/exit/close the Marked 2 app. At that point, my Mac tells me it is not responding and I will have to do a force quit.

I am using MacOS Mojave version 10.14.6.

Thanks

  1. Support Staff 1 Posted by Brett on 02 Oct, 2019 04:52 PM

    Brett's Avatar

    If you could please open Marked and select Help->Report an Issue from
    the menu bar, pasting the results of that into this thread will help me
    simulate your environment for testing. If possible, please also attach a
    file that causes the behavior for you. You can set this thread to
    private if you're willing to share with me but not publicly.

    -Brett

  2. 2 Posted by Count of San Fr... on 02 Oct, 2019 11:56 PM

    Count of San Francisco's Avatar

    // Configuration (do not edit) Marked 2 976 (Mac App Store)

    macOS Version: 10.14.6

    additionalMathJaxConfig:
    allowPageBreakInCode: YES
    bookTxtIsLeanpub: NO
    summaryMdIsGitBook: NO
    codeIsPoetry: NO
    codeCanWrap: YES
    collapsibleHeadlines: NO
    convertGithubCheckboxes: YES
    convertYAMLToMMD: NO
    defaultMathJaxConfig: TeX-AMS-MML_HTMLorMML
    defaultPreviewStyle: 3
    defaultProcessor: Discount (GFM)
    enableMiniMap: YES
    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
    outlineModeExtensions:
    permissionGranted: NO
    printHeaderBottomLeft:
    printHeaderBottomRight:
    printHeaderFirstPage: NO
    printFooterFirstPage: NO
    printHeaderTopLeft:
    printHeaderTopRight:
    processHTMLFiles: YES
    removeMetadataForPreview: NO
    removeYAMLHeaders: NO
    scrollToEdit: YES
    shouldDetectCritic: YES
    shouldHighlightMarkupErrors: YES
    shouldLoadCritic: NO
    syntaxHighlight: YES
    syntaxHighlightOnlyLang: NO
    useCustomMarkdownProcessor: NO
    customMarkdownProcessor:
    useCustomPreprocessor: NO
    customPreprocessor:
    useFirstH1AsPrintTitle: YES

  3. 3 Posted by Count of San Fr... on 03 Oct, 2019 12:04 AM

    Count of San Francisco's Avatar

    I cannot share the document, unfortunately.

    Also, I noticed this is becoming more frequent. The initial save does not present any issues. But a subsequent save can cause Marked 2 to show a "blank" and completely white window. The time between each subsequent save makes a difference in how easily reproducible this is but I do notice as well that even if the time delta is long, marked 2 can get into this funky mode. It is easy to reproduce if the time delta is small.

    When I get into this situation, my MacBook's fan grows louder as that indicates that perhaps the Marked 2 code is in a tight loop which is heating up the CPU. I have to force quit that app.

    I use MacVIM as my editor. Just FYI.

  4. Support Staff 4 Posted by Brett on 03 Oct, 2019 04:05 PM

    Brett's Avatar

    It's possible that something specific in the document is throwing Marked
    for a loop. Does this happen with any document?

    -Brett

  5. 5 Posted by Count of San Fr... on 05 Oct, 2019 12:32 AM

    Count of San Francisco's Avatar

    I don't know if this happens with other documents as I have only one document to edit at this time.

    Is there a way to isolate where in the document this problem is occurring? I can then go see that section. A document containing over thousands of line can be hard to figure out which line that is causing the problem.

    Thanks!

  6. 6 Posted by Count of San Fr... on 07 Oct, 2019 11:10 PM

    Count of San Francisco's Avatar

    Hi,

    To help debug this problem, I did an "strace" or rather in MacOS lingo, dtruss, of the active process and capture that output into a file. I like to deliver the files to you in a private manner with some description of it. I see an "attach file" button below but I am not sure that is private. How do I deliver files to you in a private manner? The files are in plain text.

    Also, I went through the HTML generated form of the MD and used an HTML syntax analyzer on it. There were lots of warnings and some errors like duplicate ids and some minor typos. I fixed those but the problem still occurs.

    Thanks!

  7. Support Staff 7 Posted by Brett on 08 Oct, 2019 03:28 PM

    Brett's Avatar

    If you set this conversation to "Private", any attachment will only be
    seen by me and never indexed in search. If you need an alternate method,
    you can send it directly to [email blocked], but I'd ask that the
    conversation remain here and not in an email exchange.

    I don't think the issue will be cleared up by any process trace, nor
    would it be anything to do with the output markup. The easiest way to
    test with your large file is to create a copy and delete half the text.
    Test with that file and see if the issue persists. If not, you can try
    testing with the other half. If the issue then shows up, you know it's
    something in that half of the file and can start removing parts from
    there. If it doesn't, then it's likely being caused just by the size of
    the file, which would be odd but not unheard of and we could debug from
    there.

    -Brett

  8. 8 Posted by Count of San Fr... on 08 Oct, 2019 05:57 PM

    Count of San Francisco's Avatar

    Hi Brett,

    Okay. Thanks. Let me do that. The MD file is 101,389 bytes in size.
    However, our MD file contains a lot of HTML tags as well such as tables
    (where markdown cannot address), <p>, <a>. Mostly they are <p>'s and <a>'s.

    I am not sure that makes a difference.

    I will do your suggestion and try to isolate the problem by removing
    text. Please give me a few days to see if this method helps isolate the
    problem further.

    Thanks!!

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

Generic

? 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