Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backslash(es) in markdown code let joplin freeze (forever) #5245

Closed
chrismade opened this issue Jul 26, 2021 · 8 comments · Fixed by #5278
Closed

backslash(es) in markdown code let joplin freeze (forever) #5245

chrismade opened this issue Jul 26, 2021 · 8 comments · Fixed by #5278
Labels
bug It's a bug desktop All desktop platforms high High priority issues

Comments

@chrismade
Copy link

Environment

Joplin version: Joplin 2.1.9 (prod, win32) - happened also on earlier version (but I was not able to deliver repro instructions)
Platform: win32
OS specifics:

Client ID: 9803ea6e019c41fc90ce229638d50153
Sync Version: 2
Profile Version: 39
Keychain Supported: No

Revision: 882d663

Steps to reproduce

  1. take a text like this
    D:\daten\muell>dir \s\b
    D:\daten\muell\boot.img
    D:\daten\muell\dtbo.img
    D:\daten\muell\install
    D:\daten\muell\META-INF
    D:\daten\muell\system.new.dat.br
    D:\daten\muell\system.patch.dat
    D:\daten\muell\system.transfer.list
    D:\daten\muell\vbmeta.img

  2. open any note - switch into markdown editor and find (or create a code block - using the 3 backticks )
    or doubleclick on an existing code in RTF editor which open the code editor
    try to insert with copy/paste the text from [1] or likely any other text that contains backslash like the text from [1]

  3. Joplin freezes immediately - reboot does not help - Joplin freezes on open - only remedy is to remove folder "JoplinProfile" and start re-sync (if you are lucky to have your notes synced somewhere - nextcloud in my case)

Describe what you expected to happen

expected to insert this text like any other text on paste -

if I replace all backslash by regular slash everything works as expected - text is inserted, no freeze

Logfile

I have the logfiles but it seems these do not contain any useful info regarding this issue as freeze happens immediately - of course I will upload logfile on request but instructions above should help to repro the case even without logfile

@chrismade chrismade added the bug It's a bug label Jul 26, 2021
@laurent22 laurent22 added desktop All desktop platforms high High priority issues labels Jul 26, 2021
@laurent22
Copy link
Owner

I cannot replicate this issue. Any chance you could switch to safe mode (Under Help menu), then right-click on the note and export as JEX? That way we'll have the exact note to replicate the issue.

@chrismade
Copy link
Author

@laurent22 - I agree the procedure above cannot repro the issue - but thanks to your instructions I created a note in "safe" mode, exported as JEX - and the moment I toggle from "safe" to "regular" it freezes -
07_08_2021.txt

file renamed from JEX to TXT - can you repro the issue with that file ?

@roman-r-m
Copy link
Collaborator

I can reproduce it with your file
This is coming from highlight.js, looks very similar to this issue highlightjs/highlight.js#2375 although that exact bug is fixed in the version Joplin is using.

@roman-r-m
Copy link
Collaborator

Upgrading highlight.js to the latest version fixes it.

@chrismade
Copy link
Author

wow I deeply impressed - I guess that's something which comes with the exe file and I can't fix it myself, right ?
btw - Joplin is an excellent tool, OneNote is now history for me (still need to convert a few hundred notes) - pls keep up the good work!

@roman-r-m
Copy link
Collaborator

wow I deeply impressed - I guess that's something which comes with the exe file and I can't fix it myself, right ?

i think setting language explicitly would help in this particular case. something like

```bat

...

```

@laurent22
Copy link
Owner

@roman-r-m, do you have a working version of it? And if so, any chance you could create a PR with it?

@roman-r-m
Copy link
Collaborator

Sure: #5278

I haven't tested it much, only verified that the above attached file no longer causes Joplin to freeze + a few basic checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It's a bug desktop All desktop platforms high High priority issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants