| Summary: | Krita: Segmentation fault when closing | ||
|---|---|---|---|
| Product: | [Applications] krita | Reporter: | Matiee <kd3.matiee> |
| Component: | General | Assignee: | Krita Bugs <krita-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | CC: | danc, halla, kevinmathieu2020, klimrmad, lynx.mw+kde, scald86, tamtamy.tymona |
| Priority: | NOR | Keywords: | drkonqi |
| Version First Reported In: | 4.2.9 | ||
| Target Milestone: | --- | ||
| Platform: | Ubuntu | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/graphics/krita/commit/e7bd37c699944a78cde620b52118d254a254b708 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
| Attachments: | krita master with ubuntu 20.04 libs + breeze theme | ||
|
Description
Matiee
2020-04-26 10:02:48 UTC
Interesting, I just upgraded to 20.04 too and compiled krita master with system Qt, and got exactly the same crash. Then I built my own Qt again and no crash. I have a feeling it has to do with the breeze theme, running krita (built with system Qt) with -style=fusion gave me no crash on a few tries, with the default breeze it seems to crash every time, either with this backtrace or when unloading pykrita. Created attachment 127904 [details]
krita master with ubuntu 20.04 libs + breeze theme
Should have read the above backtrace more carefully, it always seems to happen when unloading pykrita plugin, the other threads don't matter. And after plenty of tries, it always crashes with the Breeze style here, and never with the Fusion style. Since tiar had a hard time finding a crash that turned out to be caused by incorrectly usage of a style object in KisColorFilterCombo I tested if that fix also works for this crash, but unfortunately not...I don't really have a clue what might be happening here, I couldn't find similar mistakes elsewhere (yet). hello, I have a similar bug, except that unlike my friends above, I have no script installed and my installation is totally new, the bug exists on virtual machine and also live on kubuntu 20.04, I didn't try the other distributions. I'm pretty new on linux, I don't want to venture too much in dark places. I get the same error message at closing, segmentation fault. The terminal gives me its information here: [ QBasicTimer::start: QBasicTimer can only be used with threads started with QThread KCrash: crashing... crashRecursionCounter = 2 KCrash: Application Name = krita path = /usr/bin pid = 1080 KCrash: Arguments: /usr/bin/krita KCrash: Attempting to start /usr/lib/x86_64-linux-gnu/libexec/drkonqi from kdeinit sock_file=/run/user/1000/kdeinit5__0 QSocketNotifier: Invalid socket 10 and type 'Read', disabling... QSocketNotifier: Invalid socket 16 and type 'Read', disabling... QSocketNotifier: Invalid socket 14 and type 'Read', disabling... Unable to start Dr. Konqi Re-raising signal for core dump handling. ] Dr.Konqi this : Application: Krita (krita), signal: Segmentation fault Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [Current thread is 1 (Thread 0x7fbddd17c800 (LWP 1103))] Thread 3 (Thread 0x7fbdc5b39700 (LWP 1136)): #0 syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38 #1 0x00007fbde206f0b0 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #2 0x00007fbde206ef16 in QSemaphore::tryAcquire(int, int) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #3 0x00007fbde35329aa in KisTileDataSwapper::run() () from /lib/x86_64-linux-gnu/libkritaimage.so.18 #4 0x00007fbde206c9d2 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #5 0x00007fbde0043609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #6 0x00007fbde1ce2103 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Thread 2 (Thread 0x7fbdcfdb0700 (LWP 1108)): #0 0x00007fbde228c57c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #1 0x00007fbde22334db in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #2 0x00007fbde206b785 in QThread::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #3 0x00007fbde0076efa in ?? () from /lib/x86_64-linux-gnu/libQt5DBus.so.5 #4 0x00007fbde206c9d2 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #5 0x00007fbde0043609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #6 0x00007fbde1ce2103 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Thread 1 (Thread 0x7fbddd17c800 (LWP 1103)): [KCrash Handler] #6 0x00007fbde2c96b1a in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #7 0x00007fbde2ca644e in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #8 0x00007fbde2ca6474 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #9 0x00007fbde2ca6509 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #10 0x00007fbde2c9b3dc in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #11 0x00007fbde2c8a908 in QWidget::~QWidget() () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #12 0x00007fbde2c8ae1d in QWidget::~QWidget() () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #13 0x00007fbde225e01e in QObjectPrivate::deleteChildren() () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #14 0x00007fbde2c8ac29 in QWidget::~QWidget() () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #15 0x00007fbde2d5e931 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #16 0x00007fbde225e01e in QObjectPrivate::deleteChildren() () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #17 0x00007fbde2c8ac29 in QWidget::~QWidget() () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #18 0x00007fbde2d60df8 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #19 0x00007fbde225e01e in QObjectPrivate::deleteChildren() () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #20 0x00007fbde2c8ac29 in QWidget::~QWidget() () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #21 0x00007fbdb7ddc25d in ?? () from /usr/lib/python3/dist-packages/PyQt5/QtWidgets.cpython-38-x86_64-linux-gnu.so #22 0x00007fbdc475c3f5 in ?? () from /usr/lib/python3/dist-packages/PyQt5/QtCore.cpython-38-x86_64-linux-gnu.so #23 0x00007fbdc4978b60 in ?? () from /usr/lib/python3/dist-packages/sip.cpython-38-x86_64-linux-gnu.so #24 0x00007fbdc475c0a0 in ?? () from /usr/lib/python3/dist-packages/PyQt5/QtCore.cpython-38-x86_64-linux-gnu.so #25 0x00007fbdc4e11d16 in ?? () from /lib/x86_64-linux-gnu/libpython3.8.so.1.0 #26 0x00007fbdc4e5a3cc in PyVectorcall_Call () from /lib/x86_64-linux-gnu/libpython3.8.so.1.0 #27 0x00007fbdc4cc2cf7 in ?? () from /lib/x86_64-linux-gnu/libpython3.8.so.1.0 #28 0x00007fbdc4d47635 in Py_FinalizeEx () from /lib/x86_64-linux-gnu/libpython3.8.so.1.0 #29 0x00007fbdc5131af9 in ?? () from /usr/lib/x86_64-linux-gnu/kritaplugins/kritapykrita.so #30 0x00007fbdc5131c90 in ?? () from /usr/lib/x86_64-linux-gnu/kritaplugins/kritapykrita.so #31 0x00007fbdc512ed1b in ?? () from /usr/lib/x86_64-linux-gnu/kritaplugins/kritapykrita.so #32 0x00007fbde225e01e in QObjectPrivate::deleteChildren() () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #33 0x00007fbde22685ef in QObject::~QObject() () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #34 0x00007fbde2236aae in QCoreApplication::~QCoreApplication() () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #35 0x00007fbde2c4d49e in QApplication::~QApplication() () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #36 0x00007fbde480a74f in QtSingleApplication::~QtSingleApplication() () from /lib/x86_64-linux-gnu/libkritaui.so.18 #37 0x00005591bf4d4bdc in main () [Inferior 1 (process 1103) detached] This is all with the distribution packages, right? The appimages don't crash like this for anyone? yes, I just tried appimage, the app close without giving errors For me it is krita built from source with all dependencies from Ubuntu packages. Since using system-wide Qt seems the only practical way to have the Breeze style engine, I don't really know any alternative to test besides Ubuntu packages and compiles that should be equivalent to those. However I just went through all the Python plugins, and the "Comics Project Managment Tools" seems to cause the crash for me, after disabling this plugin I can use the Breeze style without crashes. *** Bug 424105 has been marked as a duplicate of this bug. *** *** Bug 424840 has been marked as a duplicate of this bug. *** Git commit e7bd37c699944a78cde620b52118d254a254b708 by Agata Cacko. Committed on 22/04/2021 at 14:13. Pushed by tymond into branch 'master'. Fix crash on exit by setting styleSheet only on QTabBar Before this commit, Krita would crash on exit on Qt 5.12.8 with segfault in the destructor for the Python plugin widgets. It turned out that this crash was introduced in 8a7bae681a1f992, and the reason turned out to be a method setStyleSheet() with non-empty string. Setting empty stylesheet later (on closing) didn't make a difference. However setting the stylesheet on just the widget that needs it (QTabBar that keeps the document tabs) fixes/prevents the crash. Alternative fix would be to find the widget for the Python plugin and explicitely set empty stylesheet after every non-empty stylesheet set for the whole application. It wasn't tested, but in case more widgets need non-empty stylesheet, it sounds like it should work. Related: bug 427137 M +10 -6 libs/ui/KisMainWindow.cpp https://invent.kde.org/graphics/krita/commit/e7bd37c699944a78cde620b52118d254a254b708 @kd3 @Lynx3D @kevin Can you please check if e7bd37c699944a fixes the crash on startup for you? I have the same Qt version and I was getting the same backtrace, so I hope it did fix/prevent it. If you don't build your own Krita, please check Krita Next #1228, which should contain this change. You can run it from the terminal or bst, through gdb, to see the crash. |