trilium icon indicating copy to clipboard operation
trilium copied to clipboard

(Bug report) mermaid caused trilium hang forever

Open gao-feng opened this issue 1 year ago • 11 comments
trafficstars

Trilium Version

0.62.4

What operating system are you using?

Windows

What is your setup?

Local (no sync)

Operating System Version

Windows 10

Description

I wrote mermail flowchart as follow:

flowchart TD

aaa(-->bbb

this will cause trilium hang

Error logs

No response

gao-feng avatar Dec 13 '23 07:12 gao-feng

Hello, I can't reproduce this on Linux at least. I remember something like this happening in the past, though. Mermaid having infinite cycle or something. Unfortunately Trilium can't catch such Mermaid bugs due to lack of isolation.

zadam avatar Dec 27 '23 21:12 zadam

How can I recover from this? I'm currently facing a mermaid hang, I tried to open it in the browser and the tab hangs, desktop app hangs, i can't use trilium now :/

Alumniminium avatar Feb 01 '24 19:02 Alumniminium

Trilium may have a backup for you that you can restore from. See here: https://github.com/zadam/trilium/wiki/Backup#restoring-backup

meichthys avatar Feb 01 '24 20:02 meichthys

Alternatively, you can open the database manually and delete the revision or note specifically, if you're able to find it

sigaloid avatar Feb 01 '24 20:02 sigaloid

jesus christ...

how come other apps with embedded mermaid dont suffer from this

Edit: i restored the backup from my desktop app, killed the internet, deleted the old version of the node, restored internet, synced, and deleted the note again without opening it. That saved me from losing any other work.

Edit 2: Don't do the above. Was unable to sync afterwards, had to delete everything and re-import...

Alumniminium avatar Feb 01 '24 21:02 Alumniminium

@Alumniminium what client were you using? Windows, Linux, web?

meichthys avatar Feb 02 '24 00:02 meichthys

Linux and web, latest version

Alumniminium avatar Feb 02 '24 07:02 Alumniminium

@Alumniminium Do you know the mermaid diagram content? I can't reproduce this on windows desktop when using the sample mermaid code from @gao-feng image

meichthys avatar Feb 02 '24 13:02 meichthys

No sorry.

Alumniminium avatar Feb 02 '24 15:02 Alumniminium

Ok, if this happens to you again, or if you can reproduce this, please try to capture some logs or additional information so we can investigate further.

meichthys avatar Feb 02 '24 15:02 meichthys

Hello, sorry for this bad experience. The way to recover from this problem is described here: https://github.com/zadam/trilium/wiki/Troubleshooting#broken-note-crashes-trilium

zadam avatar Feb 16 '24 10:02 zadam