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

[BUG] Segfault #2937

Closed
InterestsFantastic opened this issue Dec 31, 2023 · 24 comments
Closed

[BUG] Segfault #2937

InterestsFantastic opened this issue Dec 31, 2023 · 24 comments
Labels
Severity: High Bugs or breaking changes with high impact Type: Bug - Regression
Milestone

Comments

@InterestsFantastic
Copy link

InterestsFantastic commented Dec 31, 2023

Actual behaviour

Program opens, displays everything except the contents of a note (i.e. it shows the notes list, etc.), then shuts down prior to showing the actual note itself.

Steps to reproduce

This happened after the most recent update. Rebooting system has no effect.

Output from the debug section in the settings dialog

I don't believe I'm able to get that in this case. However, I ran the program from terminal to generate something.

QMetaMethod::invoke: Unable to handle unregistered datatype 'LogWidget::LogType'
QMetaMethod::invoke: Unable to handle unregistered datatype 'LogWidget::LogType'
QMetaMethod::invoke: Unable to handle unregistered datatype 'LogWidget::LogType'
Warning: QBasicTimer::stop: Failed. Possibly trying to stop from a different thread ((null):0, (null))
QMetaMethod::invoke: Unable to handle unregistered datatype 'LogWidget::LogType'
Warning: QBasicTimer::stop: Failed. Possibly trying to stop from a different thread ((null):0, (null))
QMetaMethod::invoke: Unable to handle unregistered datatype 'LogWidget::LogType'
Warning: Missing trigrams for languages: QSet("fr_MC", "es_EC", "es_MX", "es_PA", "es_PE", "es_GT", "es_CL", "en_AU", "es_NI", "es_CO", "de_CH", "es_CR", "fr_CA", "es_PR", "es_CU", "es_AR", "it_CH", "fr_CH", "es_PY", "en_ZA", "es_HN", "es_US", "es_DO", "es_UY", "es_SV", "fr_LU", "es_BO", "en_CA", "es_VE", "fr_BE") ((null):0, (null))
Segmentation fault (core dumped)

@InterestsFantastic
Copy link
Author

Tried to set false checkSpelling at .config/PBE/QOwnNotes.conf but got:

QMetaMethod::invoke: Unable to handle unregistered datatype 'LogWidget::LogType'
QMetaMethod::invoke: Unable to handle unregistered datatype 'LogWidget::LogType'
QMetaMethod::invoke: Unable to handle unregistered datatype 'LogWidget::LogType'
Warning: QBasicTimer::stop: Failed. Possibly trying to stop from a different thread ((null):0, (null))
QMetaMethod::invoke: Unable to handle unregistered datatype 'LogWidget::LogType'
Warning: QBasicTimer::stop: Failed. Possibly trying to stop from a different thread ((null):0, (null))
QMetaMethod::invoke: Unable to handle unregistered datatype 'LogWidget::LogType'
Segmentation fault (core dumped)

So I guess that's actually better.

@pbek
Copy link
Owner

pbek commented Dec 31, 2023

I fear that comes from the threaded script update check of the current release, #2934.
On which platform did you have this?

@fdufnews
Copy link

fdufnews commented Dec 31, 2023

I got a similar problem, see log and platform information:

frederic@frederic-Desktop:~$ QOwnNotes
Info: Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. (:0, )
QMetaMethod::invoke: Unable to handle unregistered datatype 'LogWidget::LogType'
Info: "Serveur QOwnNotes écoute sur le port 22222" ((null):0, (null))
Warning: Missing trigrams for languages: QSet("fr_CA", "en_AU", "fr_MC", "fr_CH", "fr_BE", "en_ZA", "fr_LU") ((null):0, (null))
QMetaMethod::invoke: Unable to handle unregistered datatype 'LogWidget::LogType'
QMetaMethod::invoke: Unable to handle unregistered datatype 'LogWidget::LogType'
QMetaMethod::invoke: Unable to handle unregistered datatype 'LogWidget::LogType'
QMetaMethod::invoke: Unable to handle unregistered datatype 'LogWidget::LogType'
Warning: QBasicTimer::stop: Failed. Possibly trying to stop from a different thread ((null):0, (null))
QMetaMethod::invoke: Unable to handle unregistered datatype 'LogWidget::LogType'
Warning: QBasicTimer::stop: Failed. Possibly trying to stop from a different thread ((null):0, (null))
QMetaMethod::invoke: Unable to handle unregistered datatype 'LogWidget::LogType'
Erreur de segmentation (core dumped)
frederic@frederic-Desktop:~$ QOwnNotes --version
QOwnNotes 24.1.0
frederic@frederic-Desktop:~$ cat /etc/issue
Ubuntu 22.04.3 LTS \n \l

@pbek
Copy link
Owner

pbek commented Jan 1, 2024

Can you output and post a dump of the settings with the --dump-settings parameter?

And do you have the same issue when running QOwnNotes in a new session (see cli-parameters)?

@fdufnews
Copy link

fdufnews commented Jan 1, 2024

Here is the dump when executing in the original session
dump-settings.txt

When opening a new session, QOwnNotes seems to work without problem.
I can create a new note.
I have the following log in the terminal I opened the session in

frederic@frederic-Desktop:~$ QOwnNotes --session test
Info: Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. (:0, )
Info: "Note path '/home/frederic/temp/test' exists." (:0, )
Warning: fetchAll : QSqlError("", "Impossible de récupérer la ligne", "Pas de requête") ((null):0, (null))
QMetaMethod::invoke: Unable to handle unregistered datatype 'LogWidget::LogType'
Info: "Serveur QOwnNotes écoute sur le port 22222" ((null):0, (null))
Warning: Missing trigrams for languages: QSet("en_AU", "fr_MC", "fr_CH", "fr_BE", "en_ZA", "fr_LU", "fr_CA") ((null):0, (null))
Warning: QFont::setPointSizeF: Point size <= 0 (0.000000), must be greater than 0 ((null):0, (null))
QMetaMethod::invoke: Unable to handle unregistered datatype 'LogWidget::LogType'
QMetaMethod::invoke: Unable to handle unregistered datatype 'LogWidget::LogType'
Warning: QFont::setPointSizeF: Point size <= 0 (0.000000), must be greater than 0 ((null):0, (null))
Warning: QString::arg: Argument missing: Le fichier de notes renommé a été supprimé : % 1, /home/frederic/temp/test/Note 2024-01-01T11.26.01.md ((null):0, (null))
Info: "Le fichier de notes renommé a été supprimé : % 1" ((null):0, (null))

But when I try reopening the test session QOwnNotes crashes whith the same errors as reported before

frederic@frederic-Desktop:~$ QOwnNotes --session test
Info: Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. (:0, )
QMetaMethod::invoke: Unable to handle unregistered datatype 'LogWidget::LogType'
Info: "Serveur QOwnNotes écoute sur le port 22222" ((null):0, (null))
Warning: Missing trigrams for languages: QSet("fr_CH", "fr_BE", "en_ZA", "fr_LU", "fr_CA", "en_AU", "fr_MC") ((null):0, (null))
QMetaMethod::invoke: Unable to handle unregistered datatype 'LogWidget::LogType'
QMetaMethod::invoke: Unable to handle unregistered datatype 'LogWidget::LogType'
Warning: QBasicTimer::stop: Failed. Possibly trying to stop from a different thread ((null):0, (null))
QMetaMethod::invoke: Unable to handle unregistered datatype 'LogWidget::LogType'
Warning: QBasicTimer::stop: Failed. Possibly trying to stop from a different thread ((null):0, (null))
QMetaMethod::invoke: Unable to handle unregistered datatype 'LogWidget::LogType'
Erreur de segmentation (core dumped)

@o-l-a-v
Copy link

o-l-a-v commented Jan 1, 2024

I experience the same on Windows 11. Tried downloading a fresh ZIP v24.1.0 and starting it in portable mode. Worked first launch, next launch it crashed at start. Can't find logs, will provide them if I found out how.


Edit: Same with Flatpak version on Pop!_OS 22.04.

pop@pop-os:~$ flatpak run org.qownnotes.QOwnNotes
Gtk-Message: 13:17:54.230: Failed to load module "canberra-gtk-module"
Gtk-Message: 13:17:54.231: Failed to load module "canberra-gtk-module"
Warning: Could not find color scheme  "" (:0, )
Warning: Qt: Session management error: Could not open network socket (:0, )
QMetaMethod::invoke: Unable to handle unregistered datatype 'LogWidget::LogType'
Info: "QOwnNotes server listening on port 22222" ((null):0, (null))
Warning: Missing trigrams for languages: QSet("en_IL", "en_AU", "en_BZ", "en_ZA", "en_CA", "en_NA", "en_NZ", "en_JM", "en_TT", "en_ZW", "en_GH", "en_PH", "en_MW", "en_IN", "en_BS", "en_IE") ((null):0, (null))
QMetaMethod::invoke: Unable to handle unregistered datatype 'LogWidget::LogType'
QMetaMethod::invoke: Unable to handle unregistered datatype 'LogWidget::LogType'
Warning: QBasicTimer::stop: Failed. Possibly trying to stop from a different thread ((null):0, (null))
QMetaMethod::invoke: Unable to handle unregistered datatype 'LogWidget::LogType'
Warning: QBasicTimer::stop: Failed. Possibly trying to stop from a different thread ((null):0, (null))
QMetaMethod::invoke: Unable to handle unregistered datatype 'LogWidget::LogType'
Warning: QFont::setPointSizeF: Point size <= 0 (0.000000), must be greater than 0 ((null):0, (null))
pop@pop-os:~$ 

@pbek
Copy link
Owner

pbek commented Jan 1, 2024

But when I try reopening the test session QOwnNotes crashes whith the same errors as reported before

@fdufnews did you add / have some scripts in the test session?

I need to find a way to make it crash on a dev machine.

@pbek
Copy link
Owner

pbek commented Jan 1, 2024

Everyone here... Does the machine you are using with the crash use wifi?

@pbek pbek added Type: Bug - Regression Severity: High Bugs or breaking changes with high impact and removed Type: Support labels Jan 1, 2024
@fdufnews
Copy link

fdufnews commented Jan 1, 2024

I was using WiFi.
I just tested without WiFi with Ethernet and got the same behavior

@o-l-a-v
Copy link

o-l-a-v commented Jan 1, 2024

Everyone here... Does the machine you are using with the crash use wifi?

Windows machine (Dell XPS 7590) is a laptop with Wi-Fi disabled, ethernet from USB-C docking (Lenovo Thunderbolt 3 gen 2, 40AN).

Pop!_OS is a VMWare Workstation (free) VM on the Windows machine.

@pbek
Copy link
Owner

pbek commented Jan 1, 2024

Thank you. I found one box where I could reproduce it with certain settings. Working on it the last two hours.

pbek added a commit that referenced this issue Jan 1, 2024
@pbek
Copy link
Owner

pbek commented Jan 1, 2024

24.1.1

  • a crash on certain systems at startup after the script update check was fixed
    (for #2937)

@pbek pbek added this to the 24.1.1 milestone Jan 1, 2024
@pbek
Copy link
Owner

pbek commented Jan 1, 2024

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

@o-l-a-v
Copy link

o-l-a-v commented Jan 1, 2024

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

New version works on Windows. Snapcraft version works on Pop!_OS.

(Flathub version hasn't been updated yet, but the Snapcraft version has. What is preferred (Snap vs. Flatpak) from the author's point of view; does QOwnNotes behave as expected on both? 🙂)

@pbek
Copy link
Owner

pbek commented Jan 1, 2024

Thanks a lot for testing!

What is preferred (Snap vs. Flatpak) from the author's point of view; does QOwnNotes behave as expected on both? 🙂)

I don't have any preferences. I maintain the Snap, the Flatpak is more community maintained. Both have confinement with their own limitations. The one version most "under my control" is the AppImage (but of course with it AppImage limitations).
I guess the packages directly build for Ubuntu, Debian, openSUSE, Fedora, ... always work best.

@pbek
Copy link
Owner

pbek commented Jan 1, 2024

I will close this issue then.

@pbek pbek closed this as completed Jan 1, 2024
@fdufnews
Copy link

fdufnews commented Jan 1, 2024

Tested on Ubuntu and works great too.
Thanks a lot for being so quick to correct the bug.

@pbek
Copy link
Owner

pbek commented Jan 1, 2024

Thank you for testing! Threads are always very tricky and lead to all kinds of troubles. 😬 I wonder why I never could reproduce this on my main machine.

@InterestsFantastic
Copy link
Author

InterestsFantastic commented Jan 1, 2024

I fear that comes from the threaded script update check of the current release, #2934. On which platform did you have this?

Firstly, I get a message when starting (in the client, before it crashes) that says something like, "Notes directory has been modified externally."

Secondly, I'm running linux mint xfce on a 15.5 year old laptop. I love this beast. :)

I have two notes folders, switching between them in the left pane, and presently qownnotes wants to open the second notes folder upon load. I have on occasion moved notes between notes folders, using qownnotes.

Edit: Finally thanks very very very much for looking into this on a holiday. That's crazy and I appreciate it. Also, could you please provide me with a link, if you know of one, on how to develop with a compiled language? I'm used to python, so I just change the code and run the program again (I'm a noob that uses print statements for debugging). I'm a little worried that I would have to continuously compile things if I attempted to work with this source. I can't imagine that's how people do things in cpp...

@InterestsFantastic
Copy link
Author

Everyone here... Does the machine you are using with the crash use wifi?

Yes but I'm using this locally, just one computer. If I'm connecting to a server, I'm not doing it on purpose (e.g. if there's a local server in the backend that's used be default).

@InterestsFantastic
Copy link
Author

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

Awesome, works!

@pbek
Copy link
Owner

pbek commented Jan 1, 2024

Also, could you please provide me with a link, if you know of one, on how to develop with a compiled language?

You mean "how do you develop an application in C++ in general"? Or is this a QOwnNotes specific question?

@InterestsFantastic
Copy link
Author

Also, could you please provide me with a link, if you know of one, on how to develop with a compiled language?

You mean "how do you develop an application in C++ in general"? Or is this a QOwnNotes specific question?

In general, but with a specific eye to refactoring code efficiently would be nice.

@pbek
Copy link
Owner

pbek commented Jan 1, 2024

Sorry, I don't have any good references on that topic. 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Severity: High Bugs or breaking changes with high impact Type: Bug - Regression
Projects
None yet
Development

No branches or pull requests

4 participants