Bug 462965 - Crash when opening GMic filter window
Summary: Crash when opening GMic filter window
Status: RESOLVED UPSTREAM
Alias: None
Product: krita
Classification: Applications
Component: General (other bugs)
Version First Reported In: 5.1.3
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2022-12-12 19:16 UTC by Martino Ferrari
Modified: 2022-12-12 22:02 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martino Ferrari 2022-12-12 19:16:22 UTC
Application: krita (5.1.3)

Qt Version: 5.15.7
Frameworks Version: 5.101.0
Operating System: Linux 6.0.12-arch1-1 x86_64
Windowing System: X11
Distribution: "Arch Linux"
DrKonqi: 5.26.4 [KCrashBackend]

-- Information about the crash:
Opening GMIC filter window will instantly crash Krita. 
No log left in the console.
Using Arch and XMonad as window manager.

The crash can be reproduced every time.

-- Backtrace:
Application: Krita (krita), signal: Segmentation fault

[KCrash Handler]
#4  0x00007f888f8e02a8 in QThread::isRunning() const () at /usr/lib/libQt5Core.so.5
#5  0x00007f87f5ec97df in GmicQt::GmicProcessor::onPreviewThreadFinished() () at /usr/lib/kritaplugins/krita_gmic_qt.so
#6  0x00007f888fab0be0 in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5
#7  0x00007f8890778b1c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#8  0x00007f8891a19d8f in KisApplication::notify(QObject*, QEvent*) () at /usr/lib/libkritaui.so.18
#9  0x00007f888fa8cf98 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#10 0x00007f888fa8daa3 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/libQt5Core.so.5
#11 0x00007f888fad3e68 in  () at /usr/lib/libQt5Core.so.5
#12 0x00007f888d31687b in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#13 0x00007f888d36d299 in  () at /usr/lib/libglib-2.0.so.0
#14 0x00007f888d315132 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#15 0x00007f888fad7c4c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#16 0x00007f888fa8573c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#17 0x00007f87f5f17ec6 in KritaGmicPlugin::launch(std::shared_ptr<KisImageInterface>, bool) () at /usr/lib/kritaplugins/krita_gmic_qt.so
#18 0x00007f885141415d in  () at /usr/lib/kritaplugins/kritaqmic.so
#19 0x00007f888fabdc00 in  () at /usr/lib/libQt5Core.so.5
#20 0x00007f889076bec7 in QAction::triggered(bool) () at /usr/lib/libQt5Widgets.so.5
#21 0x00007f88907718c7 in QAction::activate(QAction::ActionEvent) () at /usr/lib/libQt5Widgets.so.5
#22 0x00007f88908f3ecb in  () at /usr/lib/libQt5Widgets.so.5
#23 0x00007f88908f3fed in  () at /usr/lib/libQt5Widgets.so.5
#24 0x00007f88907af6e7 in QWidget::event(QEvent*) () at /usr/lib/libQt5Widgets.so.5
#25 0x00007f8890778b1c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#26 0x00007f889077e339 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#27 0x00007f8891a19d8f in KisApplication::notify(QObject*, QEvent*) () at /usr/lib/libkritaui.so.18
#28 0x00007f888fa8cf98 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#29 0x00007f889077c337 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () at /usr/lib/libQt5Widgets.so.5
#30 0x00007f88907cd894 in  () at /usr/lib/libQt5Widgets.so.5
#31 0x00007f88907cf15e in  () at /usr/lib/libQt5Widgets.so.5
#32 0x00007f8890778b1c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#33 0x00007f8891a19d8f in KisApplication::notify(QObject*, QEvent*) () at /usr/lib/libkritaui.so.18
#34 0x00007f888fa8cf98 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#35 0x00007f888ff3f15c in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /usr/lib/libQt5Gui.so.5
#36 0x00007f888ff289a5 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Gui.so.5
#37 0x00007f888a3ae710 in  () at /usr/lib/libQt5XcbQpa.so.5
#38 0x00007f888d31687b in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#39 0x00007f888d36d299 in  () at /usr/lib/libglib-2.0.so.0
#40 0x00007f888d315132 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#41 0x00007f888fad7c4c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#42 0x00007f888fa8573c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#43 0x00007f888fa90269 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#44 0x00005624ea65689f in  ()
#45 0x00007f888f23c290 in  () at /usr/lib/libc.so.6
#46 0x00007f888f23c34a in __libc_start_main () at /usr/lib/libc.so.6
#47 0x00005624ea658a55 in  ()
[Inferior 1 (process 90283) detached]

Reported using DrKonqi
Comment 1 Halla Rempt 2022-12-12 19:48:00 UTC
Can you also reproduce this with the appimage? If not, it's likely an Arch build/config/local issue.
Comment 2 amyspark 2022-12-12 22:02:01 UTC
The GMicProcessor does not disconnect target connections on thread destruction, and the plugin should be asserting on the thread being NULL or freed before hitting that line.

Based on the fact that it's built as as Release binary, thus not hitting the assertion (this is not our release configuration) and that the code crashing is not the Krita binding itself, I am marking it as an upstream bug. Please forward this bug to https://github.com/c-koi/gmic-qt.