Joplin crashes on start

Hello,

I cut and paste a fairly simple HTML document (3 short paragraphs of text and 3 images) into Joplin and it crashed. Now it crashes immediately on restart (because the problematic note is selected on startup). Restarting in safe mode doesn't help.

Any suggestions on how I get access to my notes again?

I'm running macOS BigSur 11.3.1 and Joplin 1.8.5 (revision b28f087) (screenshot of about page attached in case you want more details). I'm syncing with Dropbox.

Error
Joplin encountered a fatal error and could not continue. To report the error, please copy the *entire content* of this page and post it on Joplin forum or GitHub.

To continue you may close the app. Alternatively, if the error persists you may try to restart in safe mode, which will temporarily disable all plugins.

Message
Maximum call stack size exceeded

Version info
Joplin for Desktop

Copyright © 2016-2021 Laurent Cozic
Joplin 1.8.5 (prod, darwin)

Client ID: 58d892c538fe460b968dd86a16dbfae6
Sync Version: 2
Profile Version: 35
Keychain Supported: Yes

Revision: b28f087
Plugins
[
    {
        "id": "joplin.plugin.ambrt.backlinksToNote",
        "name": "Automatic Backlinks to note",
        "enabled": false,
        "version": "2.0.9"
    },
    {
        "id": "joplin.plugin.benji.favorites",
        "name": "Favorites",
        "enabled": false,
        "version": "1.2.1"
    },
    {
        "id": "com.whatever.inline-tags",
        "name": "Inline tags",
        "enabled": false,
        "version": "1.1.3"
    },
    {
        "id": "com.whatever.quick-links",
        "name": "Quick Links",
        "enabled": false,
        "version": "1.1.1"
    },
    {
        "id": "outline",
        "name": "Outline",
        "enabled": false,
        "version": "1.1.8"
    }
]
Stack trace
RangeError: Maximum call stack size exceeded
    at String.match (<anonymous>)
    at StringStream.match (/Users/adam/Applications/Joplin.app/Contents/Resources/app.asar/node_modules/codemirror/lib/codemirror.js:869:47)
    at Object.<anonymous> (/Users/adam/Applications/Joplin.app/Contents/Resources/app.asar/node_modules/codemirror/mode/markdown/markdown.js:696:14)
    at Object.token (/Users/adam/Applications/Joplin.app/Contents/Resources/app.asar/node_modules/codemirror/mode/markdown/markdown.js:855:20)
    at Object.token (/Users/adam/Applications/Joplin.app/Contents/Resources/app.asar/gui/NoteEditor/NoteBody/CodeMirror/utils/useJoplinMode.js:92:41)
    at readToken (/Users/adam/Applications/Joplin.app/Contents/Resources/app.asar/node_modules/codemirror/lib/codemirror.js:1168:24)
    at runMode (/Users/adam/Applications/Joplin.app/Contents/Resources/app.asar/node_modules/codemirror/lib/codemirror.js:1225:36)
    at highlightLine (/Users/adam/Applications/Joplin.app/Contents/Resources/app.asar/node_modules/codemirror/lib/codemirror.js:1071:5)
    at getLineStyles (/Users/adam/Applications/Joplin.app/Contents/Resources/app.asar/node_modules/codemirror/lib/codemirror.js:1115:20)
    at buildLineContent (/Users/adam/Applications/Joplin.app/Contents/Resources/app.asar/node_modules/codemirror/lib/codemirror.js:1748:40)
Component stack

    in ForwardRef(CodeMirror) (created by NoteEditor)
    in div (created by NoteEditor)
    in div (created by NoteEditor)
    in div (created by NoteEditor)
    in NoteEditor (created by Connect(NoteEditor))
    in Connect(NoteEditor) (created by ResizableLayout)
    in div (created by styled.div)
    in styled.div (created by ResizableLayout)
    in div (created by ResizableLayout)
    in div (created by ResizableLayout)
    in div (created by ResizableLayout)
    in ResizableLayout (created by MainScreenComponent)
    in div (created by MainScreenComponent)
    in MainScreenComponent (created by Connect(MainScreenComponent))
    in Connect(MainScreenComponent) (created by NavigatorComponent)
    in div (created by NavigatorComponent)
    in NavigatorComponent (created by Connect(NavigatorComponent))
    in Connect(NavigatorComponent) (created by RootComponent)
    in ThemeProvider (created by RootComponent)
    in StyleSheetManager (created by RootComponent)
    in RootComponent (created by Connect(RootComponent))
    in Connect(RootComponent)
    in ErrorBoundary
    in Provider

Looks like it's the same as this issue. It happens with base64 encoded images in notes.
I'm not sure what the best path is for you to recover from this. You'll probably have to open the database and remove the bad data.

If possible could you share the html content that caused the crash? I'll try to prepare a fix for it.

Hrm, suck. Maybe if I delete my Joplin preferences will that at least allow me to start without the problem note being selected?

Problem file is here (generated by exporting from Notes.app with Exporter):

Any suggestions on how to reset Joplin? I've tried:

  • deleting all directories in ~/Library which have joplin in their name
  • moving my Dropbox sync folder to a new location
  • deleting and reinstalling Joplin (with Homebrew)

And Joplin still is starting up in safemode with the problem file selected and immediately crashing.

I don't know if it's possible, but it would probably be a helpful of safe mode if it unselected files so that this didn't happen.

Many thanks,
Adam.

Never mind, I found it. In case anyone else has a similar problem in the future to reset Joplin on macOS you need to move/delete/rename ~/.config/joplin-desktop.

There's probably a better way then nuking the entire folder but that worked for me.

Just looked at the file and realised that its 23MB so that won't be helping!

Oof, I guess we now know that there's an upper limit on the size of notes that Joplin can handle. Funny enough, I tested the editor component that Joplin uses (the one that crashed) online and it seems like it can handle it just fine, so this is likely an issue with Joplin.

I won't have the time immediately, but your html file will be a big help to me (or someone else) who goes in to fix this. Thanks!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.