Created attachment 163391 [details] gdb /usr/bin/ghostwriter 2>&1 | tee ~/ghostwriter.log SUMMARY Ghostwriter won't start / immediately crashes if qt5-qtpbfimageformat is installed since it needs to construct a QGuiApplication before accessing QFontDatabase For discussion of the cause see: https://github.com/tumic0/QtPBFImagePlugin/issues/7 Reference to the bug report in Fedora which blames ghostwriter: https://bugzilla.redhat.com/show_bug.cgi?id=2225531 Version-Release number of selected component (if applicable): ghostwriter 23.08.01 qt5-qtpbfimageformat-2.3-9 How reproducible: Reliably STEPS TO REPRODUCE 1. Install qt5-qtpbfimageformat-2.3-9 2. Install ghostwriter 23.08.01 3. Start ghostwriter (using Fedora 38 - fc38.x86_64 ) OBSERVED RESULT Terminal output: """ QFontDatabase: Must construct a QGuiApplication before accessing QFontDatabase Aborted (core dumped) """ EXPECTED RESULT Ghostwriter starts as intended. Additional info: Uninstalling qt5-qtpbfimageformat fixes the issue This issue has been discussed before upstream: https://github.com/tumic0/QtPBFImagePlugin/issues/7 Attached is the output of gdb /usr/bin/ghostwriter 2>&1 | tee ~/ghostwriter.log 1. 2. 3. OBSERVED RESULT EXPECTED RESULT SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION
In markdowneditor.cpp:179 ghostwriter calls the QImage API (through the static function buildImageReaderFormats() ) before QGuiApplication is created.
Recent port to Qt6 should resolve this issue.
(In reply to megan.conkle from comment #2) > Recent port to Qt6 should resolve this issue. A bare port to Qt6 will definitely not fix anything, you have to fix the broken initialization code in Ghostwriter. You can not rely on the trigger of the Ghostwriter bug going away by switching to Qt6 with qt5-qtpbfimageformat not being used anymore as there is also a Qt6 version of the plugin. Moreover, __any Qt image plugin may crash Ghostwriter__ at any time when it decides to use functions from the QtGUI API which is perfectly legal for a Qt image plugin.