pbek / QOwnNotes

QOwnNotes is a plain-text file notepad and todo-list manager with Markdown support and Nextcloud / ownCloud integration.
https://www.qownnotes.org/
GNU General Public License v2.0
4.6k stars 409 forks source link

QOwnNotes almost always crash when I close it (openSUSE Tumbleweed with fcitx) #1290

Closed iclementine closed 4 years ago

iclementine commented 5 years ago

QownNotes always crash when I close it. I have this problem on openSUSE Tumbleweed. (The smae is on 15.1.) The debug info is uploaded above, but I don't know why. May this will help. Thank you!

QOwnNotes Debug Information

General Info

Current Date: 周四 9月 12 20:26:13 2019 Version: 19.9.8 Build date: Sep 11 2019 Build number: 578 Platform: linux Operating System: openSUSE Tumbleweed Build architecture: x86_64 Current architecture: x86_64 Release: OBS Qt Version (build): 5.13.0 Qt Version (runtime): 5.13.0 Portable mode: no Settings path / key: /home/clementine/.config/PBE/QOwnNotes.conf Application database path: /home/clementine/.local/share/PBE/QOwnNotes/QOwnNotes.sqlite Application arguments: /usr/bin/QOwnNotes Qt Debug: 0 Locale (system): zh_CN Locale (interface): empty Icon theme: breeze Notes in current note folder: 3 Calendar items: 0 Enabled scripts: 0

Server Info

serverUrl: empty appIsValid: yes notesPathExists: empty serverVersion: empty appVersion: empty

Note folders

currentNoteFolderId: 1

Note folder default

id: 1 isCurrent: yes activeTagId: 0 localPath: /home/clementine/Nextcloud/Notes remotePath: Notes isShowSubfolders: no isUseGit: no activeNoteSubFolder name: empty database file: /home/clementine/Nextcloud/Notes/notes.sqlite

Enabled scripts

Settings

ActiveNoteHistoryItem (NoteHistoryItem): <binary data> Debug/fakeOldVersionNumber (QString): false Debug/fileLogging (QString): false Editor/CurrentSchemaKey (QString): EditorColorSchema-6033d61b-cb96-46d5-a3a8-20d5172017eb Editor/autoBracketClosing (QString): true Editor/autoBracketRemoval (QString): true Editor/disableCursorBlinking (QString): false Editor/editorWidthInDFMOnly (QString): true Editor/highlightCurrentLine (QString): true Editor/vimMode (QString): false LastUpdateCheck (QDateTime): 2019-09-12T20:25:59.071 MainWindow/geometry (QByteArray): <binary data> MainWindow/mainToolBar.iconSize (QString): 22 MainWindow/menuBarGeometry (QByteArray): <binary data> MainWindow/noteTextEdit.code.font (QString): Hack,9,-1,5,50,0,0,0,0,0,Regular MainWindow/noteTextEdit.font (QString): Noto Sans,10,-1,5,50,0,0,0,0,0,Regular MainWindow/noteTextView.code.font (QString): Hack,9,-1,5,50,0,0,0,0,0,Regular MainWindow/noteTextView.font (QString): Noto Sans,10,-1,5,50,0,0,0,0,0,Regular MainWindow/noteTextView.ignoreCodeFontSize (QString): true MainWindow/noteTextView.rtl (QString): false MainWindow/noteTextView.underline (QString): true MainWindow/showNotesFromAllNoteSubFolders (bool): true NoteHistory-1 (QVariantList): <variant list with 3 item(s)> NoteHistoryCurrentIndex-1 (QString): 2 PiwikClientId (QString): <hidden> SearchEngineId (QString): 2 SettingsDialog/geometry (QByteArray): <binary data> SettingsDialog/mainSplitterState (QByteArray): <binary data> ShowSystemTray (QString): false StartHidden (QString): false WelcomeDialog/geometry (QByteArray): <binary data> acceptAllExternalModifications (QString): false allowDifferentNoteFileName (QString): false allowNoteEditing (bool): true allowOnlyOneAppInstance (QString): false appMetrics/disableAppHeartbeat (QString): false appMetrics/disableTracking (QString): false appMetrics/notificationShown (QString): true automaticNoteFolderDatabaseClosing (QString): false closeTodoListAfterSave (QString): false cryptoKey (QString): <hidden> currentNoteFolderId (QString): 1 currentWorkspace (QString): initial cursorWidth (QString): 1 customNoteFileExtensionList: empty darkMode (QString): false darkModeColors (QString): false darkModeIconTheme (QString): false darkModeTrayIcon (QString): false defaultNoteFileExtension (QString): md demoNotesCreated (QString): true disableAutomaticUpdateDialog (QString): true disableSavedSearchesAutoCompletion (QString): false dockWasInitializedOnce (QString): true enableSocketServer (QString): true externalEditorPath (QString): empty fullyHighlightedBlockquotes (QString): false gitCommitInterval (QString): 30 gitExecutablePath (QString): empty gitLogCommand (QString): empty guiFirstRunInit (bool): true ignoreAllExternalModifications (QString): false ignoreAllExternalNoteFolderChanges (QString): false ignoreNoteSubFolders (QString): ^\. imageScaleDown (QString): false imageScaleDownMaximumHeight (QString): 1024 imageScaleDownMaximumWidth (QString): 1024 initialLayoutIdentifier (QString): minimal insertTimeFormat (QString): empty interfaceFontSize (QString): 11 interfaceLanguage (QString): empty internalIconTheme (QString): false itemHeight (QString): 24 localTrash/autoCleanupDays (QString): 30 localTrash/autoCleanupEnabled (QString): true localTrash/supportEnabled (QString): true markdownHighlightingEnabled (QString): true navigationPanelHideSearch (QString): false networking/ignoreSSLErrors (QString): true networking/proxyType (QString): 2 newNoteAskHeadline (QString): false noteEditIsCentralWidget (QString): true noteListPreview (QString): false noteSaveIntervalTime (QString): 10 noteSubfoldersPanelDisplayAsFullTree (QString): true noteSubfoldersPanelHideSearch (QString): false noteSubfoldersPanelOrder (QString): 0 noteSubfoldersPanelShowFullPath (QString): false noteSubfoldersPanelShowNotesRecursively (QString): false noteSubfoldersPanelShowRootFolderName (QString): true noteSubfoldersPanelSort (QString): 0 notesPanelOrder (QString): 0 notesPanelSort (QString): 1 notesPath (QString): /home/clementine/Nextcloud/Notes notifyAllExternalModifications (QString): false overrideInterfaceFontSize (QString): false ownCloud/password (QString): <hidden> ownCloud/serverUrl (QString): empty ownCloud/supportEnabled (QString): false ownCloud/todoCalendarBackend (QString): 3 ownCloud/todoCalendarCalDAVPassword (QString): <hidden> ownCloud/todoCalendarCalDAVServerUrl (QString): empty ownCloud/todoCalendarCalDAVUsername (QString): empty ownCloud/todoCalendarDisplayNameList: empty ownCloud/todoCalendarEnabledList: empty ownCloud/todoCalendarEnabledUrlList: empty ownCloud/todoCalendarUrlList: empty ownCloud/userName (QString): empty ownCloudInfo/appIsValid (bool): true ownCloudInfo/connectionErrorMessage (QString): empty ownCloudInfo/notesPathExistsText (QString): empty ownCloudInfo/serverVersion (QString): empty restoreCursorPosition (QString): true showMenuBar (bool): true showStatusBar (bool): true systemIconTheme (QString): false taggingShowNotesRecursively (QString): false tagsPanelHideSearch (QString): false tagsPanelOrder (QString): 0 tagsPanelSort (QString): 0 toolbar/1/items (QStringList): action_New_note, action_Find_note, action_Remove_note, action_Open_note_in_external_editor, actionShow_local_trash, actionAllow_note_editing, , action_Back_in_note_history, action_Forward_in_note_history, , action_Find_text_in_note, actionReplace_in_current_note, , actionShow_versions, actionShow_trash, actionShare_note, , actionOpen_List toolbar/1/name (QString): mainToolBar toolbar/1/title (QString): main toolbar toolbar/2/items (QStringList): actionFormat_text_bold, actionFormat_text_italic, actionStrike_out_text, actionInsert_code_block, actionInsert_block_quote toolbar/2/name (QString): formattingToolbar toolbar/2/title (QString): formatting toolbar toolbar/3/items (QStringList): actionInsert_Link_to_note, actionInsert_image, actionInsert_current_time toolbar/3/name (QString): insertingToolbar toolbar/3/title (QString): inserting toolbar toolbar/4/items (QStringList): action_Encrypt_note, actionEdit_encrypted_note, actionDecrypt_note toolbar/4/name (QString): encryptionToolbar toolbar/4/title (QString): encryption toolbar toolbar/5/items (QStringList): actionWorkspaceComboBox, actionStore_as_new_workspace, actionRemove_current_workspace, actionRename_current_workspace, actionSwitch_to_previous_workspace, actionUnlock_panels, , actionToggle_distraction_free_mode, action_Increase_note_text_size, action_Decrease_note_text_size, action_Reset_note_text_size toolbar/5/name (QString): windowToolbar toolbar/5/title (QString): window toolbar toolbar/6/items (QString): action_Quit toolbar/6/name (QString): quitToolbar toolbar/6/title (QString): quit toolbar toolbar/size (QString): 6 useUNIXNewline (QString): false webSocketServerService/bookmarksNoteName (QString): Bookmarks webSocketServerService/bookmarksTag (QString): bookmarks webSocketServerService/port (QString): 22222 workspace-initial/name (QString): Minimal workspace-initial/noteSubFolderDockWidgetVisible (QString): true workspace-initial/windowState (QByteArray): <binary data> workspaces (QString): initial

System environment

SHELL: /bin/bash COLORTERM: 1 XDG_CONFIG_DIRS: /etc/xdg LESS: -M -I -R QT_SYSTEM_DIR: /usr/share/desktop-data XDG_SESSION_PATH: /org/freedesktop/DisplayManager/Session2 GTK_IM_MODULE: fcitx MACHTYPE: x86_64-suse-linux GTK2_MODULES: unity-gtk-module G_BROKEN_FILENAMES: 1 HOSTNAME: install HISTSIZE: 1000 FROM_HEADER: empty MINICOM: -c on MAN_KEEP_FORMATTING: yes AUDIODRIVER: pulseaudio INPUT_METHOD: fcitx CPU: x86_64 XMODIFIERS: @im=fcitx DESKTOP_SESSION: /usr/share/xsessions/plasma5 GPG_TTY: 不是一个 tty GTK_MODULES: canberra-gtk-module XDG_SEAT: seat0 PWD: /home/clementine QEMU_AUDIO_DRV: pa XDG_SESSION_DESKTOP: KDE LOGNAME: clementine XDG_SESSION_TYPE: x11 MANPATH: /usr/local/man:/usr/share/man XAUTHORITY: /home/clementine/.Xauthority XKEYSYMDB: /usr/X11R6/lib/X11/XKeysymDB XNLSPATH: /usr/share/X11/nls HOME: /home/clementine SSH_ASKPASS: /usr/lib/ssh/ssh-askpass LANG: zh_CN.UTF-8 XDG_CURRENT_DESKTOP: KDE OSTYPE: linux XDG_SEAT_PATH: /org/freedesktop/DisplayManager/Seat0 QT_IM_SWITCHER: imsw-multi LESS_ADVANCED_PREPROCESSOR: no XSESSION_IS_UP: yes KDE_SESSION_UID: 1000 LESSCLOSE: lessclose.sh %s %s XDG_SESSION_CLASS: user TERM: xterm G_FILENAME_ENCODING: @locale,UTF-8,GB2312,GB18030,GBK,ISO-8859-1 HOST: install XAUTHLOCALHOSTNAME: install LESSOPEN: lessopen.sh %s USER: clementine SDL_AUDIODRIVER: pulse KDE_SESSION_VERSION: 5 MORE: -sl CSHEDIT: emacs DISPLAY: :0 SHLVL: 1 WINDOWMANAGER: /usr/bin/startkde PAGER: less QT_IM_MODULE: fcitx XDG_VTNR: 7 UBUNTU_MENUPROXY: 1 XDG_SESSION_ID: 2 GS_LIB: /home/clementine/.fonts LC_CTYPE: zh_CN.UTF-8 XDG_RUNTIME_DIR: /run/user/1000 QT_AUTO_SCREEN_SCALE_FACTOR: 0 XCURSOR_THEME: breeze_cursors GTK3_MODULES: unity-gtk-module XDG_DATA_DIRS: /home/clementine/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share KDE_FULL_SESSION: true PATH: /home/clementine/bin:/usr/local/bin:/usr/bin:/bin DBUS_SESSION_BUS_ADDRESS: unix:path=/run/user/1000/bus PROFILEREAD: true MAIL: /var/spool/mail/clementine HOSTTYPE: x86_64 LESSKEY: /etc/lesskey.bin _: /usr/lib64/libexec/kf5/start_kdeinit_wrapper GTK_RC_FILES: /etc/gtk/gtkrc:/home/clementine/.gtkrc:/home/clementine/.config/gtkrc GTK2_RC_FILES: /etc/gtk-2.0/gtkrc:/home/clementine/.gtkrc-2.0:/home/clementine/.config/gtkrc-2.0 SESSION_MANAGER: local/install:@/tmp/.ICE-unix/2144,unix/install:/tmp/.ICE-unix/2144

pbek commented 5 years ago

Have you installed the debug modules of QOwnNotes? A core dump would be nice.

pbek commented 5 years ago

I cannot confirm this problem on my openSUSE Leap VM, no crashes there. @euneuber can you confirm crashes?

euneuber commented 5 years ago

No crashes in openSuse Leap 15.1 x64

pbek commented 5 years ago

Thank you!

iclementine commented 5 years ago

Have you installed the debug modules of QOwnNotes? A core dump would be nice.

I generate the core dump file. How am I supposed to use it?

pbek commented 5 years ago

I'm especially interested in just the stack trace of the calls that caused the crash.

iclementine commented 5 years ago

call stack.txt Is this the right information? (I gdb QOwnNotes core_dump_file and typed bt full and saved the results.)

pbek commented 5 years ago

Thank you, that was what I'm talking about. But I think can't see a segmentation fault in the file. Did QOwnNotes crash in that run? What happens if you run QOwnNotes directly from gdb?

iclementine commented 4 years ago

Thank you, that was what I'm talking about. But I think can't see a segmentation fault in the file. Did QOwnNotes crash in that run? What happens if you run QOwnNotes directly from gdb?

I updated qownnotes and tried again, and catched a segmentation fault now. (I run gdb QOwnNotes, and close QOwnNotes by clicking the cross button of the window. I would get a Dr. Konqi alert that QOwnNotes quited unexpectedly. Sometimes, closing QOwnNotes with Gtrl Q does not invoke that alert.) stack_trace2.txt

pbek commented 4 years ago

Thank you, that part was the helpful one:

Warning: QFileSystemWatcher::removePaths: list is empty ((null):0, (null))

Thread 1 "QOwnNotes" received signal SIGSEGV, Segmentation fault.
0x00007ffff65a65f8 in QObject::property(char const*) const () from /usr/lib64/libQt5Core.so.5
(gdb) bt full
#0  0x00007ffff65a65f8 in QObject::property(char const*) const () from /usr/lib64/libQt5Core.so.5
No symbol table info available.
#1  0x000055555562de65 in MainWindow::instance() ()
No symbol table info available.
#2  0x00005555557a3265 in LogWidget::logMessageOutput(QtMsgType, QMessageLogContext const&, QString const&) ()
No symbol table info available.
#3  0x00007ffff63a4e61 in ?? () from /usr/lib64/libQt5Core.so.5
No symbol table info available.
#4  0x00007ffff63a4f79 in ?? () from /usr/lib64/libQt5Core.so.5
No symbol table info available.
#5  0x00007ffff637431c in QMessageLogger::warning(char const*, ...) const () from /usr/lib64/libQt5Core.so.5

Seems that a warning (which isn't the problem) is written to your log panel while the panel is already gone while quitting. I tried to prevent that as good as possible quite a while ago.

iclementine commented 4 years ago

Seems that a warning (which isn't the problem) is written to your log panel while the panel is already gone while quitting. I tried to prevent that as good as possible quite a while ago.

Thank you! I'am looking forward to it~

pbek commented 4 years ago

Warning: QFileSystemWatcher::removePaths: list is empty ((null):0, (null))

It's really strange. Not even such a warning is supposed to appear, because there is a check if the list is empty. I cannot even reproduce this warning.

https://github.com/pbek/QOwnNotes/blob/a0c61aa7e7e0a31c2c30a40fdafeaa3ab1acd6fe/src/mainwindow.cpp#L3176-L3181

Other Tumbleweed users seems to have had a similar issue with other apps: https://bugreports.qt.io/browse/QTBUG-68607

pbek commented 4 years ago

As for LogWidget::logMessageOutput, logging to the log widget is disabled when the app is shut down... I don't see a way that it could have caused the seg fault.

pbek commented 4 years ago

19.9.11

pbek commented 4 years ago

There now is a new release, could you please test it and report if it works for you?

iclementine commented 4 years ago

There now is a new release, could you please test it and report if it works for you?

Thank you! I haved tested it, and it gave the same results. It should a problem of tumbleweed.

pbek commented 4 years ago

You tested 19.9.11? What same result? Did QOwnNotes still crash when quitting with Ctrl + Q? Can you please send a stack trace again.

iclementine commented 4 years ago

You tested 19.9.11? What same result? Did QOwnNotes still crash when quitting with Ctrl + Q? Can you please send a stack trace again.

Yes, quitting with Ctrl Q cause a segmentation fault, too. And I thought of fcitx, maybe it was the reason. Then I uninstall fcitx and its qt5 plugin, the crash disppeared. I would send a stack trace after I reinstall fcitx and its qt5 plugin.

pbek commented 4 years ago

I wonder how fcitx can crash QOwnNotes...

iclementine commented 4 years ago

no_fcitx.txt with_fcitx.txt

Here is the stack trace. Fcitx interacts with Qt5 and qt-5 apps with a libfcitxplatforminputcontextplugin.so at /usr/lib64/qt5/plugins/platforminputcontexts/.

When I've installed fcitx and used a Chinese input method with QOwnNotes, like sunpinyin, google pinyin or rime, QOwnNotes would crash at quitting.

Tumbleweed preinstalls fcitx if the language setting is Chinese, because input method is a necesary tool for Chinese users. (And korean and Japanese users may also need an input method, too.)

pbek commented 4 years ago

The warning Warning: QFileSystemWatcher::removePaths: list is empty ((null):0, (null)) is still in, so it seems fcitx is throwing it.

Do you have the log panel enabled in QOwnNots. If yes, does QOwnNotes also crash if turn it off?

iclementine commented 4 years ago

The warning Warning: QFileSystemWatcher::removePaths: list is empty ((null):0, (null)) is still in, so it seems fcitx is throwing it.

Do you have the log panel enabled in QOwnNots. If yes, does QOwnNotes also crash if turn it off?

(Been busy for several days..., sorry for a late reply) No, I do not enable log panel in QOwnNotes.

pbek commented 4 years ago

Oh, then I have even less idea of how that crash happens. It really seems to me that fcitx is crashing and taking QOwnNotes with it.

iclementine commented 4 years ago

Oh, then I have even less idea of how that crash happens. It really seems to me that fcitx is crashing and taking QOwnNotes with it.

Also, fcitx is now archived and inactive in development. Fcitx5 is the new version to replace fcitx 4. May be things would be better with fcitx 5.

iclementine commented 4 years ago

I reported the bug to fcitx developers. It turned out to be a known bug.

https://bugreports.qt.io/browse/QTBUG-68607 https://gitlab.com/fcitx/fcitx-qt5/merge_requests/25

Now it is fixed.

pbek commented 4 years ago

Awesome! Thank you very much!