saturneric / GpgFrontend

A free, open-source, robust yet user-friendly, compact and cross-platform tool for OpenPGP encryption. It stands out as an exceptional GUI frontend for the modern GnuPG (gpg).
https://gpgfrontend.bktus.com
GNU General Public License v3.0
450 stars 43 forks source link

"Append fingerprint to editor" crashes if there is no editor open #123

Closed exaexa closed 6 months ago

exaexa commented 6 months ago

Hello,

the title describes it. Reproduce as follows:

I assume this is a simple unchecked reference to the editor or so, didn't have time to look at the code yet.

PS thanks for the software, it's great.

exaexa commented 6 months ago

PS I wasn't able to get a debug build but got this stacktrace from gdb, hope it helps:

0  0x00007ffff7d44c40 in GpgFrontend::UI::PlainTextEditorPage::GetTextPage() () at /home/exa/work/GpgFrontend/build/src/ui/libgpgfrontend_ui.so
#1  0x00007ffff7d981fd in GpgFrontend::UI::MainWindow::slot_append_keys_fingerprint() () at /home/exa/work/GpgFrontend/build/src/ui/libgpgfrontend_ui.so
#2  0x00007ffff6d7fb8e in  () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#3  0x00007ffff603a8e6 in QAction::triggered(bool) () at /lib/x86_64-linux-gnu/libQt6Gui.so.6
#4  0x00007ffff603fbd9 in QAction::activate(QAction::ActionEvent) () at /lib/x86_64-linux-gnu/libQt6Gui.so.6
#5  0x00007ffff7724b7a in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#6  0x00007ffff772532b in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#7  0x00007ffff75c8f9f in QWidget::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#8  0x00007ffff7582d22 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#9  0x00007ffff757b62e in QApplication::notify(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#10 0x00007ffff7cb6fd2 in GpgFrontend::UI::GpgFrontendApplication::notify(QObject*, QEvent*) () at /home/exa/work/GpgFrontend/build/src/ui/libgpgfrontend_ui.so
#11 0x00007ffff6d353f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#12 0x00007ffff7578238 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#13 0x00007ffff75d6fdf in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#14 0x00007ffff75d7d25 in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#15 0x00007ffff7582d22 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#16 0x00007ffff7cb6fd2 in GpgFrontend::UI::GpgFrontendApplication::notify(QObject*, QEvent*) () at /home/exa/work/GpgFrontend/build/src/ui/libgpgfrontend_ui.so
#17 0x00007ffff6d353f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#18 0x00007ffff5d8f6cb in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /lib/x86_64-linux-gnu/libQt6Gui.so.6
#19 0x00007ffff5dd891c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Gui.so.6
#20 0x00007ffff206dc0e in  () at /lib/x86_64-linux-gnu/libQt6XcbQpa.so.6
#21 0x00007ffff57111f4 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007ffff5714317 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007ffff5714930 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007ffff6f22d10 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#25 0x00007ffff6d3f73a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#26 0x00007ffff7727793 in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#27 0x00007ffff77278b3 in QMenu::exec(QPoint const&, QAction*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#28 0x00007ffff7d36890 in GpgFrontend::UI::KeyList::contextMenuEvent(QContextMenuEvent*) () at /home/exa/work/GpgFrontend/build/src/ui/libgpgfrontend_ui.so
#29 0x00007ffff75c952e in QWidget::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#30 0x00007ffff7582d22 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#31 0x00007ffff757c4df in QApplication::notify(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#32 0x00007ffff7cb6fd2 in GpgFrontend::UI::GpgFrontendApplication::notify(QObject*, QEvent*) () at /home/exa/work/GpgFrontend/build/src/ui/libgpgfrontend_ui.so
#33 0x00007ffff6d353f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#34 0x00007ffff75d6aed in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#35 0x00007ffff75d7d25 in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#36 0x00007ffff7582d22 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#37 0x00007ffff7cb6fd2 in GpgFrontend::UI::GpgFrontendApplication::notify(QObject*, QEvent*) () at /home/exa/work/GpgFrontend/build/src/ui/libgpgfrontend_ui.so
#38 0x00007ffff6d353f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#39 0x00007ffff5d8f6cb in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /lib/x86_64-linux-gnu/libQt6Gui.so.6
#40 0x00007ffff5dd891c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Gui.so.6
#41 0x00007ffff206dc0e in  () at /lib/x86_64-linux-gnu/libQt6XcbQpa.so.6
#42 0x00007ffff57111f4 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#43 0x00007ffff5714317 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#44 0x00007ffff5714930 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#45 0x00007ffff6f22d10 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#46 0x00007ffff6d3f73a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#47 0x00007ffff6d382da in QCoreApplication::exec() () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#48 0x00007ffff7cbf315 in GpgFrontend::UI::RunGpgFrontendUI(QApplication*) () at /home/exa/work/GpgFrontend/build/src/ui/libgpgfrontend_ui.so
#49 0x000055555557490c in main ()
exaexa commented 6 months ago

Perfect, thanks a lot!