Bug 411212

Summary: Krita not responding when deleting reference image(s)
Product: [Applications] krita Reporter: Anya <artistachild>
Component: Tools/Reference ImagesAssignee: Dmitry Kazakov <dimula73>
Status: RESOLVED FIXED    
Severity: normal CC: dimula73, griffinvalley, info
Priority: NOR Keywords: regression, release_blocker
Version: nightly build (please specify the git hash!)   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:

Description Anya 2019-08-23 17:53:51 UTC
Krita Nightly Build Version: 4.2.6 (git 1a9077c)

SUMMARY
Whenever I try to delete a reference image embedded in any Krita document I use, the program becomes unresponsive. This happens when I select a reference image using the Reference Image Tool and try to delete it by either the Del button or by clicking Edit->Clear. This also happens when clicking the "Delete all Reference Images" button under Tool Options.

STEPS TO REPRODUCE
1. Click the reference image tool
2. Select any reference image embedded in a .kra document
3. Click Edit->Clear OR pressing the Del keyboard button OR clicking the "Delete All Reference Images" under Tool Options for the Reference Image Tool.

OBSERVED RESULT
Krita hangs and status becomes "Not Responding". I have to close the program and reopen for it to work again.

EXPECTED RESULT
The selected reference image(s) is/are deleted from the document.

SOFTWARE/OS VERSIONS
Windows: Windows 10
Qt Version: 5.12.4
Tablet Used: Surface Pro 3

ADDITIONAL INFORMATION
Note that this happens in the nightly builds. This nightly build version is 4.2.6 (git 1a9077c). This issue does NOT happen in the latest stable Krita 4.2.5 build.
Comment 1 wolthera 2019-08-23 17:55:56 UTC
Can confirm here, gonna try get a backtrace in master.
Comment 2 wolthera 2019-08-23 17:59:45 UTC
Okay, so this seems to be a weird freeze in the shape manager, it's not a crash, just everything locking up.

GDB Backtrace
================================================
^C  
Thread 1 "krita" received signal SIGINT, Interrupt.
syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
38      ../sysdeps/unix/sysv/linux/x86_64/syscall.S: No such file or directory.
(gdb) thread apply all backtrace

Thread 43 (Thread 0x7fff7b639700 (LWP 21833)):
#0  0x00007fffea26eed9 in futex_reltimed_wait_cancelable (private=<optimized out>, 
    reltime=0x7fff7b638ba0, expected=0, futex_word=0x6080004f1074)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:142
#1  __pthread_cond_wait_common (abstime=0x7fff7b638c60, mutex=0x6080004f1020, 
    cond=0x6080004f1048) at pthread_cond_wait.c:533
#2  __pthread_cond_timedwait (cond=0x6080004f1048, mutex=0x6080004f1020, 
    abstime=0x7fff7b638c60) at pthread_cond_wait.c:667
#3  0x00007fffeb2ccd36 in QWaitCondition::wait(QMutex*, QDeadlineTimer) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fffeb2cd096 in QWaitCondition::wait(QMutex*, unsigned long) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fffeb2ca740 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fffeb2c5c72 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fffea2686db in start_thread (arg=0x7fff7b639700) at pthread_create.c:463
#8  0x00007fffea9ad88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 42 (Thread 0x7fff7be3a700 (LWP 21832)):
#0  0x00007fffea26eed9 in futex_reltimed_wait_cancelable (private=<optimized out>, 
    reltime=0x7fff7be39ba0, expected=0, futex_word=0x6080004e8674)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:142
#1  __pthread_cond_wait_common (abstime=0x7fff7be39c60, mutex=0x6080004e8620, 
    cond=0x6080004e8648) at pthread_cond_wait.c:533
#2  __pthread_cond_timedwait (cond=0x6080004e8648, mutex=0x6080004e8620, 
    abstime=0x7fff7be39c60) at pthread_cond_wait.c:667
#3  0x00007fffeb2ccd36 in QWaitCondition::wait(QMutex*, QDeadlineTimer) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fffeb2cd096 in QWaitCondition::wait(QMutex*, unsigned long) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fffeb2ca740 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fffeb2c5c72 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fffea2686db in start_thread (arg=0x7fff7be3a700) at pthread_create.c:463
#8  0x00007fffea9ad88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 41 (Thread 0x7fff9ce8d700 (LWP 21831)):
#0  0x00007fffea26eed9 in futex_reltimed_wait_cancelable (private=<optimized out>, 
    reltime=0x7fff9ce8cba0, expected=0, futex_word=0x6080004e76f4)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:142
#1  __pthread_cond_wait_common (abstime=0x7fff9ce8cc60, mutex=0x6080004e76a0, 
    cond=0x6080004e76c8) at pthread_cond_wait.c:533
#2  __pthread_cond_timedwait (cond=0x6080004e76c8, mutex=0x6080004e76a0, 
    abstime=0x7fff9ce8cc60) at pthread_cond_wait.c:667
#3  0x00007fffeb2ccd36 in QWaitCondition::wait(QMutex*, QDeadlineTimer) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fffeb2cd096 in QWaitCondition::wait(QMutex*, unsigned long) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fffeb2ca740 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
---Type <return> to continue, or q <return> to quit---
#6  0x00007fffeb2c5c72 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fffea2686db in start_thread (arg=0x7fff9ce8d700) at pthread_create.c:463
#8  0x00007fffea9ad88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 40 (Thread 0x7fff9d68e700 (LWP 21830)):
#0  0x00007fffea26eed9 in futex_reltimed_wait_cancelable (private=<optimized out>, 
    reltime=0x7fff9d68dba0, expected=0, futex_word=0x6080004e75f4)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:142
#1  __pthread_cond_wait_common (abstime=0x7fff9d68dc60, mutex=0x6080004e75a0, 
    cond=0x6080004e75c8) at pthread_cond_wait.c:533
#2  __pthread_cond_timedwait (cond=0x6080004e75c8, mutex=0x6080004e75a0, 
    abstime=0x7fff9d68dc60) at pthread_cond_wait.c:667
#3  0x00007fffeb2ccd36 in QWaitCondition::wait(QMutex*, QDeadlineTimer) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fffeb2cd096 in QWaitCondition::wait(QMutex*, unsigned long) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fffeb2ca740 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fffeb2c5c72 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fffea2686db in start_thread (arg=0x7fff9d68e700) at pthread_create.c:463
#8  0x00007fffea9ad88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 39 (Thread 0x7fff773ed700 (LWP 21829)):
#0  0x00007fffea26eed9 in futex_reltimed_wait_cancelable (private=<optimized out>, 
    reltime=0x7fff773ecba0, expected=0, futex_word=0x6080004ea174)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:142
#1  __pthread_cond_wait_common (abstime=0x7fff773ecc60, mutex=0x6080004ea120, 
    cond=0x6080004ea148) at pthread_cond_wait.c:533
#2  __pthread_cond_timedwait (cond=0x6080004ea148, mutex=0x6080004ea120, 
    abstime=0x7fff773ecc60) at pthread_cond_wait.c:667
#3  0x00007fffeb2ccd36 in QWaitCondition::wait(QMutex*, QDeadlineTimer) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fffeb2cd096 in QWaitCondition::wait(QMutex*, unsigned long) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fffeb2ca740 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fffeb2c5c72 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fffea2686db in start_thread (arg=0x7fff773ed700) at pthread_create.c:463
#8  0x00007fffea9ad88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 38 (Thread 0x7fff9de8f700 (LWP 21828)):
#0  0x00007fffea26eed9 in futex_reltimed_wait_cancelable (private=<optimized out>, 
    reltime=0x7fff9de8eba0, expected=0, futex_word=0x6080004e9ff4)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:142
#1  __pthread_cond_wait_common (abstime=0x7fff9de8ec60, mutex=0x6080004e9fa0, 
    cond=0x6080004e9fc8) at pthread_cond_wait.c:533
#2  __pthread_cond_timedwait (cond=0x6080004e9fc8, mutex=0x6080004e9fa0, 
    abstime=0x7fff9de8ec60) at pthread_cond_wait.c:667
#3  0x00007fffeb2ccd36 in QWaitCondition::wait(QMutex*, QDeadlineTimer) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
---Type <return> to continue, or q <return> to quit---
#4  0x00007fffeb2cd096 in QWaitCondition::wait(QMutex*, unsigned long) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fffeb2ca740 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fffeb2c5c72 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fffea2686db in start_thread (arg=0x7fff9de8f700) at pthread_create.c:463
#8  0x00007fffea9ad88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 37 (Thread 0x7fff77bee700 (LWP 21827)):
#0  0x00007fffea26eed9 in futex_reltimed_wait_cancelable (private=<optimized out>, 
    reltime=0x7fff77bedba0, expected=0, futex_word=0x6080004eeb70)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:142
#1  __pthread_cond_wait_common (abstime=0x7fff77bedc60, mutex=0x6080004eeb20, 
    cond=0x6080004eeb48) at pthread_cond_wait.c:533
#2  __pthread_cond_timedwait (cond=0x6080004eeb48, mutex=0x6080004eeb20, 
    abstime=0x7fff77bedc60) at pthread_cond_wait.c:667
#3  0x00007fffeb2ccd36 in QWaitCondition::wait(QMutex*, QDeadlineTimer) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fffeb2cd096 in QWaitCondition::wait(QMutex*, unsigned long) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fffeb2ca740 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fffeb2c5c72 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fffea2686db in start_thread (arg=0x7fff77bee700) at pthread_create.c:463
#8  0x00007fffea9ad88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 36 (Thread 0x7fff74be8700 (LWP 21826)):
#0  0x00007fffea26eed9 in futex_reltimed_wait_cancelable (private=<optimized out>, 
    reltime=0x7fff74be7ba0, expected=0, futex_word=0x6080004e8270)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:142
#1  __pthread_cond_wait_common (abstime=0x7fff74be7c60, mutex=0x6080004e8220, 
    cond=0x6080004e8248) at pthread_cond_wait.c:533
#2  __pthread_cond_timedwait (cond=0x6080004e8248, mutex=0x6080004e8220, 
    abstime=0x7fff74be7c60) at pthread_cond_wait.c:667
#3  0x00007fffeb2ccd36 in QWaitCondition::wait(QMutex*, QDeadlineTimer) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fffeb2cd096 in QWaitCondition::wait(QMutex*, unsigned long) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fffeb2ca740 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fffeb2c5c72 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fffea2686db in start_thread (arg=0x7fff74be8700) at pthread_create.c:463
#8  0x00007fffea9ad88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 17 (Thread 0x7fffa81c1700 (LWP 21707)):
#0  0x00007fffea26eed9 in futex_reltimed_wait_cancelable (private=<optimized out>, 
    reltime=0x7fffa81c0ba0, expected=0, futex_word=0x6080005681f0)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:142
#1  __pthread_cond_wait_common (abstime=0x7fffa81c0c60, mutex=0x6080005681a0, 
    cond=0x6080005681c8) at pthread_cond_wait.c:533
#2  __pthread_cond_timedwait (cond=0x6080005681c8, mutex=0x6080005681a0, 
---Type <return> to continue, or q <return> to quit---
    abstime=0x7fffa81c0c60) at pthread_cond_wait.c:667
#3  0x00007fffeb2ccd36 in QWaitCondition::wait(QMutex*, QDeadlineTimer) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fffeb2cd096 in QWaitCondition::wait(QMutex*, unsigned long) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fffeb2ca740 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fffeb2c5c72 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fffea2686db in start_thread (arg=0x7fffa81c1700) at pthread_create.c:463
#8  0x00007fffea9ad88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 16 (Thread 0x7fffa9438700 (LWP 21706)):
#0  0x00007fffea9a0bf9 in __GI___poll (fds=0x6030020c5d50, nfds=2, timeout=120797)
    at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007ffff6e55701 in poll () from /usr/lib/x86_64-linux-gnu/libasan.so.4
#2  0x00007fffe12685c9 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fffe12686dc in g_main_context_iteration ()
   from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fffeb4fbdaf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fffeb49d03a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fffeb2c44ca in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fffeb2c5c72 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007fffea2686db in start_thread (arg=0x7fffa9438700) at pthread_create.c:463
#9  0x00007fffea9ad88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 15 (Thread 0x7fff7d702700 (LWP 21672)):
#0  0x00007fffea9a0bf9 in __GI___poll (fds=0x602000130cf0, nfds=1, timeout=-1)
    at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007ffff6e55701 in poll () from /usr/lib/x86_64-linux-gnu/libasan.so.4
#2  0x00007fffe12685c9 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fffe12686dc in g_main_context_iteration ()
   from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fffeb4fbdaf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fffeb49d03a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fffeb2c44ca in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fffca49a926 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#8  0x00007fffeb2c5c72 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007fffea2686db in start_thread (arg=0x7fff7d702700) at pthread_create.c:463
#10 0x00007fffea9ad88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 14 (Thread 0x7fff92a1b700 (LWP 21663)):
#0  0x00007fffea9a0bf9 in __GI___poll (fds=0x60200016b5d0, nfds=1, timeout=-1)
    at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007ffff6e55701 in poll () from /usr/lib/x86_64-linux-gnu/libasan.so.4
#2  0x00007fffe12685c9 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#3  0x00007fffe12686dc in g_main_context_iteration ()
   from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fffeb4fbdaf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fffeb49d03a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fffeb2c44ca in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fffc9fd5115 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#8  0x00007fffeb2c5c72 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007fffea2686db in start_thread (arg=0x7fff92a1b700) at pthread_create.c:463
#10 0x00007fffea9ad88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 13 (Thread 0x7fff9221a700 (LWP 21461)):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007fffeb2c8630 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007fffeb2c84a2 in QSemaphore::tryAcquire(int, int) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007fffed946bdf in KisTileDataSwapper::waitForWork (this=
    0x7fffeebd07c0 <(anonymous namespace)::Q_QGS_s_instance::innerFunction()::holder+64>)
    at /home/wolthera/krita/src/libs/image/tiles3/swap/kis_tile_data_swapper.cpp:86
#4  0x00007fffed946bfa in KisTileDataSwapper::run (
    this=0x7fffeebd07c0 <(anonymous namespace)::Q_QGS_s_instance::innerFunction()::holder+64>) at /home/wolthera/krita/src/libs/image/tiles3/swap/kis_tile_data_swapper.cpp:92
#5  0x00007fffeb2c5c72 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fffea2686db in start_thread (arg=0x7fff9221a700) at pthread_create.c:463
#7  0x00007fffea9ad88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 11 (Thread 0x7fff94c1e700 (LWP 21451)):
#0  0x00007fffea9a0bf9 in __GI___poll (fds=0x602000367870, nfds=1, timeout=-1)
    at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007ffff6e55701 in poll () from /usr/lib/x86_64-linux-gnu/libasan.so.4
#2  0x00007fffe12685c9 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fffe12686dc in g_main_context_iteration ()
   from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fffeb4fbdaf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fffeb49d03a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fffeb2c44ca in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fffeb2c5c72 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007fffea2686db in start_thread (arg=0x7fff94c1e700) at pthread_create.c:463
#9  0x00007fffea9ad88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 10 (Thread 0x7fffc4e7a700 (LWP 21178)):
#0  0x00007fffea9a0bf9 in __GI___poll (fds=0x6030020944f0, nfds=4, timeout=-1)
    at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007ffff6e55701 in poll () from /usr/lib/x86_64-linux-gnu/libasan.so.4
#2  0x00007fffe12685c9 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#3  0x00007fffe12686dc in g_main_context_iteration ()
   from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fffeb4fbdaf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fffeb49d03a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fffeb2c44ca in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fffe2970015 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#8  0x00007fffeb2c5c72 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007fffea2686db in start_thread (arg=0x7fffc4e7a700) at pthread_create.c:463
#10 0x00007fffea9ad88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 9 (Thread 0x7fffd3c28700 (LWP 21175)):
#0  0x00007fffea26e9f3 in futex_wait_cancelable (private=<optimized out>, expected=0, 
    futex_word=0x614000005108) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x6140000050b8, cond=0x6140000050e0)
    at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x6140000050e0, mutex=0x6140000050b8)
    at pthread_cond_wait.c:655
#3  0x00007fffd09520aa in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#4  0x00007fffd0951dd7 in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#5  0x00007fffea2686db in start_thread (arg=0x7fffd3c28700) at pthread_create.c:463
#6  0x00007fffea9ad88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 8 (Thread 0x7fffcf747700 (LWP 21170)):
#0  0x00007fffea9a0bf9 in __GI___poll (fds=0x7fffcf746c68, nfds=1, timeout=-1)
    at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007ffff6e55701 in poll () from /usr/lib/x86_64-linux-gnu/libasan.so.4
#2  0x00007fffe04c3747 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007fffe04c536a in xcb_wait_for_event () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#4  0x00007fffd67dd578 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#5  0x00007fffeb2c5c72 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fffea2686db in start_thread (arg=0x7fffcf747700) at pthread_create.c:463
#7  0x00007fffea9ad88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7ffff7f8ce80 (LWP 20997)):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007fffeb2c5f75 in QBasicMutex::lockInternal() ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007fffe7742616 in QMutexLocker::QMutexLocker (this=0x7fffffff7ea0, m=0x60b001c8dec8)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qmutex.h:206
#3  0x00007fffe7739522 in KoShapeManager::paint (this=0x60300204b380, painter=..., 
    converter=..., forPrint=false)
    at /home/wolthera/krita/src/libs/flake/KoShapeManager.cpp:290
#4  0x00007ffff2677a53 in KisReferenceImagesLayer::paintReferences (this=0x6080002b02a0, 
    painter=...) at /home/wolthera/krita/src/libs/ui/flake/KisReferenceImagesLayer.cpp:171
#5  0x00007ffff2666c19 in KisReferenceImagesDecoration::Private::updateBuffer (
    this=0x60f000135730, widgetRect=..., imageRect=...)
---Type <return> to continue, or q <return> to quit---
    at /home/wolthera/krita/src/libs/ui/KisReferenceImagesDecoration.cpp:95
#6  0x00007ffff2665bc5 in KisReferenceImagesDecoration::Private::updateBufferByImageCoordinates (this=0x60f000135730, dirtyImageRect=...)
    at /home/wolthera/krita/src/libs/ui/KisReferenceImagesDecoration.cpp:55
#7  0x00007ffff2662b58 in KisReferenceImagesDecoration::slotReferenceImagesChanged (
    this=0x604000f522d0, dirtyRect=...)
    at /home/wolthera/krita/src/libs/ui/KisReferenceImagesDecoration.cpp:161
#8  0x00007ffff26d846a in KisReferenceImagesDecoration::qt_static_metacall (
    _o=0x604000f522d0, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x7fffffff8d40)
    at /home/wolthera/krita/build/libs/ui/kritaui_autogen/EWIEGA46WW/moc_KisReferenceImagesDecoration.cpp:79
#9  0x00007fffeb4ce875 in QMetaObject::activate(QObject*, int, int, void**) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007ffff26eed5d in KisReferenceImagesLayer::sigUpdateCanvas (this=0x6080002b02a0, 
    _t1=...)
    at /home/wolthera/krita/build/libs/ui/kritaui_autogen/QUY67KCZCL/moc_KisReferenceImagesLayer.cpp:132
#11 0x00007ffff2677b8d in KisReferenceImagesLayer::signalUpdate (this=0x6080002b02a0, 
    rect=...) at /home/wolthera/krita/src/libs/ui/flake/KisReferenceImagesLayer.cpp:196
#12 0x00007ffff267ae6e in ReferenceImagesCanvas::updateCanvas (this=0x606001796a20, 
    rect=...) at /home/wolthera/krita/src/libs/ui/flake/KisReferenceImagesLayer.cpp:110
#13 0x00007fffe773f9fa in KoShapeManager::update (this=0x60300204b380, rect=..., 
    shape=0x6040014d6790, selectionHandles=true)
    at /home/wolthera/krita/src/libs/flake/KoShapeManager.cpp:625
#14 0x00007fffe76edcab in KoShape::update (this=0x6040014d6790)
    at /home/wolthera/krita/src/libs/flake/KoShape.cpp:728
#15 0x00007fffe7725e1e in KoShapeContainer::update (this=0x6040014d6790)
    at /home/wolthera/krita/src/libs/flake/KoShapeContainer.cpp:143
#16 0x00007fffe773876f in KoShapeManager::remove (this=0x60300204b380, shape=0x6040014d6790)
    at /home/wolthera/krita/src/libs/flake/KoShapeManager.cpp:239
#17 0x00007ffff1b41301 in ShapeLayerContainerModel::shapeToBeRemovedFromHierarchy (
    this=0x6040014d2890, shape=0x6040014d6790, removedFromSubtree=0x6080002b02d8)
    at /home/wolthera/krita/src/libs/ui/flake/kis_shape_layer.cc:121
#18 0x00007fffe7727217 in KoShapeContainer::ShapeInterface::removeShape (
    this=0x6030020788c8, shape=0x6040014d6790)
    at /home/wolthera/krita/src/libs/flake/KoShapeContainer.cpp:224
#19 0x00007fffe76ed5f5 in KoShape::setParent (this=0x6040014d6790, parent=0x0)
    at /home/wolthera/krita/src/libs/flake/KoShape.cpp:662
#20 0x00007ffff1b2bc1d in KisShapeController::removeShape (this=0x6040020f6950, 
    shape=0x6040014d6790)
    at /home/wolthera/krita/src/libs/ui/flake/kis_shape_controller.cpp:231
#21 0x00007fffe78e7654 in KoShapeDeleteCommand::redo (this=0x607000b58300)
    at /home/wolthera/krita/src/libs/flake/commands/KoShapeDeleteCommand.cpp:85
#22 0x00007ffff267a59f in RemoveReferenceImagesCommand::redo (this=0x607000b58300)
    at /home/wolthera/krita/src/libs/ui/flake/KisReferenceImagesLayer.cpp:72
#23 0x00007fffe5eb9aac in KUndo2Command::redoMergedCommands (this=0x607000b58300)
    at /home/wolthera/krita/src/libs/command/kundo2stack.cpp:398
#24 0x00007fffe5ebb657 in KUndo2QStack::push (this=0x6080001c52a0, cmd=0x607000b58300)
---Type <return> to continue, or q <return> to quit---
    at /home/wolthera/krita/src/libs/command/kundo2stack.cpp:711
#25 0x00007ffff24a7f3d in KisDocument::addCommand (this=0x6040020f5e50, 
    command=0x607000b58300) at /home/wolthera/krita/src/libs/ui/KisDocument.cpp:1744
#26 0x00007ffff18a7dcb in KisCanvas2::addCommand (this=0x616001b39750, 
    command=0x607000b58300) at /home/wolthera/krita/src/libs/ui/canvas/kis_canvas2.cpp:396
#27 0x00007fffa524a3be in ToolReferenceImages::deleteSelection (this=0x6150003f3c00)
    at /home/wolthera/krita/src/plugins/tools/defaulttool/referenceimagestool/ToolReferenceImages.cpp:274
#28 0x00007fffe77f1348 in KoToolProxy::deleteSelection (this=0x6150005ad2e0)
    at /home/wolthera/krita/src/libs/flake/KoToolProxy.cpp:455
#29 0x00007ffff22f5b5f in KisClearActionFactory::run (this=0x7fffffff9fd0, 
    view=0x6030028cf000)
    at /home/wolthera/krita/src/libs/ui/actions/kis_selection_action_factories.cpp:251
#30 0x00007ffff1e05685 in KisSelectionManager::clear (this=0x61a00003d330)
    at /home/wolthera/krita/src/libs/ui/kis_selection_manager.cc:509
#31 0x00007ffff270f714 in KisSelectionManager::qt_static_metacall (_o=0x61a00003d330, 
    _c=QMetaObject::InvokeMetaMethod, _id=20, _a=0x7fffffffa260)
    at /home/wolthera/krita/build/libs/ui/kritaui_autogen/EWIEGA46WW/moc_kis_selection_manager.cpp:249
#32 0x00007fffeb4ce875 in QMetaObject::activate(QObject*, int, int, void**) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#33 0x00007fffec293f12 in QAction::triggered(bool) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#34 0x00007fffec29652c in QAction::activate(QAction::ActionEvent) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#35 0x00007fffec296e81 in QAction::event(QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#36 0x00007fffec29a65c in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#37 0x00007fffec2a1b90 in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#38 0x00007ffff24745bb in KisApplication::notify (this=0x7fffffffda00, 
    receiver=0x603002917570, event=0x7fffffffa7b0)
    at /home/wolthera/krita/src/libs/ui/KisApplication.cpp:653
#39 0x00007fffeb49ed18 in QCoreApplication::notifyInternal2(QObject*, QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#40 0x00007fffeba92f42 in QShortcutMap::dispatchEvent(QKeyEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#41 0x00007fffeba9300a in QShortcutMap::tryShortcut(QKeyEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#42 0x00007fffeba45d53 in QWindowSystemInterface::handleShortcutEvent(QWindow*, unsigned long, int, QFlags<Qt::KeyboardModifier>, unsigned int, unsigned int, unsigned int, QString const&, bool, unsigned short) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#43 0x00007fffeba645d7 in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#44 0x00007fffeba69345 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#45 0x00007fffeba41b4b in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::P---Type <return> to continue, or q <return> to quit---
rocessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#46 0x00007fffd67de59a in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#47 0x00007fffe1268417 in g_main_context_dispatch ()
   from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#48 0x00007fffe1268650 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#49 0x00007fffe12686dc in g_main_context_iteration ()
   from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#50 0x00007fffeb4fbdaf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#51 0x00007fffeb49d03a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#52 0x00007fffeb4a6170 in QCoreApplication::exec() ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#53 0x0000555557933431 in main (argc=1, argv=0x7fffffffdb98)
    at /home/wolthera/krita/src/krita/main.cc:535
(gdb)
Comment 3 wolthera 2019-08-24 12:43:54 UTC
*** Bug 411232 has been marked as a duplicate of this bug. ***
Comment 4 Dmitry Kazakov 2019-08-26 12:58:46 UTC
Git commit 372be1ad8b6acd5dfae9bdc84ea385c9a154730c by Dmitry Kazakov.
Committed on 26/08/2019 at 12:56.
Pushed by dkazakov into branch 'kazakov/transformable-decorations-bug-331789'.

Fix deadlock when removing reference image

We shouldn't request a recursivve shape update from inside a mutex help.

M  +7    -1    libs/flake/KoShapeManager.cpp

https://invent.kde.org/kde/krita/commit/372be1ad8b6acd5dfae9bdc84ea385c9a154730c
Comment 5 Dmitry Kazakov 2019-08-26 12:59:41 UTC
Git commit 1fbe2878452839aacf353ed5c4678ed514efacd3 by Dmitry Kazakov.
Committed on 26/08/2019 at 12:59.
Pushed by dkazakov into branch 'master'.

Fix deadlock when removing reference image

We shouldn't request a recursivve shape update from inside a mutex help.

M  +7    -1    libs/flake/KoShapeManager.cpp

https://invent.kde.org/kde/krita/commit/1fbe2878452839aacf353ed5c4678ed514efacd3
Comment 6 Dmitry Kazakov 2019-08-26 13:08:59 UTC
Git commit cb8279b40c3f0fa3064d444988be95a2b311630a by Dmitry Kazakov.
Committed on 26/08/2019 at 13:05.
Pushed by dkazakov into branch 'krita/4.2'.

Fix deadlock when removing reference image

We shouldn't request a recursivve shape update from inside a mutex help.

M  +7    -1    libs/flake/KoShapeManager.cpp

https://invent.kde.org/kde/krita/commit/cb8279b40c3f0fa3064d444988be95a2b311630a