Closed butty2017 closed 2 years ago
I cannot reproduce your seqmentation fault with this note:
Preview Issue
===========
```
/home/butty/misc/Downloads/QOwnNotes-develop/src/mainwindow.cpp:62: error: QJSEngine: No such file or directory
../src/mainwindow.cpp:62:10: fatal error: QJSEngine: No such file or directory
62 | #include
| ^~~~~~~~~~~
```
Do you get a segmentation fault with above note, @butty2017?
But I get a preview issue, @Waqar144...
Yes, SegV occured with the note.
I think you have to replace two "..."s in the note (top and bottom) with code block mark (three `s). But, if you did so and no SegV, I would like to send you another note (maybe the real one).
Yes, please post a note that actually crashes QOwnNotes. Even better, make that note as small as you can by removing data that doesn't crash for you.
@Waqar144, I was able to trim the note down to this:
Preview Issue
===========
```
~~~~~~
```
6 tilde characters in a code block with a newline at the end of the note. If there is no newline then there is a different preview error. 😁
fixed, though we can just check for "nested code blocks" more carefully and avoid such issues.
Awesome! Thanks a lot!
~~~~~~
in a code block was fixed
(for #2288, thank you, @Waqar144)There now is a new release, could you please test it and report if it works for you?
Yes. Now, QON does not get down with the note any more.
Thank you very much!
Great, thank you for testing!
Expected behaviour
Code blocks are shown in the editor and preview panes.
Actual behaviour
QON gets down with Segmentation fault.
Steps to reproduce
Sample note in problem: ... /home/butty/misc/Downloads/QOwnNotes-develop/src/mainwindow.cpp:62: error: QJSEngine: No such file or directory ../src/mainwindow.cpp:62:10: fatal error: QJSEngine: No such file or directory 62 | #include
| ^
~~...Additional info. and comments.
Relevant log output in the Log panel
Expand
``` (Taken from console) [Nov 02 16:07:55] [debug]: reloadTagTree - 'noteSubFolderIds': QVector() [Nov 02 16:08:03] [debug]: Code block of lang detected: "" 0 [Nov 02 16:08:03] [debug]: Code block of lang detected: "" 0 [Nov 02 16:08:03] [debug]: Code block of lang detected: "" 0 : Segmentation fault ```Information about the application, settings and environment
Expand
QOwnNotes Debug Information =========================== ## General Info **Current Date**: `Tue Nov 2 17:05:37 2021` **Version**: `21.11.1` **Build date**: `Nov 1 2021` **Build number**: `908` **Platform**: `linux` **Operating System**: `Linux Mint 20.2` **Build architecture**: `x86_64` **Current architecture**: `x86_64` **Release**: `Launchpad PPA` **Qt Version (build)**: `5.12.8` **Qt Version (runtime)**: `5.12.8` **Portable mode**: `no` **Settings path / key**: `/home/butty/.config/PBE/QOwnNotes.conf` **Application database path**: `/home/butty/.local/share/PBE/QOwnNotes/QOwnNotes.sqlite` **Application arguments**: `QOwnNotes` **Qt Debug**: `0` **Locale (system)**: `en_US` **Locale (interface)**: *empty* **Primary screen resolution**: `1920x1200` **Screen resolution(s)**: `1920x1200, 1280x1024` **Icon theme**: `Adwaita` **Notes in current note folder**: `9` **Calendar items**: `0` **Enabled scripts**: `0` ## Server Info **serverUrl**: *empty* **appIsValid**: `yes` **notesPathExists**: *empty* **serverVersion**: *empty* **appVersion**: *empty* ## Spellchecking **Enabled**: `false` **Selected language**: `en_US` **Language codes**: `en_US` **Language names**: `American English (United States)` **Application dictionaries path**: `/home/butty/.local/share/PBE/QOwnNotes/dicts` ## Note folders **currentNoteFolderId**: `3` ### Note folder `NC` **id**: `1` **isCurrent**: `no` **activeTagId**: `0` **localPath**: `/home/butty/Documents/QOwnNotes/Notes` **remotePath**: `Documents/QOwnNotes` **cloudConnectionId**: `1` **isShowSubfolders**: `yes` **isUseGit**: `yes` **activeNoteSubFolder name**: *empty* **database file**: `/home/butty/Documents/QOwnNotes/Notes/notes.sqlite` ### Note folder `Joplin work` **id**: `2` **isCurrent**: `no` **activeTagId**: `-1` **localPath**: `/home/butty/tmp/jop-qon-tmp` **remotePath**: *empty* **cloudConnectionId**: `1` **isShowSubfolders**: `no` **isUseGit**: `no` **activeNoteSubFolder name**: *empty* **database file**: `/home/butty/tmp/jop-qon-tmp/notes.sqlite` ### Note folder `Notes` **id**: `3` **isCurrent**: `yes` **activeTagId**: `0` **localPath**: `/home/butty/Documents/QOwnNotes/Notes` **remotePath**: *empty* **cloudConnectionId**: `1` **isShowSubfolders**: `no` **isUseGit**: `no` **activeNoteSubFolder name**: *empty* **database file**: `/home/butty/Documents/QOwnNotes/Notes/notes.sqlite` ## Cloud connections ### Cloud connection `` **id**: `1` **isCurrent**: `yes` **serverUrl**: *empty* **username**: *empty* ## Enabled scripts ## Settings **AboutDialog/geometry** (QByteArray): `