Krita 4.0.0 crashes when closing it. Using sip 4.19.8, PyQt 5.10.1 Thread 1 "krita" received signal SIGSEGV, Segmentation fault. 0x00007fffee4a2e39 in sem_wait@@GLIBC_2.2.5 () from /usr/lib/libpthread.so.0 (gdb) bt #0 0x00007fffee4a2e39 in sem_wait@@GLIBC_2.2.5 () at /usr/lib/libpthread.so.0 #1 0x00007fffb68acf26 in PyThread_acquire_lock_timed () at /usr/lib/libpython3.6m.so.1.0 #2 0x00007fffb69a30cd in () at /usr/lib/libpython3.6m.so.1.0 #3 0x00007fffb6839d56 in () at /usr/lib/libpython3.6m.so.1.0 #4 0x00007fffb5e9c345 in () at /usr/lib/python3.6/site-packages/sip.so #5 0x00007fffb5bfbce7 in sipDockWidgetFactoryBase::~sipDockWidgetFactoryBase() (this=0x5555600102d0, __in_chrg=<optimized out>) at /build/krita/src/build/plugins/extensions/pykrita/sip/./krita/sipkritapart0.cpp:30662 #6 0x00007fffb5bfbd0a in sipDockWidgetFactoryBase::~sipDockWidgetFactoryBase() (this=0x5555600102d0, __in_chrg=<optimized out>) at /build/krita/src/build/plugins/extensions/pykrita/sip/./krita/sipkritapart0.cpp:30663 #7 0x00007ffff196867e in qDeleteAll<QList<KoDockFactoryBase*>::const_iterator>(QList<KoDockFactoryBase*>::const_iterator, QList<KoDockFactoryBase*>::const_iterator) (end=..., begin=...) at /usr/include/qt/QtCore/qalgorithms.h:320 #8 0x00007ffff196867e in qDeleteAll<QList<KoDockFactoryBase*> >(QList<KoDockFactoryBase*> const&) (c=...) at /usr/include/qt/QtCore/qalgorithms.h:328 #9 0x00007ffff196867e in KoDockRegistry::~KoDockRegistry() (this=0x7ffff1d40080 <_ZZN12_GLOBAL__N_116Q_QGS_s_instance13innerFunctionEvE6holder>, __in_chrg=<optimized out>) at /build/krita/src/krita-4.0.0/libs/flake/KoDockRegistry.cpp:52 #10 0x00007ffff196879a in (anonymous namespace)::Q_QGS_s_instance::Holder::~Holder() (this=<optimized out>, __in_chrg=<optimized out>) at /build/krita/src/krita-4.0.0/libs/flake/KoDockRegistry.cpp:31 #11 0x00007ffff479f448 in __run_exit_handlers () at /usr/lib/libc.so.6 #12 0x00007ffff479f49a in () at /usr/lib/libc.so.6 #13 0x00007ffff4788f51 in __libc_start_main () at /usr/lib/libc.so.6 #14 0x00005555558462fa in _start ()
I cannot reproduce that either on Ubuntu or OpenSUSE (or Windows or macOS), so I suspect it's something specific to arch or how Krita is build on arch. Are you building from git, or from the as-yet unreleased Krita 4.0.0 tarball?
From the tarball
Then it must be something to do with the build options... Could you attach the cmakecache.txt file?
Created attachment 111481 [details] CMakeCache
Hm... Could you check whether the crash goes away if you specify a build type? It's unspecified at, probably defaults to fulldebug or something like that. Try RelWithDebInfo or KritaDevs or Release.
I can reproduce this too, its been present for the last two weeks, I just assumed its some update in Archlinux (as Krita often looks for a previous version of some libraries) but this time I can't tell what is causing the crash, which happens every close. GDB gives me exactly the same error as Antonio, I'm building from the git master, also on Arch/Plasma system, full clean builds. my build command: cmake -DCMAKE_INSTALL_PREFIX=$HOME/Downloads/Krita-git/inst $HOME/Downloads/Krita-git/src -DWITH_GMIC=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPACKAGERS_BUILD=ON -DBUILD_TESTING=OFF -DPYTHON_EXECUTABLE=/usr/bin/python -DPYQT_SIP_DIR_OVERRIDE=/usr/share/sip/PyQt5 -Wno-dev
Downgrading sip to 4.19.7 fixes the problem
This is the only significant change in sip 4.19.8 https://www.riverbankcomputing.com/hg/sip/rev/71bfa703c4ee
Looks like you've found the issue :-) Now we'll have to tell Phil about it!
Notified the PyQt mailing list
*** Bug 392215 has been marked as a duplicate of this bug. ***
*** Bug 392326 has been marked as a duplicate of this bug. ***
It doesn't seem like the issue is in sip, maybe we're really doing something wrong. reopening.
Git commit ddf8e6b7fee6afc0bf4e3e05f6ea7d3a7cc3e94b by Boudewijn Rempt. Committed on 03/04/2018 at 10:57. Pushed by rempt into branch 'master'. Leak the dock widget factories for now For some reason, deleting these item causes crashes with certain versions of sip. Probably because the order of destruction of registries is undefined and can happen after Python is destroyed. M +5 -3 libs/flake/KoDockRegistry.cpp https://commits.kde.org/krita/ddf8e6b7fee6afc0bf4e3e05f6ea7d3a7cc3e94b
Git commit a5bf320844ad14945b17e883821b8cf81b24111e by Boudewijn Rempt. Committed on 03/04/2018 at 11:21. Pushed by rempt into branch 'krita/4.0'. Leak the dock widget factories for now For some reason, deleting these item causes crashes with certain versions of sip. Probably because the order of destruction of registries is undefined and can happen after Python is destroyed. (cherry picked from commit ddf8e6b7fee6afc0bf4e3e05f6ea7d3a7cc3e94b) M +5 -3 libs/flake/KoDockRegistry.cpp https://commits.kde.org/krita/a5bf320844ad14945b17e883821b8cf81b24111e