Bug 390495 - Krita crashes on exit in the python plugin
Summary: Krita crashes on exit in the python plugin
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2018-02-15 08:56 UTC by Halla Rempt
Modified: 2018-02-15 11:28 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Halla Rempt 2018-02-15 08:56:30 UTC
Application: krita (4.0.0-beta1 (git 82367fd))

Qt Version: 5.10.0
Frameworks Version: 5.42.0
Operating System: Linux 4.4.104-18.44-default x86_64
Distribution: "openSUSE Leap 42.2"

-- Information about the crash:
Start Krita, close Kirta. This probably has to do with the fixes to make python work in an appimage. Maybe now something gets loaded which didn't get loaded before...

The crash can be reproduced every time.

-- Backtrace:
Application: Krita (krita), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f28064fb940 (LWP 27047))]

Thread 6 (Thread 0x7f27c1102700 (LWP 27056)):
#0  0x00007f27fad8c37d in poll () from /lib64/libc.so.6
#1  0x00007f27f667f314 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f27f667f42c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f27fbbb4e0b in QEventDispatcherGlib::processEvents (this=0x7f27b00008e0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#4  0x00007f27fbb6089b in QEventLoop::exec (this=this@entry=0x7f27c1101c20, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#5  0x00007f27fb99df9a in QThread::exec (this=<optimized out>) at thread/qthread.cpp:522
#6  0x00007f27e65e3b22 in QQuickPixmapReader::run() () from /usr/lib64/libQt5Quick.so.5
#7  0x00007f27fb9a2c5f in QThreadPrivate::start (arg=0x8a8cc90) at thread/qthread_unix.cpp:376
#8  0x00007f27f9da4724 in start_thread () from /lib64/libpthread.so.0
#9  0x00007f27fad94c1d in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7f27c284f700 (LWP 27055)):
#0  0x00007f27fad8c37d in poll () from /lib64/libc.so.6
#1  0x00007f27f667f314 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f27f667f42c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f27fbbb4dec in QEventDispatcherGlib::processEvents (this=0x7f27b80008e0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#4  0x00007f27fbb6089b in QEventLoop::exec (this=this@entry=0x7f27c284ec60, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#5  0x00007f27fb99df9a in QThread::exec (this=<optimized out>) at thread/qthread.cpp:522
#6  0x00007f27e617c998 in QQmlThreadPrivate::run() () from /usr/lib64/libQt5Qml.so.5
#7  0x00007f27fb9a2c5f in QThreadPrivate::start (arg=0x8955f20) at thread/qthread_unix.cpp:376
#8  0x00007f27f9da4724 in start_thread () from /lib64/libpthread.so.0
#9  0x00007f27fad94c1d in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7f27cadba700 (LWP 27054)):
#0  0x00007f27f9da90cf in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f27fb9a3acb in QWaitConditionPrivate::wait (time=18446744073709551615, this=0x8891da0) at thread/qwaitcondition_unix.cpp:143
#2  QWaitCondition::wait (this=this@entry=0x8891a10, mutex=mutex@entry=0x8891a08, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:215
#3  0x00007f27fcc877b9 in QFileInfoGatherer::run (this=0x88919f8) at dialogs/qfileinfogatherer.cpp:251
#4  0x00007f27fb9a2c5f in QThreadPrivate::start (arg=0x88919f8) at thread/qthread_unix.cpp:376
#5  0x00007f27f9da4724 in start_thread () from /lib64/libpthread.so.0
#6  0x00007f27fad94c1d in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7f27ca5b9700 (LWP 27053)):
#0  0x00007f27f9da90cf in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f27fb9a3acb in QWaitConditionPrivate::wait (time=18446744073709551615, this=0x7893370) at thread/qwaitcondition_unix.cpp:143
#2  QWaitCondition::wait (this=<optimized out>, mutex=mutex@entry=0x7893350, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:215
#3  0x00007f27fb99ce17 in QSemaphore::tryAcquire (this=0x788caf0, n=n@entry=1, timeout=timeout@entry=-1) at thread/qsemaphore.cpp:229
#4  0x00007f28048e6fa3 in KisTileDataSwapper::waitForWork (this=this@entry=0x7f2804db4d60 <_ZZN12_GLOBAL__N_116Q_QGS_s_instance13innerFunctionEvE6holder+64>) at /home/boud/dev/krita/libs/image/tiles3/swap/kis_tile_data_swapper.cpp:86
#5  0x00007f28048e716a in KisTileDataSwapper::run (this=0x7f2804db4d60 <_ZZN12_GLOBAL__N_116Q_QGS_s_instance13innerFunctionEvE6holder+64>) at /home/boud/dev/krita/libs/image/tiles3/swap/kis_tile_data_swapper.cpp:92
#6  0x00007f27fb9a2c5f in QThreadPrivate::start (arg=0x7f2804db4d60 <_ZZN12_GLOBAL__N_116Q_QGS_s_instance13innerFunctionEvE6holder+64>) at thread/qthread_unix.cpp:376
#7  0x00007f27f9da4724 in start_thread () from /lib64/libpthread.so.0
#8  0x00007f27fad94c1d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f27e2e76700 (LWP 27049)):
#0  0x00007f27fad8c37d in poll () from /lib64/libc.so.6
#1  0x00007f27f667f314 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f27f667f42c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f27fbbb4dec in QEventDispatcherGlib::processEvents (this=0x7f27dc0008e0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#4  0x00007f27fbb6089b in QEventLoop::exec (this=this@entry=0x7f27e2e75c50, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#5  0x00007f27fb99df9a in QThread::exec (this=this@entry=0x7f27ff584d40 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread.cpp:522
#6  0x00007f27ff31a7b5 in QDBusConnectionManager::run (this=0x7f27ff584d40 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:178
#7  0x00007f27fb9a2c5f in QThreadPrivate::start (arg=0x7f27ff584d40 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:376
#8  0x00007f27f9da4724 in start_thread () from /lib64/libpthread.so.0
#9  0x00007f27fad94c1d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f28064fb940 (LWP 27047)):
[KCrash Handler]
#6  0x0000000000000000 in ?? ()
#7  0x00007f27c3a68979 in PyEval_GetGlobals () from /usr/lib64/libpython3.4m.so.1.0
#8  0x00007f27c3abe0d2 in PyImport_Import () from /usr/lib64/libpython3.4m.so.1.0
#9  0x00007f27c3abe2fa in PyImport_ImportModule () from /usr/lib64/libpython3.4m.so.1.0
#10 0x00007f27c3de70e8 in PyKrita::Python::moduleImport (this=this@entry=0x7ffd690a4c10, moduleName=moduleName@entry=0x7f27c3df8aa6 "pykrita") at /home/boud/dev/krita/plugins/extensions/pykrita/plugin/utilities.cpp:500
#11 0x00007f27c3de7235 in PyKrita::Python::moduleDict (this=this@entry=0x7ffd690a4c10, moduleName=moduleName@entry=0x7f27c3df8aa6 "pykrita") at /home/boud/dev/krita/plugins/extensions/pykrita/plugin/utilities.cpp:489
#12 0x00007f27c3de739b in PyKrita::Python::itemString (this=this@entry=0x7ffd690a4c10, item=item@entry=0x7f27c3df911c "_pykritaUnloading", moduleName=moduleName@entry=0x7f27c3df8aa6 "pykrita") at /home/boud/dev/krita/plugins/extensions/pykrita/plugin/utilities.cpp:222
#13 0x00007f27c3de78f4 in PyKrita::Python::functionCall (this=this@entry=0x7ffd690a4c10, functionName=functionName@entry=0x7f27c3df911c "_pykritaUnloading", moduleName=moduleName@entry=0x7f27c3df8aa6 "pykrita", arguments=0x7f27c00a9048) at /home/boud/dev/krita/plugins/extensions/pykrita/plugin/utilities.cpp:194
#14 0x00007f27c3de8099 in PyKrita::Python::functionCall (this=this@entry=0x7ffd690a4c10, functionName=functionName@entry=0x7f27c3df911c "_pykritaUnloading", moduleName=0x7f27c3df8aa6 "pykrita") at /home/boud/dev/krita/plugins/extensions/pykrita/plugin/utilities.cpp:178
#15 0x00007f27c3de81a8 in PyKrita::finalize () at /home/boud/dev/krita/plugins/extensions/pykrita/plugin/utilities.cpp:130
#16 0x00007f27c3de4467 in KritaPyQtPlugin::~KritaPyQtPlugin (this=0x8647240, __in_chrg=<optimized out>) at /home/boud/dev/krita/plugins/extensions/pykrita/plugin/plugin.cpp:92
#17 KritaPyQtPlugin::~KritaPyQtPlugin (this=0x8647240, __in_chrg=<optimized out>) at /home/boud/dev/krita/plugins/extensions/pykrita/plugin/plugin.cpp:93
#18 0x00007f27fbb8a725 in QObjectPrivate::deleteChildren (this=this@entry=0x624afa0) at kernel/qobject.cpp:1992
#19 0x00007f27fbb949be in QObject::~QObject (this=<optimized out>, __in_chrg=<optimized out>) at kernel/qobject.cpp:1022
#20 0x00007f2805e457e8 in KisViewManager::~KisViewManager (this=0x727cb50, __in_chrg=<optimized out>) at /home/boud/dev/krita/libs/ui/KisViewManager.cpp:328
#21 0x00007f2805e45969 in KisViewManager::~KisViewManager (this=0x727cb50, __in_chrg=<optimized out>) at /home/boud/dev/krita/libs/ui/KisViewManager.cpp:341
#22 0x00007f2805e0f5a4 in KisMainWindow::~KisMainWindow (this=0x7242740, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at /home/boud/dev/krita/libs/ui/KisMainWindow.cpp:525
#23 0x00007f2805e0f7d9 in KisMainWindow::~KisMainWindow (this=0x7242740, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at /home/boud/dev/krita/libs/ui/KisMainWindow.cpp:528
#24 0x00007f27fbb8ddd0 in QObject::event (this=this@entry=0x7242740, e=e@entry=0x8b172c0) at kernel/qobject.cpp:1237
#25 0x00007f27fcac2573 in QWidget::event (this=this@entry=0x7242740, event=event@entry=0x8b172c0) at kernel/qwidget.cpp:9263
#26 0x00007f27fcbcfae1 in QMainWindow::event (this=this@entry=0x7242740, event=event@entry=0x8b172c0) at widgets/qmainwindow.cpp:1342
#27 0x00007f2802ea3367 in KMainWindow::event (this=this@entry=0x7242740, ev=ev@entry=0x8b172c0) at /home/boud/dev/krita/libs/widgetutils/xmlgui/kmainwindow.cpp:780
#28 0x00007f2802ed42f9 in KXmlGuiWindow::event (this=0x7242740, ev=0x8b172c0) at /home/boud/dev/krita/libs/widgetutils/xmlgui/kxmlguiwindow.cpp:125
#29 0x00007f27fca867fc in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x7242740, e=0x8b172c0) at kernel/qapplication.cpp:3733
#30 0x00007f27fca8d5e0 in QApplication::notify (this=0x7ffd690a5b50, receiver=receiver@entry=0x7242740, e=e@entry=0x8b172c0) at kernel/qapplication.cpp:3492
#31 0x00007f2805de1ea7 in KisApplication::notify (this=<optimized out>, receiver=0x7242740, event=0x8b172c0) at /home/boud/dev/krita/libs/ui/KisApplication.cpp:600
#32 0x00007f27fbb62175 in QCoreApplication::notifyInternal2 (receiver=0x7242740, event=event@entry=0x8b172c0) at kernel/qcoreapplication.cpp:1044
#33 0x00007f27fbb64b93 in QCoreApplication::sendEvent (event=0x8b172c0, receiver=<optimized out>) at kernel/qcoreapplication.h:234
#34 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x1ef1200) at kernel/qcoreapplication.cpp:1719
#35 0x00007f27fbb650d8 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1573
#36 0x00007f27fbbb55c3 in postEventSourceDispatch (s=0x1fc1b90) at kernel/qeventdispatcher_glib.cpp:276
#37 0x00007f27f667f134 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#38 0x00007f27f667f388 in ?? () from /usr/lib64/libglib-2.0.so.0
#39 0x00007f27f667f42c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#40 0x00007f27fbbb4dec in QEventDispatcherGlib::processEvents (this=this@entry=0x1fd10b0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#41 0x00007f27ef6d9471 in QPAEventDispatcherGlib::processEvents (this=0x1fd10b0, flags=...) at qeventdispatcher_glib.cpp:69
#42 0x00007f27fbb6089b in QEventLoop::exec (this=this@entry=0x7ffd690a55e0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#43 0x00007f27fbb68f54 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1332
#44 0x00007f27fc0cfe5c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1687
#45 0x00007f27fca86755 in QApplication::exec () at kernel/qapplication.cpp:2918
#46 0x0000000000405ec7 in main (argc=1, argv=<optimized out>) at /home/boud/dev/krita/krita/main.cc:312

Reported using DrKonqi
Comment 1 Halla Rempt 2018-02-15 09:06:22 UTC
Git commit e6c976e933d4fef8c8a85dd6495d981cd412f789 by Boudewijn Rempt.
Committed on 15/02/2018 at 09:05.
Pushed by rempt into branch 'master'.

Do not crash on exit in the python plugin

This call imported new modules in the python instance while it
is being torn down.

M  +1    -6    plugins/extensions/pykrita/plugin/utilities.cpp

https://commits.kde.org/krita/e6c976e933d4fef8c8a85dd6495d981cd412f789